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

Add sticky tab navigation #162

Merged
merged 2 commits into from Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs-theme/partials/header.html
@@ -0,0 +1,47 @@
{#-
This file was automatically generated - do not edit
-#}
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
{% if config.theme.logo.icon %}
<i class="md-icon">{{ config.theme.logo.icon }}</i>
{% else %}
<img src="{{ config.theme.logo | url }}" width="24" height="24">
{% endif %}
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis" data-md-component="title">
<span class="md-header-nav__topic">
<nav class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
{% for nav_item in nav %}
{% include "partials/tabs-item.html" %}
{% endfor %}
</ul>
</nav>
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% if "search" in config["plugins"] %}
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
{% include "partials/search.html" %}
{% endif %}
</div>
{% if config.repo_url %}
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
{% include "partials/source.html" %}
</div>
</div>
{% endif %}
</div>
</nav>
</header>
2 changes: 2 additions & 0 deletions docs-theme/partials/tabs.html
@@ -0,0 +1,2 @@
<!-- Noop component to simplify sidebar appearence -->
<nav class="md-tabs md-tabs--active"></nav>
3 changes: 3 additions & 0 deletions docs/custom.css
@@ -1,3 +1,6 @@
.code-link::before {
content: "</>";
}
.md-header[data-md-state="shadow"] {
transition: unset;
}
1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -40,6 +40,7 @@ repo_name: larq/larq
edit_uri: ""
theme:
name: material
custom_dir: docs-theme
logo:
icon: developer_board
palette:
Expand Down