UPdate.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
{% extends 'page.html' %}
|
||||
{% from 'macros/components.html' import method_signature, property_signature, class_header, admonition, code_block %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'includes/head_meta.html' %}
|
||||
<title>{% block title %}{{ page_title }}{% endblock %} - {{ site.name }} Manual</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Roboto+Slab:wght@400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ static_prefix }}css/style.css">
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<a href="#main-content" class="skip-link">Skip to main content</a>
|
||||
<button class="mobile-menu-toggle" aria-label="Toggle navigation menu" aria-expanded="false" aria-controls="sidebar-nav">Menu</button>
|
||||
<div class="container">
|
||||
{% include 'includes/sidebar.html' %}
|
||||
<main class="content" id="main-content">
|
||||
{% block main %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
<script src="{{ static_prefix }}js/main.js"></script>
|
||||
<script>window.SEARCH_INDEX = {{ search_index_json|safe }};</script>
|
||||
<script src="{{ static_prefix }}js/search.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
{% extends 'base.html' %}
|
||||
{% from 'macros/components.html' import card_grid, module_grid %}
|
||||
|
||||
{% block main %}
|
||||
<div class="hero">
|
||||
<h1>{{ site.name }} Manual</h1>
|
||||
<p>{{ site.description }}</p>
|
||||
<div class="hero-buttons">
|
||||
<a href="{{ static_prefix }}getting-started/index.html" class="primary-btn">Get Started</a>
|
||||
<a href="{{ static_prefix }}api/index.html" class="secondary-btn">API Reference</a>
|
||||
</div>
|
||||
</div>
|
||||
<article>
|
||||
{% block article %}{% endblock %}
|
||||
</article>
|
||||
{% include 'includes/page_footer.html' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
<nav class="breadcrumb">
|
||||
<a href="{{ static_prefix }}index.html">Home</a>
|
||||
{% for crumb in breadcrumb %}
|
||||
<span class="separator">/</span>
|
||||
{% if loop.last %}
|
||||
<span>{{ crumb.title }}</span>
|
||||
{% else %}
|
||||
<a href="{{ static_prefix }}{{ crumb.url }}">{{ crumb.title }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
@@ -0,0 +1,14 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ seo.description|default(page_description)|default(site.description) }}">
|
||||
<meta name="keywords" content="{{ seo.keywords|default([])|join(', ') }}">
|
||||
<meta name="author" content="{{ site.author }}">
|
||||
|
||||
<meta property="og:title" content="{{ seo.og_title|default(page_title ~ ' - ' ~ site.name) }}">
|
||||
<meta property="og:description" content="{{ seo.description|default(page_description)|default(site.description) }}">
|
||||
<meta property="og:type" content="{{ seo.og_type|default('website') }}">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{{ seo.og_title|default(page_title ~ ' - ' ~ site.name) }}">
|
||||
<meta name="twitter:description" content="{{ seo.description|default(page_description)|default(site.description) }}">
|
||||
@@ -0,0 +1,11 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
<footer class="page-footer">
|
||||
{% if prev_page %}
|
||||
<a href="{{ static_prefix }}{{ prev_page.url }}" class="prev">{{ prev_page.title }}</a>
|
||||
{% else %}
|
||||
<span></span>
|
||||
{% endif %}
|
||||
{% if next_page %}
|
||||
<a href="{{ static_prefix }}{{ next_page.url }}" class="next">{{ next_page.title }}</a>
|
||||
{% endif %}
|
||||
</footer>
|
||||
@@ -0,0 +1,15 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
<div class="search-container" role="search">
|
||||
<input type="text"
|
||||
id="search-input"
|
||||
placeholder="Search... (/)"
|
||||
autocomplete="off"
|
||||
aria-label="Search documentation"
|
||||
aria-autocomplete="list"
|
||||
aria-controls="search-results"
|
||||
aria-expanded="false">
|
||||
<div id="search-results"
|
||||
class="search-dropdown"
|
||||
role="listbox"
|
||||
aria-label="Search results"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<h1><a href="{{ static_prefix }}index.html">{{ site.name }}</a></h1>
|
||||
<div class="version">v{{ site.version }}</div>
|
||||
</div>
|
||||
{% include 'includes/search_box.html' %}
|
||||
<nav class="sidebar-nav" id="sidebar-nav" aria-label="Main navigation">
|
||||
{% for section in nav.sections %}
|
||||
<div class="section">
|
||||
<span class="section-title">{{ section.title }}</span>
|
||||
<ul>
|
||||
{% for page in section.pages %}
|
||||
{% set page_url = section.directory ~ "/" ~ page.file ~ ".html" %}
|
||||
{% set is_active = current_path == page_url %}
|
||||
<li><a href="{{ static_prefix }}{{ page_url }}"{% if is_active %} class="active"{% endif %}>{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</aside>
|
||||
@@ -0,0 +1,82 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
|
||||
{% macro method_signature(name, params=[], returns=None, arrow='→') %}
|
||||
<div class="method-signature">
|
||||
<span class="method-name">{{ name }}</span>({% for p in params %}<span class="param">{{ p }}</span>{% if not loop.last %}, {% endif %}{% endfor %}){% if returns %} {{ arrow }} <span class="type">{{ returns }}</span>{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro property_signature(name, returns=None, arrow='→') %}
|
||||
<div class="method-signature">
|
||||
<span class="method-name">{{ name }}</span>{% if returns %} {{ arrow }} <span class="type">{{ returns }}</span>{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admonition(type, content, title=None) %}
|
||||
<div class="admonition {{ type }}">
|
||||
<div class="admonition-title">{{ title or type|title }}</div>
|
||||
<p>{{ content }}</p>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro code_block(code, lang="wren") %}
|
||||
<pre><code>{{ code }}</code></pre>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro class_header(name, description=None) %}
|
||||
<div class="class-header">
|
||||
<h3>{{ name }}</h3>
|
||||
{% if description %}<p>{{ description }}</p>{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro param_list(params) %}
|
||||
<ul class="param-list">
|
||||
{% for p in params %}
|
||||
<li><span class="param-name">{{ p.name }}</span> <span class="param-type">({{ p.type }})</span> - {{ p.description }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro toc(items) %}
|
||||
<div class="toc">
|
||||
<h4>On This Page</h4>
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
<li><a href="#{{ item.anchor }}">{{ item.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro card_grid(cards) %}
|
||||
<div class="card-grid">
|
||||
{% for card in cards %}
|
||||
<div class="card">
|
||||
<h3><a href="{{ card.href }}">{{ card.title }}</a></h3>
|
||||
<p>{{ card.description }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro module_grid(modules) %}
|
||||
<div class="module-grid">
|
||||
{% for m in modules %}
|
||||
<a href="{{ m.href }}" class="module-card">{{ m.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro data_table(headers, rows) %}
|
||||
<table>
|
||||
<tr>{% for h in headers %}<th>{{ h }}</th>{% endfor %}</tr>
|
||||
{% for row in rows %}
|
||||
<tr>{% for cell in row %}<td>{{ cell|safe }}</td>{% endfor %}</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro example_output(output) %}
|
||||
<div class="example-output">{{ output }}</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{# retoor <retoor@molodetz.nl> #}
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'includes/breadcrumb.html' %}
|
||||
<article>
|
||||
{% block article %}{% endblock %}
|
||||
</article>
|
||||
{% include 'includes/page_footer.html' %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user