feat: home page routing — real / route, new nav (Home + Past Trips)
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ languages:
|
||||
pages_fallback_only: false
|
||||
debug: false
|
||||
home:
|
||||
alias: /trips/japan-korea-2026/dailies
|
||||
alias: /home
|
||||
hide_in_urls: false
|
||||
pages:
|
||||
type: flex
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Home
|
||||
visible: false
|
||||
routable: true
|
||||
---
|
||||
@@ -12,16 +12,15 @@
|
||||
{{ assets.css()|raw }}
|
||||
{{ assets.js()|raw }}
|
||||
</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">
|
||||
<a class="site-title" href="{{ base_url_absolute }}">into the east</a>
|
||||
{% set active_trip = config.site.active_trip %}
|
||||
{% set trip_base = '/trips/' ~ active_trip %}
|
||||
{% block nav %}
|
||||
<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 }}{{ trip_base }}/map"{% if page.url starts with trip_base ~ '/map' %} aria-current="page"{% endif %}>Map</a>
|
||||
<a href="{{ base_url_absolute }}{{ trip_base }}/stats"{% if page.url starts with trip_base ~ '/stats' %} aria-current="page"{% endif %}>Stats</a>
|
||||
<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">
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user