Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONT MERGE] Update templates for Dokka 2.0.0 #4702

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion dokka-templates/base.ftl
Original file line number Diff line number Diff line change
@@ -36,7 +36,23 @@
<@header.display/>
<div id="container" data-test="content">
<div class="sidebar" id="leftColumn">
<div class="sidebar--inner" id="sideMenu"></div>
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list"
data-role="dropdown-listbox">
<div class="dropdown--header">
<span>
<@template_cmd name="projectName">
${projectName}
</@template_cmd>
</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<div class="sidebar--inner" id="sideMenu"></div>
</ul>
<div class="dropdown--overlay"></div>
</div>
</div>
<div id="main">
<@content/>
49 changes: 27 additions & 22 deletions dokka-templates/includes/header.ftl
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
<#import "source_set_selector.ftl" as source_set_selector>
<#macro display>
<nav class="navigation" id="navigation-wrapper">
<div class="navigation--inner">
<div class="navigation-title">
<button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
<div class="library-name">
<@template_cmd name="pathToRoot">
<a class="library-name--link" href="${pathToRoot}index.html">
<@template_cmd name="projectName">
${projectName}
</@template_cmd>
</a>
</@template_cmd>
</div>
<div class="library-version">
<#-- This can be handled by the versioning plugin -->
<@version/>
</div>
</div>
<@source_set_selector.display/>
<nav class="navigation theme-dark" id="navigation-wrapper">
<@template_cmd name="pathToRoot">
<a class="library-name--link" href="${pathToRoot}index.html">
<@template_cmd name="projectName">
${projectName}
</@template_cmd>
</a>
</@template_cmd>
<button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle"
type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">
<#-- This can be handled by the versioning plugin -->
<@version/>
</div>
<div class="navigation-controls">
<button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
<div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
<@source_set_selector.display/>
<#if homepageLink?has_content>
<a class="navigation-controls--btn navigation-controls--btn_homepage" id="homepage-link"
href="${homepageLink}"></a>
</#if>
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button"
type="button">Switch theme
</button>
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
API
</div>
</div>
</nav>
</#macro>
</#macro>
34 changes: 31 additions & 3 deletions dokka-templates/includes/source_set_selector.ftl
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
<#macro display>
<#if sourceSets?has_content>
<div class="filter-section" id="filter-section">
<div class="filter-section filter-section_loading" id="filter-section">
<#list sourceSets as ss>
<button class="platform-tag platform-selector ${ss.platform}-like" data-active="" data-filter="${ss.filter}">${ss.name}</button>
<button class="platform-tag platform-selector ${ss.platform}-like" data-active=""
data-filter="${ss.filter}">${ss.name}</button>
</#list>
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox"
data-role="dropdown-toggle"
aria-controls="platform-tags-listbox"
aria-haspopup="listbox"
aria-expanded="false"
aria-label="Toggle source sets"
></button>
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox">
<div class="dropdown--header"><span>Platform filter</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close platform filter">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<#list sourceSets as ss>
<li role="option" class="dropdown--option platform-selector-option ${ss.platform}-like" tabindex="0">
<label class="checkbox">
<input type="checkbox" class="checkbox--input" id="${ss.filter}"
data-filter="${ss.filter}"/>
<span class="checkbox--icon"></span>
${ss.name}
</label>
</li>
</#list>
</ul>
<div class="dropdown--overlay"></div>
</div>
</div>
</#if>
</#macro>
</#macro>