feat: home page routing — real / route, new nav (Home + Past Trips)

This commit is contained in:
2026-06-19 15:34:12 +02:00
parent fbc4fc195b
commit 035c92f293
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ languages:
pages_fallback_only: false pages_fallback_only: false
debug: false debug: false
home: home:
alias: /trips/japan-korea-2026/dailies alias: /home
hide_in_urls: false hide_in_urls: false
pages: pages:
type: flex type: flex
+5
View File
@@ -0,0 +1,5 @@
---
title: Home
visible: false
routable: true
---
@@ -12,16 +12,15 @@
{{ assets.css()|raw }} {{ assets.css()|raw }}
{{ assets.js()|raw }} {{ assets.js()|raw }}
</head> </head>
<body class="{% if page.template == 'map' %}map-page{% endif %}"> <body class="{% if page.template == 'map' %}map-page{% endif %}{% if page.template == 'home' %} home-page{% endif %}">
<header class="site-header"> <header class="site-header">
<a class="site-title" href="{{ base_url_absolute }}">into the east</a> <a class="site-title" href="{{ base_url_absolute }}">into the east</a>
{% set active_trip = config.site.active_trip %} {% block nav %}
{% set trip_base = '/trips/' ~ active_trip %}
<nav class="site-nav" aria-label="Main navigation"> <nav class="site-nav" aria-label="Main navigation">
<a href="{{ base_url_absolute }}{{ trip_base }}/dailies"{% if page.url starts with trip_base ~ '/dailies' or page.template == 'entry' %} aria-current="page"{% endif %}>Journal</a> <a href="{{ base_url_absolute }}"{% if page.template == 'home' %} aria-current="page"{% endif %}>Home</a>
<a href="{{ base_url_absolute }}{{ trip_base }}/map"{% if page.url starts with trip_base ~ '/map' %} aria-current="page"{% endif %}>Map</a> <a href="{{ base_url_absolute }}trips"{% if page.template == 'trips' %} aria-current="page"{% endif %}>Past Trips</a>
<a href="{{ base_url_absolute }}{{ trip_base }}/stats"{% if page.url starts with trip_base ~ '/stats' %} aria-current="page"{% endif %}>Stats</a>
</nav> </nav>
{% endblock %}
</header> </header>
<main class="site-main"> <main class="site-main">
{% block content %}{% endblock %} {% block content %}{% endblock %}