fix: point entry/story back button at the trip page
The back pills use history.back() when history exists, but fall back to href=page.parent().url for direct-landing visitors (shared link, new tab). After Phase 1 that fallback pointed at the retired /dailies (404) and /stories (redirect) containers. Point it at the trip page (grandparent) instead, which is where the feed now lives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<a class="back-pill entry-back-fixed" href="{{ page.parent().url }}" onclick="if(history.length > 1){ history.back(); return false; }">← Back</a>
|
||||
<a class="back-pill entry-back-fixed" href="{{ page.parent().parent().url }}" onclick="if(history.length > 1){ history.back(); return false; }">← Back</a>
|
||||
|
||||
{% set entry = page %}
|
||||
{% include 'partials/entry-journal.html.twig' %}
|
||||
|
||||
<footer class="entry-footer">
|
||||
<a class="back-pill" href="{{ page.parent().url }}" onclick="if(history.length > 1){ history.back(); return false; }">← Back</a>
|
||||
<a class="back-pill" href="{{ page.parent().parent().url }}" onclick="if(history.length > 1){ history.back(); return false; }">← Back</a>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user