mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2024-10-01 01:35:57 -04:00
parent
97350b6245
commit
9cbebf239b
@ -1,9 +1,11 @@
|
|||||||
{% set class = "md-header" %}
|
{% set class = "md-header" %}
|
||||||
{% if "navigation.tabs.sticky" in features %}
|
{% if "navigation.tabs.sticky" in features %}
|
||||||
{% set class = class ~ " md-header--lifted" %}
|
{% set class = class ~ " md-header--shadow md-header--lifted" %}
|
||||||
|
{% elif "navigation.tabs" not in features %}
|
||||||
|
{% set class = class ~ " md-header--shadow" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<header class="{{ class }}" data-md-component="header">
|
<header class="{{ class }}" data-md-component="header">
|
||||||
<nav class="md-header__inner md-grid" aria-label="{{ lang.t('header.title') }}">
|
<nav class="md-header__inner md-grid" aria-label="{{ lang.t('header') }}">
|
||||||
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
|
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
|
||||||
{% include "partials/logo.html" %}
|
{% include "partials/logo.html" %}
|
||||||
</a>
|
</a>
|
||||||
@ -19,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="md-header__topic" data-md-component="header-topic">
|
<div class="md-header__topic" data-md-component="header-topic">
|
||||||
<span class="md-ellipsis">
|
<span class="md-ellipsis">
|
||||||
{% if page and page.meta and page.meta.title %}
|
{% if page.meta and page.meta.title %}
|
||||||
{{ page.meta.title }}
|
{{ page.meta.title }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
@ -43,7 +45,7 @@
|
|||||||
<div class="md-header__option">
|
<div class="md-header__option">
|
||||||
<div class="md-select">
|
<div class="md-select">
|
||||||
{% set icon = config.theme.icon.alternate or "material/translate" %}
|
{% set icon = config.theme.icon.alternate or "material/translate" %}
|
||||||
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language.title') }}">
|
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language') }}">
|
||||||
{% include ".icons/" ~ icon ~ ".svg" %}
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
</button>
|
</button>
|
||||||
<div class="md-select__inner">
|
<div class="md-select__inner">
|
||||||
@ -54,7 +56,7 @@
|
|||||||
{{ alt.name }}
|
{{ alt.name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,17 +65,19 @@
|
|||||||
{% if not config.theme.palette is mapping %}
|
{% if not config.theme.palette is mapping %}
|
||||||
<form class="md-header__option" data-md-component="palette">
|
<form class="md-header__option" data-md-component="palette">
|
||||||
{% for option in config.theme.palette %}
|
{% for option in config.theme.palette %}
|
||||||
{% set primary = option.primary | replace(" ", "-") | lower %}
|
{% set scheme = option.scheme | d("default", true) %}
|
||||||
{% set accent = option.accent | replace(" ", "-") | lower %}
|
<input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ scheme | replace(' ', '-') }}" data-md-color-primary="{{ option.primary | replace(' ', '-') }}" data-md-color-accent="{{ option.accent | replace(' ', '-') }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index0 }}">
|
||||||
<input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ option.scheme }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index }}">
|
|
||||||
{% if option.toggle %}
|
{% if option.toggle %}
|
||||||
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
|
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index % loop.length }}" hidden>
|
||||||
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
|
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
|
||||||
</label>
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if not config.theme.palette is mapping %}
|
||||||
|
{% include "partials/javascripts/palette.html" %}
|
||||||
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
{% if "navigation.tabs.sticky" in features %}
|
{% if "navigation.tabs.sticky" in features %}
|
||||||
{% if "navigation.tabs" in features %}
|
{% if "navigation.tabs" in features %}
|
||||||
|
Loading…
Reference in New Issue
Block a user