Skip to content

Commit

Permalink
Fix Dokka style
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis committed Oct 16, 2023
1 parent 6921eca commit 617ec96
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 43 deletions.
38 changes: 17 additions & 21 deletions docs/dokka-presets/css/aws-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@
* SPDX-License-Identifier: Apache-2.0
*/


:root {
--color-dark: #232f3e;
}

#leftToggler {
background: none;
border: none;
padding: 0;
}

#pages-search {
margin: 0;
padding-top: 10px;
}

#pages-search:focus {
outline: revert;
#searchBar {
height: 40px;
}

#pages-search-label {
display: none;
}
/* copied from Dokka except for `width` attribute */
.sideMenuPart > .overview:before {
box-sizing: border-box;
content: '';
top: 0;
right: 0;
bottom: 0;
position: absolute;
z-index: -1;
/*width: var(--sidebar-width); */
/* the var --sidebar-width was not properly sized. changing it broke other formatting,
so just changing it here for the specific element
*/
width: 1000px;
}
19 changes: 18 additions & 1 deletion docs/dokka-presets/css/logo-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
position: relative;
--logo-width: 72px;
margin-left: calc(var(--logo-width) + 5px);
display: flex;
align-items: center;
color: #fff;
font-weight: 700;
margin-top: 10px;
margin-right: 8px;
}

.library-name a::before {
Expand All @@ -17,6 +23,17 @@
position: absolute;
width: 59px;
height: 35px;
top: -10px;
left: calc(-1 * var(--logo-width) - 5px);
margin-right: 5px;
}

/* Copied from Dokka except `top` replaced with `margin-top` attribute */
.library-version {
position: relative;
margin-left: 3px;
color: rgba(255,255,255,.7);
font-size: 13px;
font-weight: normal;
line-height: 16px;
margin-top: 19px;
}
41 changes: 20 additions & 21 deletions docs/dokka-presets/templates/includes/header.ftl
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<#import "source_set_selector.ftl" as source_set_selector>
<#macro display>
<div class="navigation-wrapper" id="navigation-wrapper">
<button id="leftToggler" aria-label="Open navigation menu"><span class="icon-toggler"></span></button>
<div class="library-name">
<@template_cmd name="pathToRoot">
<a href="${pathToRoot}index.html">
<@template_cmd name="projectName">
<span>${projectName}</span>
</@template_cmd>
</a>
</@template_cmd>
<div class="navigation" id="navigation">
<button id="menu-toggle" class="menu-toggle" aria-label="Open navigation menu"></button>
<div class="library-name">
<@template_cmd name="pathToRoot">
<a href="${pathToRoot}index.html">
<@template_cmd name="projectName">
<span>${projectName}</span>
</@template_cmd>
</a>
</@template_cmd>
</div>
<div class="library-version">
<#-- This can be handled by the versioning plugin -->
<@version/>
</div>
<div class="pull-right d-flex">
<@source_set_selector.display/>
<button id="theme-toggle-button" class="navigation-controls--theme"><span id="theme-toggle"></span></button>
<div id="searchBar"></div>
</div>
</div>
<div>
<#-- This can be handled by the versioning plugin -->
<@version/>
</div>
<div class="pull-right d-flex">
<@source_set_selector.display/>
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
<label for="pages-search" id="pages-search-label">Search</label>
<div id="searchBar"></div>
</div>
</div>
</#macro>

0 comments on commit 617ec96

Please sign in to comment.