1- {#-
2- This file was automatically generated - do not edit
3- -#}
4- {% set class = "md-header" %}
5- {% if "navigation.tabs.sticky" in features %}
6- {% set class = class ~ " md-header--shadow md-header--lifted" %}
7- {% elif "navigation.tabs" not in features %}
8- {% set class = class ~ " md-header--shadow" %}
9- {% endif %}
10- < header class ="{{ class }} " data-md-component ="header ">
11- < nav class ="md-header__inner md-grid " aria-label ="{{ lang.t('header') }} ">
12- <!-- Logo linking to main site -->
1+ <!--
2+ Copyright (c) 2016-2023 Martin Donath <[email protected] > 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 base 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+ <!-- Logo linking to main site -->
1339< a href ="/ " title ="OpenObserve Homepage " class ="md-header__button md-logo " aria-label ="OpenObserve Homepage " data-md-component ="logo ">
1440 {% include "partials/logo.html" %}
1541</ a >
1844< a href ="/docs " title ="Docs Home " class ="md-header__button " style ="font-weight: bold; font-size: 1rem; padding-left: 0.5rem; ">
1945 < svg xmlns ="http://www.w3.org/2000/svg " height ="24px " viewBox ="0 -960 960 960 " width ="24px " fill ="currentColor "> < path d ="M320-440h320v-80H320v80Zm0 120h320v-80H320v80Zm0 120h200v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z "/> </ svg >
2046</ a >
21- < label class ="md-header__button md-icon " for ="__drawer ">
22- {% set icon = config.theme.icon.menu or "material/menu" %}
23- {% include ".icons/" ~ icon ~ ".svg" %}
24- </ label >
25- < div class ="md-header__title " data-md-component ="header-title ">
26- < div class ="md-header__ellipsis ">
27- < div class ="md-header__topic ">
28- < span class ="md-ellipsis ">
29- {{ config.site_name }}
30- </ span >
31- </ div >
32- < div class ="md-header__topic " data-md-component ="header-topic ">
33- < span class ="md-ellipsis ">
34- {% if page.meta and page.meta.title %}
35- {{ page.meta.title }}
36- {% else %}
37- {{ page.title }}
38- {% endif %}
39- </ span >
40- </ div >
47+
48+ <!-- Button to open drawer -->
49+ < label class ="md-header__button md-icon " for ="__drawer ">
50+ {% include ".icons/material/menu" ~ ".svg" %}
51+ </ label >
52+
53+ <!-- Header title -->
54+ < div class ="md-header__title " data-md-component ="header-title ">
55+ < div class ="md-header__ellipsis ">
56+ < div class ="md-header__topic ">
57+ < span class ="md-ellipsis ">
58+ {{ config.site_name }}
59+ </ span >
60+ </ div >
61+ < div class ="md-header__topic " data-md-component ="header-topic ">
62+ < span class ="md-ellipsis ">
63+ {% if page.meta and page.meta.title %}
64+ {{ page.meta.title }}
65+ {% else %}
66+ {{ page.title }}
67+ {% endif %}
68+ </ span >
4169 </ div >
4270 </ div >
43- {% if config.theme.palette %}
44- {% if not config.theme.palette is mapping %}
45- {% include "partials/palette.html" %}
46- {% endif %}
47- {% endif %}
71+ </ div >
72+
73+ <!-- Color palette -->
74+ {% if config.theme.palette %}
4875 {% if not config.theme.palette is mapping %}
49- {% include "partials/javascripts/palette.html" %}
50- {% endif %}
51- {% if config.extra.alternate %}
52- {% include "partials/alternate.html" %}
76+ < form class ="md-header__option " data-md-component ="palette ">
77+ {% for option in config.theme.palette %}
78+ {% set scheme = option.scheme | d("default", true) %}
79+ {% set primary = option.primary | d("indigo", true) %}
80+ {% set accent = option.accent | d("indigo", true) %}
81+ < input
82+ class ="md-option "
83+ data-md-color-media ="{{ option.media }} "
84+ data-md-color-scheme ="{{ scheme | replace(' ', '-') }} "
85+ data-md-color-primary ="{{ primary | replace(' ', '-') }} "
86+ data-md-color-accent ="{{ accent | replace(' ', '-') }} "
87+ {% if option.toggle %}
88+ aria-label ="{{ option.toggle.name }} "
89+ {% else %}
90+ aria-hidden ="true "
91+ {% endif %}
92+ type ="radio "
93+ name ="__palette "
94+ id ="__palette_{{ loop.index }} "
95+ />
96+ {% if option.toggle %}
97+ < label
98+ class ="md-header__button md-icon "
99+ title ="{{ option.toggle.name }} "
100+ for ="__palette_{{ loop.index0 or loop.length }} "
101+ hidden
102+ >
103+ {% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
104+ </ label >
105+ {% endif %}
106+ {% endfor %}
107+ </ form >
53108 {% endif %}
54- {% if "material/search" in config.plugins %}
55- {% set search = config.plugins["material/search"] | attr("config") %}
56- {% if search.enabled %}
57- < label class ="md-header__button md-icon " for ="__search ">
58- {% set icon = config.theme.icon.search or "material/magnify" %}
109+ {% endif %}
110+
111+ <!-- Site language selector -->
112+ {% if config.extra.alternate %}
113+ < div class ="md-header__option ">
114+ < div class ="md-select ">
115+ {% set icon = config.theme.icon.alternate or "material/translate" %}
116+ < button
117+ class ="md-header__button md-icon "
118+ aria-label ="{{ lang.t('select.language') }} "
119+ >
59120 {% include ".icons/" ~ icon ~ ".svg" %}
60- </ label >
61- {% include "partials/search.html" %}
62- {% endif %}
63- {% endif %}
64- {% if config.repo_url %}
65- < div class ="md-header__source ">
66- {% include "partials/source.html" %}
121+ </ button >
122+ < div class ="md-select__inner ">
123+ < ul class ="md-select__list ">
124+ {% for alt in config.extra.alternate %}
125+ < li class ="md-select__item ">
126+ < a
127+ href ="{{ alt.link | url }} "
128+ hreflang ="{{ alt.lang }} "
129+ class ="md-select__link "
130+ >
131+ {{ alt.name }}
132+ </ a >
133+ </ li >
134+ {% endfor %}
135+ </ ul >
136+ </ div >
67137 </ div >
68- {% endif %}
69- </ nav >
70- {% if "navigation.tabs.sticky" in features %}
71- {% if "navigation.tabs" in features %}
72- {% include "partials/tabs.html" %}
73- {% endif %}
138+ </ div >
139+ {% endif %}
140+
141+ <!-- Button to open search modal -->
142+ {% if "material/search" in config.plugins %}
143+ < label class ="md-header__button md-icon " for ="__search ">
144+ {% include ".icons/material/magnify.svg" %}
145+ </ label >
146+
147+ <!-- Search interface -->
148+ {% include "partials/search.html" %}
74149 {% endif %}
75- </ header >
150+
151+ <!-- Repository information -->
152+ {% if config.repo_url %}
153+ < div class ="md-header__source ">
154+ {% include "partials/source.html" %}
155+ </ div >
156+ {% endif %}
157+ </ nav >
158+
159+ <!-- Navigation tabs (sticky) -->
160+ {% if "navigation.tabs.sticky" in features %}
161+ {% if "navigation.tabs" in features %}
162+ {% include "partials/tabs.html" %}
163+ {% endif %}
164+ {% endif %}
165+ </ header >
0 commit comments