Files
inventree-website/overrides/partials/header.html
T
Oliver dd7d563e79 Zensical Refactor (#300)
* refactor into zensical

* adjust nav layout

* more nav changes

* update features page

* open external hero links in new tab

* consolidate small pages

* add legacy page redirects

* tweak content

* further cleanup

* adjust netlify config

* disable redirect

* remove redirect script

* fix tag splitting for plugins

* Display plugin metadata on left-hand side

* revert icon changes

* move gallery to index page

* Add page deascriptions

* fix image size for carousel

* adjust theme
2026-11-22 22:40:17 +11:00

72 lines
2.7 KiB
HTML

{#-
Copy of the theme's partials/header.html, with the navigation tabs moved
into the header bar (in place of the page title, which is only shown on
small screens where the tabs are hidden).
-#}
{% import "partials/tabs-item.html" as tab_item with context %}
{% set class = "md-header md-header--shadow" %}
<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">
{% set icon = config.theme.icon.menu or "material/menu" %}
{% include ".icons/" ~ icon ~ ".svg" %}
<span class="md-visually-hidden">{{ lang.t('nav') }}</span>
</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>
</div>
<nav class="md-tabs iv-header-tabs" aria-label="{{ lang.t('tabs') }}">
<ul class="md-tabs__list">
{% for nav_item in nav.items %}
{{ tab_item.render(nav_item) }}
{% endfor %}
</ul>
</nav>
{% if config.theme.palette %}
{% if not config.theme.palette is mapping %}
{% include "partials/palette.html" %}
{% endif %}
{% endif %}
{% if not config.theme.palette is mapping %}
{% include "partials/javascripts/palette.html" %}
{% endif %}
{% if config.extra.alternate %}
{% include "partials/alternate.html" %}
{% endif %}
{% if "search" in config.plugins %}
{% set search = config.plugins["search"] | attr("config") %}
{% if search.enabled %}
<label class="md-header__button md-icon" for="__search">
{% set icon = config.theme.icon.search or "material/magnify" %}
{% include ".icons/" ~ icon ~ ".svg" %}
<span class="md-visually-hidden">{{ lang.t('search') }}</span>
</label>
{% include "partials/search.html" %}
{% endif %}
{% endif %}
<div class="md-header__source">
{% if config.repo_url %}
{% include "partials/source.html" %}
{% endif %}
</div>
</nav>
</header>