feat: add breadcrumb navigation to both views

Replacing the page hides the forum's own trail along with everything else,
so a thread became a dead end: the only ways back to the parent forum were
the browser's back button or editing the URL by hand. Deep in a long thread
neither is workable.

The bar has to be fixed rather than sticky. The view root carries
overflow:hidden to contain phantom horizontal overflow, which would make it
the scrollport a sticky bar sticks to — one that never scrolls. Its top
clearance hangs off a body class so pages without a trail keep their full
height instead of an empty strip.

Board index still leads to a page the script does not rebuild; that would
need a forum overview of its own.

Debug flag off for daily use.
This commit is contained in:
Andre
2026-08-02 14:38:25 +02:00
parent eff957ed07
commit bc9c4937ff
3 changed files with 91 additions and 4 deletions
+16
View File
@@ -27,6 +27,14 @@ them. `per_page` is read from the `jumpto()` function the forum embeds in the
page; without it, only first page and the original previous/next links remain
available.
Both views carry a fixed breadcrumb bar at the top, taken from the forum's own
`Board index » … » Main Forum` trail. Without it there is no way back out of a
thread, because the original page is hidden and phpBB links the parent forum
nowhere else. The bar scrolls horizontally if the trail is too long for the
screen, and is left out entirely on pages that do not carry a trail. Note that
`Board index` leads to `index.php`, which the script does not rebuild — that
page arrives in its desktop layout.
The script runs at `document-start`, injects a mobile viewport meta tag, and
carries a `DEBUG` flag. While `DEBUG` is `true`, a green diagnostic overlay is
prepended to the page showing which view was chosen and how many rows were
@@ -183,6 +191,14 @@ Seitenlinks übernommen, weil phpBB davon immer nur eine Handvoll anzeigt.
einbettet; fehlt sie, bleiben nur die erste Seite und die ursprünglichen
Zurück-/Weiter-Links nutzbar.
Beide Ansichten haben oben eine fixierte Brotkrumenleiste, übernommen aus dem
`Board index » … » Main Forum`-Pfad des Forums. Ohne sie führt aus einem Thread
kein Weg zurück, weil die Originalseite ausgeblendet ist und phpBB das
Elternforum nirgends sonst verlinkt. Die Leiste lässt sich waagerecht schieben,
wenn der Pfad breiter ist als der Bildschirm, und entfällt auf Seiten ohne
Pfadangabe. `Board index` führt auf `index.php` — diese Seite baut das Script
nicht um, sie erscheint im Desktop-Layout.
Das Script läuft bei `document-start`, setzt ein mobiles Viewport-Meta-Tag und
hat ein `DEBUG`-Flag. Solange `DEBUG` auf `true` steht, wird ein grünes
Diagnose-Overlay über die Seite gelegt, das zeigt, welche Ansicht gewählt wurde