forked from david-swift/duckling
Simplify navigation bar #1
This commit is contained in:
parent
3a76d70cd5
commit
371e666ea9
@ -8,7 +8,6 @@ generate_feeds = true
|
|||||||
# Only the first file will be used in the navbar feed button,
|
# Only the first file will be used in the navbar feed button,
|
||||||
# other feeds will still be available in page's head.
|
# other feeds will still be available in page's head.
|
||||||
feed_filenames = ["rss.xml", "atom.xml"]
|
feed_filenames = ["rss.xml", "atom.xml"]
|
||||||
build_search_index = true
|
|
||||||
author = "Duck Quack"
|
author = "Duck Quack"
|
||||||
|
|
||||||
# Based on https://github.com/welpo/tabi
|
# Based on https://github.com/welpo/tabi
|
||||||
@ -34,10 +33,6 @@ highlight_themes_css = [
|
|||||||
smart_punctuation = true
|
smart_punctuation = true
|
||||||
bottom_footnotes = true
|
bottom_footnotes = true
|
||||||
|
|
||||||
[search]
|
|
||||||
# index_format = "elasticlunr_json"
|
|
||||||
index_format = "fuse_json"
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Which theme should be used by default (light/dark).
|
# Which theme should be used by default (light/dark).
|
||||||
#
|
#
|
||||||
@ -134,8 +129,6 @@ csp = [
|
|||||||
# auto_hide = true
|
# auto_hide = true
|
||||||
# Whether to show the Atom/RSS feed button in the nav
|
# Whether to show the Atom/RSS feed button in the nav
|
||||||
show_feed = true
|
show_feed = true
|
||||||
# Whether to show the manual theme switcher in the nav
|
|
||||||
show_theme_switcher = true
|
|
||||||
# Whether to show the link to the source repository in the nav
|
# Whether to show the link to the source repository in the nav
|
||||||
show_repo = true
|
show_repo = true
|
||||||
# Links used in the nav.
|
# Links used in the nav.
|
||||||
|
|||||||
@ -151,13 +151,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.active {
|
a.active {
|
||||||
box-shadow: var(--edge-highlight);
|
|
||||||
background-color: var(--accent-color-alpha);
|
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--accent-color);
|
color: var(--accent-color); ///
|
||||||
color: var(--contrast-color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,18 +168,6 @@
|
|||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--contrast-color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
-webkit-mask-image: var(--icon-home);
|
|
||||||
vertical-align: -0.125em;
|
|
||||||
mask-image: var(--icon-home);
|
|
||||||
transition: var(--transition);
|
|
||||||
margin-inline-end: 0.25rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,8 +180,6 @@
|
|||||||
color: var(--fg-muted-4);
|
color: var(--fg-muted-4);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: var(--edge-highlight);
|
|
||||||
background-color: var(--fg-muted-1);
|
|
||||||
color: var(--fg-muted-5);
|
color: var(--fg-muted-5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,8 +306,7 @@
|
|||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
color: var(--contrast-color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
{%- if config.extra.show_copy_button %}
|
{%- if config.extra.show_copy_button %}
|
||||||
<span id="copy-code-text" class="hidden">{{ macros_translate::translate(key="copy_code", default="Copy Code", language_strings=language_strings) }}</span>
|
<span id="copy-code-text" class="hidden">{{ macros_translate::translate(key="copy_code", default="Copy Code", language_strings=language_strings) }}</span>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if config.build_search_index %}
|
|
||||||
<span id="search-index" class="hidden">{{ get_url(path="/", lang=lang) }}/search_index.{{ config.default_language }}.json</span>
|
|
||||||
<span id="more-matches-text" class="hidden">{{ macros_translate::translate(key="more_matches", default="$MATCHES more matches", language_strings=language_strings) }}</span>
|
|
||||||
{%- endif %}
|
|
||||||
|
|||||||
@ -83,18 +83,6 @@
|
|||||||
{%- set scripts = scripts | concat(with=["katex.min.js", "auto-render.min.js", "katex-init.js"]) %}
|
{%- set scripts = scripts | concat(with=["katex.min.js", "auto-render.min.js", "katex-init.js"]) %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if config.build_search_index %}
|
|
||||||
{%- if config.search.index_format == "elasticlunr_json" -%}
|
|
||||||
{%- set scripts = scripts | concat(with=["elasticlunr.min.js", "search-elasticlunr.js"]) %}
|
|
||||||
{%- elif config.search.index_format == "fuse_json" -%}
|
|
||||||
{%- set scripts = scripts | concat(with=["fuse.js", "search-fuse.js"]) %}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
{%- if config.extra.nav.show_theme_switcher %}
|
|
||||||
{%- set scripts = scripts | concat(with=["theme-switcher.js"]) %}
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
{%- if page.extra.comments.id %}
|
{%- if page.extra.comments.id %}
|
||||||
{%- set scripts = scripts | concat(with=["comments.js"]) %}
|
{%- set scripts = scripts | concat(with=["comments.js"]) %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
{%- if current_url | default(value="/") | trim_end_matches(pat="/") | safe == get_url(path="/", lang=lang) | trim_end_matches(pat='/') | safe -%}
|
{%- if current_url | default(value="/") | trim_end_matches(pat="/") | safe == get_url(path="/", lang=lang) | trim_end_matches(pat='/') | safe -%}
|
||||||
class="active"
|
class="active"
|
||||||
{%- endif -%}>
|
{%- endif -%}>
|
||||||
<i class="icon"></i>
|
|
||||||
{{- config.title -}}
|
{{- config.title -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -63,42 +62,9 @@
|
|||||||
</li>
|
</li>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- if config.build_search_index %}
|
|
||||||
<li id="search">
|
|
||||||
<button id="search-toggle" class="circle" title="{{ macros_translate::translate(key='search', default='Search', language_strings=language_strings) }}">
|
|
||||||
<i class="icon"></i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if config.languages | length > 0 %}
|
{%- if config.languages | length > 0 %}
|
||||||
{%- include "partials/language_switcher.html" %}
|
{%- include "partials/language_switcher.html" %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if config.extra.default_theme or config.extra.nav.show_theme_switcher %}
|
|
||||||
<li id="theme-switcher">
|
|
||||||
<details class="closable">
|
|
||||||
<summary class="circle" title="{{ macros_translate::translate(key='theme', default='Theme', language_strings=language_strings) }}">
|
|
||||||
<i class="icon"></i>
|
|
||||||
</summary>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<button class="circle" id="theme-light" title="{{ macros_translate::translate(key='theme_light', default='Switch to Light Theme', language_strings=language_strings) }}">
|
|
||||||
<i class="icon"></i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button class="circle" id="theme-dark" title="{{ macros_translate::translate(key='theme_dark', default='Switch to Dark Theme', language_strings=language_strings) }}">
|
|
||||||
<i class="icon"></i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button class="circle" id="theme-system" title="{{ macros_translate::translate(key='theme_system', default='Use System Theme', language_strings=language_strings) }}">
|
|
||||||
<i class="icon"></i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</details>
|
|
||||||
</li>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if config.feed_filenames | length > 1 and config.extra.nav.show_feed -%}
|
{%- if config.feed_filenames | length > 1 and config.extra.nav.show_feed -%}
|
||||||
<li id="feed">
|
<li id="feed">
|
||||||
<details class="closable">
|
<details class="closable">
|
||||||
@ -136,15 +102,4 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{%- if config.build_search_index %}
|
|
||||||
<div id="search-container">
|
|
||||||
<label for="search-bar" class="visually-hidden">
|
|
||||||
{{- macros_translate::translate(key="search", default="Search", language_strings=language_strings) -}}
|
|
||||||
</label>
|
|
||||||
<input id="search-bar" placeholder="{{ macros_translate::translate(key='search_for', default='Search for', language_strings=language_strings) }}…" autocomplete="off" type="search" disabled>
|
|
||||||
<div id="search-results-container">
|
|
||||||
<div id="search-results"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{%- endif %}
|
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user