Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
@@ -0,0 +1,9 @@
{% macro docs_edit_page(current_path) %}
<p class="edit-page"><a
href="{{ config.extra.docs_repo }}/blob/{{ config.extra.repo_branch }}/content{{ current_path | replace(from="
\\", to="/" ) | trim_end_matches(pat="/" ) }}.md"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-edit-2">
<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>
</svg>Edit this page on GitHub</a></p>
{% endmacro %}
@@ -0,0 +1,107 @@
{% macro docs_navigation(page, current_section) %}
<div class="flex items-center justify-between pt-8">
{# Find lighter navigation. There are three types: #}
{# 1. directly find the lighter if exists, #}
{# 2. find the last page in the previous sibling section, and #}
{# 3. find the last page in the parent section. #}
{% if page.lower %}
<a href="{{ page.lower.permalink }}">
<div class="card my-1">
<div class="card-body py-2">
&larr; {{ page.lower.title }}
</div>
</div>
</a>
{% elif not page.extra.top %}
{% set index = get_section(path=page.ancestors | reverse | first) %}
{% set parent = get_section(path=index.ancestors | reverse | first)%}
{% set first_subsection = get_section(path=parent.subsections | first) %}
{% if index == first_subsection %}
{% if parent.pages %}
{% set last_page = parent.pages | last %}
<a href="{{ last_page.permalink }}">
<div class="card my-1">
<div class="card-body py-2">
&larr; {{ last_page.title }}
</div>
</div>
</a>
{% endif %}
{% else %}
{% for s in parent.subsections | reverse %}
{% set subsection = get_section(path=s) %}
{% if subsection.permalink == index.permalink %}
{% set_global found_current = true %}
{% else %}
{% if found_current %}
{% if subsection.pages %}
{% set last_page = subsection.pages | last %}
<a href="{{ last_page.permalink }}">
<div class="card my-1">
<div class="card-body py-2">
&larr; {{ last_page.title }}
</div>
</div>
</a>
{% endif %}
{# no break #}
{% set_global found_current = false %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{# Find heavier navigation. There are also three types: #}
{# 1. directly find the heavier if exists, #}
{# 2. find the first page in the subsection, and #}
{# 3. find the first page in the next sibling section. #}
{% if page.higher %}
<a class="ms-auto" href="{{ page.higher.permalink }}">
<div class="card my-1">
<div class="card-body py-2">
{{ page.higher.title }} &rarr;
</div>
</div>
</a>
{% elif page.extra.top %}
{% set index_path = current_section ~ "/_index.md" | trim_start_matches(pat="/") %}
{% set index = get_section(path=index_path) %}
{% set first_subsection = get_section(path=index.subsections | first) %}
{% if first_subsection.pages %}
{% set first_page = first_subsection.pages | first %}
<a class="ms-auto" href="{{ first_page.permalink }}">
<div class="card my-1">
<div class="card-body py-2">
{{ first_page.title }} &rarr;
</div>
</div>
</a>
{% endif %}
{% else %}
{% set index = get_section(path=page.ancestors | reverse | first) %}
{% set parent = get_section(path=index.ancestors | reverse | first)%}
{% for s in parent.subsections %}
{% set subsection = get_section(path=s) %}
{% if subsection.permalink == index.permalink %}
{% set_global found_current = true %}
{% else %}
{% if found_current %}
{% if subsection.pages %}
{% set first_page = subsection.pages | first %}
<a class="ms-auto" href="{{ first_page.permalink }}">
<div class="card my-1">
<div class="card-body py-2">
{{ first_page.title }} &rarr;
</div>
</div>
</a>
{% endif %}
{# no break #}
{% set_global found_current = false %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</div>
{% endmacro %}
@@ -0,0 +1,40 @@
{% macro docs_sidebar(current_section) %}
<div>
<nav class="flex gap-5 md:gap-10 flex-wrap py-8" aria-label="Main navigation">
{% set index_path = current_section ~ "/_index.md" | trim_start_matches(pat="/") %}
{% set index = get_section(path=index_path) %}
{% if index.pages %}
<div>
<h3>{{ index.title }}</h3>
<ul>
{% for page in index.pages %}
<li><a class="{% if current_url == page.permalink %} active{% endif %} text-background"
href="{{ page.permalink | safe }}">{{ page.title }}
</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if index.subsections %}
{% for s in index.subsections %}
{% set subsection = get_section(path=s) %}
{% if subsection.pages %}
<div>
<h3 class="mb-2 md:mb-4 py-1 text-sm font-semibold text-white border-b border-red-100">{{ subsection.title }}</h3>
<ul class="mb-4">
{% for page in subsection.pages %}
<li>
<a class="inline-block w-full py-1 hover:text-white text-sm {% if current_url == page.permalink %} text-white font-semibold {% else %} text-red-200 dark:text-zinc-400{% endif %}"
href="{{ page.permalink | safe }}">{{ page.title }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
{% endif %}
</nav>
</div>
{% endmacro %}
@@ -0,0 +1,22 @@
{% macro docs_toc(page) %}
{% if page.extra.toc %}
<nav>
<ul>
{% for h1 in page.toc %}
<li class="mb-1 px-2 py-1 text-sm font-semibold"><a href="{{ h1.permalink | safe}}">{{
h1.title }}</a></li>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li
class="group flex w-full items-center border border-transparent pl-5 px-2 py-1 hover:underline text-sm text-foreground">
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% endmacro %}
@@ -0,0 +1,23 @@
{% macro footer() %}
<div class="section bg-redrust dark:bg-zinc-800 pt-8">
<div class="container flex flex-col items-center text-center text-background py-8 pb-12">
<div class="mb-8">
<img src="/icon.svg" width="130px" />
</div>
<div class="footer-links">
<a href="https://github.com/loco-rs/loco">
Github
</a>
<a href="https://github.com/loco-rs/loco/blob/master/CODE_OF_CONDUCT.md">
Code of Conduct
</a>
<a href="https://github.com/loco-rs/loco/blob/master/LICENSE">
License
</a>
<a href="https://github.com/loco-rs/loco/blob/master/SECURITY.md">
Security
</a>
</div>
</div>
</div>
{% endmacro %}
@@ -0,0 +1,141 @@
{% macro header(current_section) %}
<header
class=" sticky top-0 z-50 w-full border-border/40 backdrop-blur bg-background">
<div class="container relative flex h-14 md:grid md:grid-cols-[240px_minmax(0,1fr)] xl:max-w-[80rem]">
<div class="mr-4 hidden sm:flex">
<a class="flex mr-4 items-center space-x-2" href="/">
<img src="/icon.svg" width="30px" />
</a>
<nav class="flex w-full bg-transparent items-center gap-4 text-sm">
{% if lang == config.default_language %}
{% set rootsectionpath = "_index.md" %}
{% else %}
{% set rootsectionpath = "_index." ~ lang ~ ".md" %}
{% endif %}
{% set mainsec = get_section(path=rootsectionpath) %}
{% if mainsec.extra.menu.main %}
{% for val in config.extra.menu.main %}
<a class="nav-link text-black dark:text-white {% if current_section == val.section %} active{% endif %}" href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{
val.name
}}
</a>
{% endfor %}
{% elif config.extra.menu.main %}
{% for val in config.extra.menu.main %}
<a class="nav-link text-black {% if current_section == val.section %} active{% endif %}" href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{
val.name
}}
</a>
{% endfor %}
{% else %}
{% endif %}
</nav>
</div>
<div class="flex items-center sm:hidden">
<button onclick="toggleMenu()"
class="inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 py-2 mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:R15u6ja:" data-state="closed">
<svg stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5">
<path d="M3 5H11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
</path>
<path d="M3 12H16" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
</path>
<path d="M3 19H21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
</path>
</svg>
<span class="sr-only">Toggle Menu</span>
</button>
<div class="absolute mt-[106px] left-0 right-0">
<nav id="menu-toggle" class="flex hidden bg-background items-center gap-4 text-sm py-[15px] px-2 w-full">
<a class="flex items-center" href="/">
<img src="/icon.svg" width="30px" />
</a>
{% if lang == config.default_language %}
{% set rootsectionpath = "_index.md" %}
{% else %}
{% set rootsectionpath = "_index." ~ lang ~ ".md" %}
{% endif %}
{% set mainsec = get_section(path=rootsectionpath) %}
{% if mainsec.extra.menu.main %}
{% for val in config.extra.menu.main %}
<a class="nav-link text-black dark:text-white {% if current_section == val.section %} active{% endif %}" href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{
val.name
}}
</a>
{% endfor %}
{% elif config.extra.menu.main %}
{% for val in config.extra.menu.main %}
<a class="nav-link text-black {% if current_section == val.section %} active{% endif %}" href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{
val.name
}}
</a>
{% endfor %}
{% else %}
{% endif %}
</nav>
</div>
</div>
<div class="flex flex-1 items-center justify-between space-x-2">
{% if config.build_search_index %}
<div class="flex-1 lg:flex lg:justify-end">
<form class="navbar-form flex-grow-1 order-7 order-md-3">
<input id="userinput"
class="placeholder-black dark:placeholder-white bg-transparent inline-flex items-center whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-input hover:bg-accent hover:text-accent-foreground px-4 py-2 relative h-8 w-full justify-start rounded-[0.5rem] bg-muted/50 text-sm font-normal shadow-none sm:pr-12 lg:max-w-64"
type="search" placeholder="Search docs..." aria-label="Search docs..." autocomplete="off">
<div id="suggestions" class="shadow rounded"></div>
</form>
</div>
{% endif %}
<nav class="flex items-center">
<button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode">
<span class="toggle-dark hidden"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-moon">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg></span>
<span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg></span>
</button>
{% if config.extra.menu.social %}
{% for val in config.extra.menu.social %}
<div
class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground py-2 h-8 w-8 px-0">
<a class="nav-link" href="{{ val.url | safe }}">{{ val.pre | safe }}<span class="sr-only">{{
val.name}}</span></a>
</div>
{% endfor %}
{% else %}
{% endif %}
</nav>
</div>
</div>
</header>
<!-- JavaScript to toggle menu visibility -->
<script>
function toggleMenu() {
var menu = document.getElementById('menu-toggle');
menu.classList.toggle('hidden');
}
</script>
{% endmacro %}
@@ -0,0 +1,8 @@
{% macro javascript() %}
<script type="text/javascript" src="{{ get_url(path="js/main.js") | safe }}" defer></script>
{% if config.build_search_index %}
<script type="text/javascript" src="{{ get_url(path="plugins/elasticlunr.min.js") | safe }}" defer></script>
<script type="text/javascript" src="{{ get_url(path="search_index." ~ lang ~ ".js") | safe }}" defer></script>
<script type="text/javascript" src="{{ get_url(path="js/search.js") | safe }}" defer></script>
{% endif %}
{% endmacro %}
@@ -0,0 +1,6 @@
{% macro page_publish_metadata(page) %}
<div class="mb-8 text-sm text-gray-500">
{{ page.date | date(format=config.extra.timeformat | default(value="%A, %B %e, %Y"),
timezone=config.extra.timezone | default(value="America/New_York")) }}
</div>
{% endmacro %}
@@ -0,0 +1,14 @@
{% macro youtube(id, autoplay=false, class=false) %}
<div class="video-container">
<iframe
src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}"
webkitallowfullscreen
mozallowfullscreen
allowfullscreen>
</iframe>
</div>
{% endmacro %}
{% macro thumb(id, class=false) %}
<img class="max-w-[200px] max-h-[230px] rounded-md" {% if class %}class="{{class}}"{% endif %} src="https://i3.ytimg.com/vi/{{id}}/hqdefault.jpg" />
{% endmacro %}