blob: 3eecf71024bbf188e7551f71a22a69a56f892881 [file]
<!--
Copyright 2026 The Pigweed Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
-->
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"/>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap"/>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap"/>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=dark_mode,expand_more,light_mode,menu,menu_open,search,toc" />
<style>
{{ style }}
</style>
<pagefind-config></pagefind-config>
<a id="pw-skip-link" class="pw-skip-link" href="{{ skip_target|default('#main-content') }}" data-pagefind-ignore="all">Skip to main content</a>
<!-- Top Navigation Header -->
<pw-header id="pw-header" data-pagefind-ignore="all">
<button id="pw-header-menu"
aria-label="Toggle navigation menu"
aria-expanded="false">
<span class="material-symbols-outlined">
menu
</span>
</button>
<div id="pw-header-brand">
<img src="https://www.gstatic.com/pigweed/pw_logo.svg"
alt="Pigweed's logo"/>
<!-- Do not use an H1 here. Pagefind will assume it's the title. -->
<a href="https://pigweed.dev/index.html">Pigweed</a>
</div>
{% if nav_links %}
<nav id="pw-header-nav" aria-label="Site navigation">
{% for link in nav_links %}
<div class="pw-nav-item">
<a href="{{ link.href }}" class="pw-nav-link{% if link.children %} has-children{% endif %}">
<span>{{ link.title }}</span>
{% if link.children %}
<span class="material-symbols-outlined pw-dropdown-arrow">expand_more</span>
{% endif %}
</a>
{% if link.children %}
<div class="pw-nav-popover">
<ul class="pw-nav-dropdown-list">
{% for child in link.children %}
<li>
<a href="{{ child.href }}" class="pw-nav-dropdown-link">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endfor %}
</nav>
{% endif %}
<div id="pw-header-search">
<pagefind-modal-trigger id="pw-search-desktop"
placeholder="Search pigweed.dev"></pagefind-modal-trigger>
</div>
<div id="pw-header-tools">
<button type="button" id="pw-search-mobile"
aria-label="Open search" title="Search">
<span class="material-symbols-outlined">
search
</span>
</button>
<pw-theme role="radiogroup" aria-label="Theme selection">
<button type="button" class="pw-theme-btn"
data-theme-val="light" aria-label="Light mode"
title="Light mode" role="radio" aria-checked="false">
<span class="material-symbols-outlined">
light_mode
</span>
</button>
<button type="button" class="pw-theme-btn"
data-theme-val="dark" aria-label="Dark mode"
title="Dark mode" role="radio" aria-checked="false">
<span class="material-symbols-outlined">
dark_mode
</span>
</button>
</pw-theme>
</div>
</pw-header>
<div id="pw-nav-backdrop" aria-hidden="true"></div>
<button type="button" id="pw-toc-fab"
aria-label="Table of contents"
aria-expanded="false"
title="Table of contents">
<span class="material-symbols-outlined">
toc
</span>
</button>
<pagefind-modal>
<pagefind-modal-header>
<pagefind-input></pagefind-input>
</pagefind-modal-header>
<pagefind-modal-body>
<pagefind-results max-results="100"></pagefind-results>
</pagefind-modal-body>
</pagefind-modal>
<script>
{{ script }}
</script>