From be67cb59512145a0fa5b8c6686996f3876618570 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 15 Feb 2021 14:38:20 +0100 Subject: [PATCH] top link in client list --- cards/index.cgi | 4 ++-- l10n.sh | 1 + style.css | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cards/index.cgi b/cards/index.cgi index 0bb4f82..b48e54e 100755 --- a/cards/index.cgi +++ b/cards/index.cgi @@ -22,9 +22,9 @@ list_hi_companies(){ { w_filter_diag printf ' [form class="newcard" action="/cards/new_card.sh" method="POST" - [a href="#top" . %s] [button type="submit" %s] - ]' "$(l10n top)" "$(l10n newcard)" + [a href="#top" . %s] + ]' "$(l10n newcard)" "$(l10n page_top)" [ "$edit" ] && edit_card "$edit" list_cards } | yield_page cards #/cards/cards.css diff --git a/l10n.sh b/l10n.sh index cab5bde..66cafc7 100755 --- a/l10n.sh +++ b/l10n.sh @@ -92,6 +92,7 @@ l10n_global() { edit_addfieldtext) printf %s "Neues Feld";; edit_addfield) printf %s "+";; edit_deletefield) printf %s "X";; + page_top) printf %s "⬆ Seitenanfang";; filter_label) printf %s "Filter";; filter_item) printf %s "Eingrenzung nach";; diff --git a/style.css b/style.css index 5edc969..8644f0b 100644 --- a/style.css +++ b/style.css @@ -45,8 +45,14 @@ form.filter button[value=export_csv] { margin-left: 1em; } body.courses form .order { display: inline-block; margin-right: 2em;} -body.cards form.newcard { display: flex; } +body.cards form.newcard { + position: sticky; + top: 0; + background-color: #FFF; + z-index: 2; +} body.cards form.newcard input[name=seed] { flex: 1; } +body.cards form.newcard a[href="#top"] { float: right; } /* ============ LIST ITEMS, Generic ============= */ -- 2.39.2