Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Oct 4, 2023
1 parent a85690b commit 2463fcb
Show file tree
Hide file tree
Showing 6 changed files with 529 additions and 467 deletions.
755 changes: 370 additions & 385 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/mkdocs-material
16 changes: 9 additions & 7 deletions theme/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
IN THE SOFTWARE.
#} -->
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
{% include "partials/copyright.html" %}
{% if config.extra.social %}
{% include "partials/social.html" %}
{% endif %}
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
{% include "partials/copyright.html" %}

<!-- Social links -->
{% if config.extra.social %}
{% include "partials/social.html" %}
{% endif %}
</div>
</div>
</footer>
206 changes: 132 additions & 74 deletions theme/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,94 +20,152 @@
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
#} -->
<!-- Determine base classes -->
{% set class = "md-header" %}
{% if "navigation.tabs.sticky" in features %}
{% set class = class ~ " md-header--shadow md-header--lifted" %}
{% elif "navigation.tabs" not in features %}
{% set class = class ~ " md-header--shadow" %}
{% endif %}

<!-- Header -->
<header class="{{ class }}" data-md-component="header">
<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">
{% include "partials/logo.html" %}
</a>
<label class="md-header__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
{{ config.site_name }}
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
{% if page.meta and page.meta.title %}
{{ page.meta.title }}
{% else %}
{{ page.title }}
{% endif %}
</span>
</div>
</div>
<nav
class="md-header__inner md-grid"
aria-label="{{ lang.t('header') }}"
>

<!-- Link to home -->
<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" %}
</a>

<!-- Button to open drawer -->
<label class="md-header__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
</label>

<!-- Header title -->
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
{{ config.site_name }}
</span>
</div>
{% if config.repo_url %}
<div class="md-header__source">
{% include "partials/source.html" %}
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
{% if page.meta and page.meta.title %}
{{ page.meta.title }}
{% else %}
{{ page.title }}
{% endif %}
</span>
</div>
{% endif %}
{% if "material/search" in config.plugins %}
<label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
</label>
{% include "partials/search.html" %}
{% endif %}
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">
{% for alt in config.extra.alternate %}
{% if alt.lang == config.theme.language %}
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language') }}">
<img alt="{{ config.theme.language }}" class="twemoji" src="{{ alt.icon }}">
</button>
{% endif %}
{% endfor %}
<div class="md-select__inner">
<ul class="md-select__list">
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a href="{{ "/" ~ alt.lang ~ "/" ~ page.url }}" hreflang="{{ alt.lang }}" class="md-select__link">
<img alt="{{ alt.lang }}" class="twemoji" src="{{ alt.icon }}">
{{ alt.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>

<!-- Repository information -->
{% if config.repo_url %}
<div class="md-header__source">
{% include "partials/source.html" %}
</div>
{% endif %}

<!-- Button to open search modal -->
{% if "material/search" in config.plugins %}
<label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
</label>

<!-- Search interface -->
{% include "partials/search.html" %}
{% endif %}

<!-- Site language selector -->
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">
{% set icon = config.theme.icon.alternate or "material/translate" %}
<button
class="md-header__button md-icon"
aria-label="{{ lang.t('select.language') }}"
>
{% include ".icons/" ~ icon ~ ".svg" %}
</button>
<div class="md-select__inner">
<ul class="md-select__list">
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a
href="{{ alt.link | url }}"
hreflang="{{ alt.lang }}"
class="md-select__link"
>
{{ alt.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% if not config.theme.palette is mapping %}
</div>
{% endif %}

<!-- Color palette -->
{% if config.theme.palette %}
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
{% set scheme = option.scheme | d("default", true) %}
<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 }}">
{% for option in config.theme.palette %}
{% set scheme = option.scheme | d("default", true) %}
{% set primary = option.primary | d("indigo", true) %}
{% set accent = option.accent | d("indigo", true) %}
<input
class="md-option"
data-md-color-media="{{ option.media }}"
data-md-color-scheme="{{ scheme | replace(' ', '-') }}"
data-md-color-primary="{{ primary | replace(' ', '-') }}"
data-md-color-accent="{{ accent | replace(' ', '-') }}"
{% if option.toggle %}
aria-label="{{ option.toggle.name }}"
{% else %}
aria-hidden="true"
{% endif %}
type="radio"
name="__palette"
id="__palette_{{ loop.index0 }}"
/>
{% if option.toggle %}
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index % 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" %}
</label>
</label>
{% endif %}
{% endfor %}
{% endfor %}
</form>
{% endif %}
{% if not config.theme.palette is mapping %}
{% include "partials/javascripts/palette.html" %}
{% endif %}
</nav>
{% if "navigation.tabs.sticky" in features %}
{% if "navigation.tabs" in features %}
{% include "partials/tabs.html" %}
{% endif %}
{% endif %}
{% endif %}

<!-- User preference: color palette -->
{% if not config.theme.palette is mapping %}
{% include "partials/javascripts/palette.html" %}
{% endif %}
</nav>

<!-- Navigation tabs (sticky) -->
{% if "navigation.tabs.sticky" in features %}
{% if "navigation.tabs" in features %}
{% include "partials/tabs.html" %}
{% endif %}
{% endif %}
</header>
10 changes: 10 additions & 0 deletions theme/partials/path-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,28 @@
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
#} -->

<!-- Render navigation item -->
{% macro render(nav_item, ref = nav_item) %}

<!-- Navigation item with nested items -->
{% if nav_item.children %}
{% set first = nav_item.children | first %}

<!-- Recurse, if the first item has further nested items -->
{% if first.children %}
{{ render(first, ref) }}

<!-- Nested navigation link -->
{% else %}
<a href="{{ first.canonical_url | url }}" class="md-path__link" property="item" typeof="WebPage">
<span class="md-ellipsis" property="name">
{{ ref.title }}
</span>
</a>
{% endif %}

<!-- Navigation link -->
{% else %}
<a href="{{ nav_item.canonical_url | url }}" class="md-path__link" property="item" typeof="WebPage">
<span class="md-ellipsis" property="name">
Expand Down
7 changes: 7 additions & 0 deletions theme/partials/path.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
#} -->

{% import "partials/path-item.html" as item with context %}

<!-- Determine whether to show navigation path -->
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "path" in page.meta.hide %}
{% endif %}

<!-- Determine whether we have enough pages for rendering -->
{% set depth = page.ancestors | length %}
{% if nav.homepage %}
{% set depth = depth + 1 %}
{% endif %}

<!-- Navigation path (breadcrumbs) -->
{% if depth > 1 %}
{% set count = namespace(value=1) %}
<nav class="md-path" aria-label="{{ lang.t('nav') }}" {{ hidden }}>
Expand Down

0 comments on commit 2463fcb

Please sign in to comment.