Skip to content

Commit

Permalink
Move language selector before theme (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Feb 28, 2023
1 parent f516235 commit 2160e8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ details[class="downloads annotate"] > p .md-annotation span span::before {
color: var(--pg-blue-gray);
}

/* Make light/dark mode icon smaller */
label[class="md-header__button md-icon"] svg {
/* Make header icons smaller */
.md-header__button.md-icon svg svg {
height: 1rem;
width: 1rem;
}
Expand Down
28 changes: 14 additions & 14 deletions theme/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@
</label>
{% include "partials/search.html" %}
{% endif %}
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
{% set primary = option.primary | replace(" ", "-") | lower %}
{% set accent = option.accent | replace(" ", "-") | lower %}
<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 %}
<label class="md-header__button md-icon" title="{{ lang.t(option.toggle.name) }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
</label>
{% endif %}
{% endfor %}
</form>
{% endif %}
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">
Expand All @@ -74,6 +60,20 @@
</div>
</div>
{% endif %}
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
{% set primary = option.primary | replace(" ", "-") | lower %}
{% set accent = option.accent | replace(" ", "-") | lower %}
<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 %}
<label class="md-header__button md-icon" title="{{ lang.t(option.toggle.name) }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
</label>
{% endif %}
{% endfor %}
</form>
{% endif %}
</nav>
{% if "navigation.tabs.sticky" in features %}
{% if "navigation.tabs" in features %}
Expand Down

0 comments on commit 2160e8f

Please sign in to comment.