From: Lady <redacted> Date: Sun, 18 Sep 2022 08:15:45 +0000 (-0700) Subject: Add backnavigation to various listings X-Git-Tag: 0.2.0~4 X-Git-Url: https://git.ladys.computer/x_status_git/commitdiff_plain/ba9160c0bfb50ccb17613c15a95a28a3880fde32?ds=inline Add backnavigation to various listings --- diff --git a/statuses.html b/statuses.html index 60d5aa0..7571990 100644 --- a/statuses.html +++ b/statuses.html @@ -5,7 +5,7 @@ body{ Display: Grid; Box-Sizing: Border-Box; Margin: Auto; Padding-Inline: 1REM; Min-Block-Size: 100VH; Inline-Size: 100%; Max-Inline-Size: 45REM; Align-Content: Center; Justify-Content: Stretch; Font-Family: Sans-Serif } </STYLE> <H1>Statuses</H1> -<NAV><UL></UL></NAV> +<NAV><P><A HRef=/>Home</A></P><UL></UL></NAV> <SCRIPT Type=module> const ul = document.body.querySelector("nav>ul") fetch(`${location}.jsonld`) diff --git a/topic.html b/topic.html index ff648db..ea9b384 100644 --- a/topic.html +++ b/topic.html @@ -5,11 +5,17 @@ body{ Display: Grid; Box-Sizing: Border-Box; Margin: Auto; Padding-Inline: 1REM; Min-Block-Size: 100VH; Inline-Size: 100%; Max-Inline-Size: 45REM; Align-Content: Center; Justify-Content: Stretch; Font-Family: Sans-Serif } </STYLE> <H1>Topic Feed</H1> -<NAV><DL></DL></NAV> +<NAV><P><A HRef=/>Home</A></P><DL></DL></NAV> <SCRIPT Type=module> const nav = document.body.querySelector("nav") const dl = nav.querySelector("dl") const parser = new DOMParser +if (location.pathname.startsWith("/topics/")) { + const a = nav + .insertBefore(document.createElement("p"), dl) + .appendChild(document.createElement("a")) + a.href = "/topics/" + a.textContent = "Topics" } fetch(`${location}.jsonld`) .then($ => $.json()) .then(meta => { diff --git a/topics.html b/topics.html index b0c5017..7643195 100644 --- a/topics.html +++ b/topics.html @@ -5,7 +5,7 @@ body{ Display: Grid; Box-Sizing: Border-Box; Margin: Auto; Padding-Inline: 1REM; Min-Block-Size: 100VH; Inline-Size: 100%; Max-Inline-Size: 45REM; Align-Content: Center; Justify-Content: Stretch; Font-Family: Sans-Serif } </STYLE> <H1>Topics</H1> -<NAV><UL></UL></NAV> +<NAV><P><A HRef=/>Home</A></P><UL></UL></NAV> <SCRIPT Type=module> const ul = document.body.querySelector("nav>ul") fetch(`${location}.jsonld`)