1+ <!--
2+ Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
3+
4+ Permission is hereby granted, free of charge, to any person obtaining a copy
5+ of this software and associated documentation files (the "Software"), to
6+ deal in the Software without restriction, including without limitation the
7+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8+ sell copies of the Software, and to permit persons to whom the Software is
9+ furnished to do so, subject to the following conditions:
10+
11+ The above copyright notice and this permission notice shall be included in
12+ all copies or substantial portions of the Software.
13+
14+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20+ IN THE SOFTWARE.
21+ -->
22+
23+ <!-- Determine classes -->
24+ {% set class = "md-header" %}
25+ {% if "navigation.tabs.sticky" in features %}
26+ {% set class = class ~ " md-header--shadow md-header--lifted" %}
27+ {% elif "navigation.tabs" not in features %}
28+ {% set class = class ~ " md-header--shadow" %}
29+ {% endif %}
30+
31+ <!-- Header -->
32+ < header class ="{{ class }} " data-md-component ="header ">
33+ < nav
34+ class ="md-header__inner md-grid "
35+ aria-label ="{{ lang.t('header') }} "
36+ >
37+
38+ <!-- Link to home -->
39+ < a
40+ href ="{{ config.extra.homepage | d(nav.homepage.url, true) | url }} "
41+ title ="{{ config.site_name | e }} "
42+ class ="md-header__button md-logo "
43+ aria-label ="{{ config.site_name }} "
44+ data-md-component ="logo "
45+ >
46+ {% include "partials/logo.html" %}
47+ </ a >
48+
49+ <!-- Button to open drawer -->
50+ < label class ="md-header__button md-icon " for ="__drawer ">
51+ {% set icon = config.theme.icon.menu or "material/menu" %}
52+ {% include ".icons/" ~ icon ~ ".svg" %}
53+ </ label >
54+
55+ <!-- Header title -->
56+ < div class ="md-header__title " data-md-component ="header-title ">
57+ < div class ="md-header__ellipsis ">
58+ < div class ="md-header__topic ">
59+ < span class ="md-ellipsis ">
60+ {{ config.site_name }}
61+ </ span >
62+ </ div >
63+ < div class ="md-header__topic " data-md-component ="header-topic ">
64+ < span class ="md-ellipsis ">
65+ {% if page.meta and page.meta.title %}
66+ {{ page.meta.title }}
67+ {% else %}
68+ {{ page.title }}
69+ {% endif %}
70+ </ span >
71+ </ div >
72+ </ div >
73+ </ div >
74+
75+ <!-- Color palette toggle -->
76+ {% if config.theme.palette %}
77+ {% if not config.theme.palette is mapping %}
78+ {% include "partials/palette.html" %}
79+ {% endif %}
80+ {% endif %}
81+
82+ <!-- User preference: color palette -->
83+ {% if not config.theme.palette is mapping %}
84+ {% include "partials/javascripts/palette.html" %}
85+ {% endif %}
86+
87+ <!-- Site language selector -->
88+ {% if config.extra.alternate %}
89+ {% include "partials/alternate.html" %}
90+ {% endif %}
91+
92+ <!-- Button to open search modal -->
93+ {% if "material/search" in config.plugins %}
94+ < label class ="md-header__button md-icon " for ="__search ">
95+ {% set icon = config.theme.icon.search or "material/magnify" %}
96+ {% include ".icons/" ~ icon ~ ".svg" %}
97+ </ label >
98+
99+ <!-- Search interface -->
100+ {% include "partials/search.html" %}
101+ {% endif %}
102+
103+ <!-- Repository information -->
104+ {% if config.repo_url %}
105+ < div class ="md-header__source ">
106+ {% include "partials/source.html" %}
107+ </ div >
108+ {% endif %}
109+ </ nav >
110+
111+ <!-- Navigation tabs (sticky) -->
112+ {% if "navigation.tabs.sticky" in features %}
113+ {% if "navigation.tabs" in features %}
114+ {% include "partials/tabs.html" %}
115+ {% endif %}
116+ {% endif %}
117+
118+ < meta name ="google-site-verification " content ="sALqmNQZWZ6_5ig5JqIaFiR6AMUotcGG6xFq_fQPt_U " />
119+
120+ </ header >
0 commit comments