From b6bba140654c18687e05874e822cccbef6fea4fa Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 17 Feb 2025 18:19:21 +0200 Subject: Improve templating --- browser/static/htmp.js | 10 ---------- browser/static/styles.css | 10 ++++++++++ browser/templates/frag_aside.html.j2 | 21 +++++++++++++++++---- browser/templates/frag_aside_link.html.j2 | 9 +++++++++ browser/templates/frag_error.html.j2 | 6 ++++++ browser/templates/frag_form_find.html.j2 | 2 +- 6 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 browser/templates/frag_aside_link.html.j2 diff --git a/browser/static/htmp.js b/browser/static/htmp.js index 36deae2..62956a4 100644 --- a/browser/static/htmp.js +++ b/browser/static/htmp.js @@ -39,13 +39,3 @@ document.querySelectorAll("form[htmp]").forEach(function (el) { el.action = action.toString(); el.target = "htmp"; }); - -document.querySelectorAll("a[htmp]").forEach(function (el) { - const re = el.attributes.replace.value; - - const href = new URL(el.href); - href.hash = re; - href.searchParams.set("htmp", re); - el.target = "htmp"; - el.href = href.toString(); -}); diff --git a/browser/static/styles.css b/browser/static/styles.css index 0faa49f..82bed74 100644 --- a/browser/static/styles.css +++ b/browser/static/styles.css @@ -78,6 +78,16 @@ input[type="submit"] { margin-top: 20px; } +button.link, +input[type="submit"].link { + background: none; + color: var(--blue); + padding: 0; + margin: 0; + text-decoration: underline; + font-family: "Inclusive Sans"; +} + button.red, input[type="submit"].red { background-color: var(--red); diff --git a/browser/templates/frag_aside.html.j2 b/browser/templates/frag_aside.html.j2 index 7ec10ad..6c5658f 100644 --- a/browser/templates/frag_aside.html.j2 +++ b/browser/templates/frag_aside.html.j2 @@ -1,13 +1,26 @@ +{# +Params + selected_form Form fragment to include +#} +