mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
129 lines
4.7 KiB
Plaintext
129 lines
4.7 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en" data-version="{{ package.version }}">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="{{ description }}">
|
|
<meta name="theme-color" content="#787acf">
|
|
{% if noindex %}<meta name="robots" content="noindex">{% endif %}
|
|
|
|
<title>{{ title }}</title>
|
|
|
|
<link rel="icon" href="/assets/images/webawesome-logo.svg" />
|
|
<link rel="apple-touch-icon" href="/assets/images/app-icon.png">
|
|
|
|
{# Scripts #}
|
|
<script type="module" src="/assets/scripts/code-examples.js"></script>
|
|
<script type="module" src="/assets/scripts/color-scheme.js"></script>
|
|
<script type="module" src="/assets/scripts/copy-code.js"></script>
|
|
<script type="module" src="/assets/scripts/scroll.js"></script>
|
|
<script type="module" src="/assets/scripts/turbo.js"></script>
|
|
<script type="module" src="/assets/scripts/search.js"></script>
|
|
<script type="module" src="/assets/scripts/outline.js"></script>
|
|
|
|
{# Web Awesome #}
|
|
<script type="module" src="/dist/webawesome.loader.js"></script>
|
|
<link rel="stylesheet" id="theme-stylesheet" href="/dist/themes/default.css" />
|
|
<link rel="stylesheet" href="/dist/themes/applied.css" />
|
|
<link id="color-stylesheet" rel="stylesheet" href="/dist/themes/color_standard.css" />
|
|
<link rel="stylesheet" href="/dist/themes/forms.css" />
|
|
|
|
{# Docs styles #}
|
|
<link rel="stylesheet" href="/assets/styles/docs.css" />
|
|
|
|
{# Set the theme to prevent flashing #}
|
|
<script>
|
|
document.documentElement.classList.toggle(
|
|
'wa-theme-default-dark',
|
|
sessionStorage.getItem('colorScheme') === 'dark' || window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
);
|
|
</script>
|
|
</head>
|
|
<body class="layout-{{ layout | stripExtension }}">
|
|
|
|
<wa-page>
|
|
<header slot="header">
|
|
{# Logo #}
|
|
<div id="docs-branding">
|
|
{# Nav toggle #}
|
|
<wa-button appearance="text" data-toggle-nav>
|
|
<wa-icon name="bars" label="Toggle navigation"></wa-icon>
|
|
</wa-button>
|
|
<a href="/" aria-label="Web Awesome">
|
|
<span class="only-desktop">{% include "logo.njk" %}</span>
|
|
<span class="only-mobile">{% include "logo-simple.njk" %}</span>
|
|
</a>
|
|
<small id="version-number" class="only-desktop">{{ package.version }}</small>
|
|
<wa-badge variant="warning" class="only-desktop">Alpha</wa-badge>
|
|
</div>
|
|
|
|
<div id="docs-toolbar">
|
|
{# Color scheme selector #}
|
|
<wa-dropdown id="color-scheme-selector">
|
|
<wa-button slot="trigger" appearance="tinted" size="small" pill caret title="Press \ to toggle">
|
|
<wa-icon class="only-light" slot="prefix" name="sun" variant="regular"></wa-icon>
|
|
<wa-icon class="only-dark" slot="prefix" name="moon" variant="regular"></wa-icon>
|
|
<span class="only-light only-desktop">Light</span>
|
|
<span class="only-dark only-desktop">Dark</span>
|
|
</wa-button>
|
|
<wa-menu>
|
|
<wa-menu-item type="checkbox" value="light">Light</wa-menu-item>
|
|
<wa-menu-item type="checkbox" value="dark">Dark</wa-menu-item>
|
|
<wa-divider></wa-divider>
|
|
<wa-menu-item type="checkbox" value="auto">System</wa-menu-item>
|
|
</wa-menu>
|
|
</wa-dropdown>
|
|
|
|
{# Search #}
|
|
<wa-button id="search-trigger" appearance="outline" size="small" data-search>
|
|
<wa-icon slot="prefix" name="magnifying-glass"></wa-icon>
|
|
Search
|
|
<kbd slot="suffix" class="only-desktop">/</kbd>
|
|
</wa-button>
|
|
</div>
|
|
</header>
|
|
|
|
{# Sidebar #}
|
|
{% if hasSidebar %}
|
|
<aside slot="navigation" id="sidebar" class="docs-aside" data-remember-scroll>
|
|
<nav>
|
|
{% include "sidebar.njk" %}
|
|
</nav>
|
|
</aside>
|
|
{% endif %}
|
|
|
|
{# Outline #}
|
|
{% if hasOutline %}
|
|
<aside slot="aside" id="outline" class="docs-aside">
|
|
<nav id="outline-standard" class="outline-links">
|
|
<h2><a href="#content">{{ title }}</a></h2>
|
|
</nav>
|
|
</aside>
|
|
{% endif %}
|
|
|
|
{# Main #}
|
|
<main id="content">
|
|
{# Expandable outline #}
|
|
<nav id="outline-expandable">
|
|
<details class="outline-links">
|
|
<summary>On this page</summary>
|
|
</details>
|
|
</nav>
|
|
|
|
{% block beforeContent %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1 class="title">{{ title }}</h1>
|
|
|
|
{{ content | safe }}
|
|
{% endblock %}
|
|
|
|
{% block afterContent %}{% endblock %}
|
|
</main>
|
|
|
|
{% include 'search.njk' %}
|
|
</wa-page>
|
|
|
|
</body>
|
|
</html>
|