Add a page-scoped js/src/post-form.js bundle (built ESM + code-splitting so U4's heic-to becomes a deferred chunk) loaded only by post-form.html.twig via a new base head_assets block. EasyMDE replaces the bare textarea with a minimal toolbar (bold/italic/list/link/preview), FA-free via CSS glyphs, and syncs codemirror.save() on change + capture-phase submit so the inline required-field validator and payload see the live value. Refs R7, R15, KTD2, KTD3.
39 lines
1.8 KiB
Twig
39 lines
1.8 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
|
|
{% do assets.addCss('theme://css/tokens.css') %}
|
|
{% do assets.addCss('theme://css/style.css') %}
|
|
{% do assets.addCss('theme://css-compiled/main.css') %}
|
|
{% do assets.addJs('theme://js/main.js', {group: 'bottom'}) %}
|
|
{% do assets.addJs('theme://js/nav.js', {group: 'bottom'}) %}
|
|
{% block map_assets %}{% endblock %}
|
|
{% block head_assets %}{% endblock %}
|
|
{{ assets.css()|raw }}
|
|
{{ assets.js()|raw }}
|
|
</head>
|
|
<body class="{% if page.template == 'home' or page.template == 'trip' %}home-page{% endif %}{% if page.template == 'story' %} template-story{% endif %}">
|
|
<a class="skip-link" href="#main-content">Skip to main content</a>
|
|
<header class="site-header">
|
|
<a class="site-title" href="{{ base_url_absolute }}">into the east</a>
|
|
{% block nav %}
|
|
<button class="nav-toggle" type="button" aria-label="Open menu" aria-controls="site-nav" aria-expanded="false">
|
|
<span class="nav-toggle__bar"></span>
|
|
<span class="nav-toggle__bar"></span>
|
|
<span class="nav-toggle__bar"></span>
|
|
</button>
|
|
<nav class="site-nav" id="site-nav" aria-label="Main navigation">
|
|
<a href="{{ base_url_absolute }}"{% if page.template == 'home' %} aria-current="page"{% endif %}>Home</a>
|
|
<a href="{{ base_url_absolute }}/trips"{% if page.template == 'trips' %} aria-current="page"{% endif %}>Past Trips</a>
|
|
</nav>
|
|
{% endblock %}
|
|
</header>
|
|
<main class="site-main" id="main-content">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
{{ assets.js('bottom')|raw }}
|
|
</body>
|
|
</html>
|