From 629c12143f6045ef27d1f6da5f4f345a695f467f Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 25 Dec 2024 10:54:38 +0100 Subject: [PATCH] Make popup qr codes for external links (#541) --- .../stregsystem/external_link_qrs/code.svg | 15 ++++++ .../stregsystem/external_link_qrs/tos.svg | 15 ++++++ .../static/stregsystem/stregsystem.css | 47 +++++++++++++++---- stregsystem/templates/stregsystem/base.html | 4 +- stregsystem/templates/stregsystem/cross.html | 13 +++++ .../templates/stregsystem/external_link.html | 11 +++++ 6 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 stregsystem/static/stregsystem/external_link_qrs/code.svg create mode 100644 stregsystem/static/stregsystem/external_link_qrs/tos.svg create mode 100644 stregsystem/templates/stregsystem/cross.html create mode 100644 stregsystem/templates/stregsystem/external_link.html diff --git a/stregsystem/static/stregsystem/external_link_qrs/code.svg b/stregsystem/static/stregsystem/external_link_qrs/code.svg new file mode 100644 index 00000000..87472928 --- /dev/null +++ b/stregsystem/static/stregsystem/external_link_qrs/code.svg @@ -0,0 +1,15 @@ + + + https://github.com/f-klubben/stregsystemet + + diff --git a/stregsystem/static/stregsystem/external_link_qrs/tos.svg b/stregsystem/static/stregsystem/external_link_qrs/tos.svg new file mode 100644 index 00000000..497dad83 --- /dev/null +++ b/stregsystem/static/stregsystem/external_link_qrs/tos.svg @@ -0,0 +1,15 @@ + + + https://fklub.dk/tos + + diff --git a/stregsystem/static/stregsystem/stregsystem.css b/stregsystem/static/stregsystem/stregsystem.css index adc73782..4f484f34 100644 --- a/stregsystem/static/stregsystem/stregsystem.css +++ b/stregsystem/static/stregsystem/stregsystem.css @@ -69,16 +69,47 @@ ol span { font-weight: normal; } -button.linkalike { - background: none; - border: none; +button { cursor: pointer; - font: inherit; - text-decoration: underline; - color: LinkText; - &:active{ - color: ActiveText; + &.linkalike { + background: none; + border: none; + cursor: pointer; + font: inherit; + text-decoration: underline; + color: LinkText; + + &:active{ + color: ActiveText; + } + } +} + +.external-link-popover { + font-size: 1.5em; + padding: 1em; + + & p { + margin: 0; + } + & button { + position: absolute; + top: 0; + right: 0; + padding: .1em; + background: none; + border: none; + + & svg { + width: 2.2em; + height: 2.2em; + } + } + & img { + width: 100vw; + max-width: 40vmin; + max-height: 40vmin; } } diff --git a/stregsystem/templates/stregsystem/base.html b/stregsystem/templates/stregsystem/base.html index 4995a244..2a977cb4 100644 --- a/stregsystem/templates/stregsystem/base.html +++ b/stregsystem/templates/stregsystem/base.html @@ -53,8 +53,8 @@

{% theme_content %} diff --git a/stregsystem/templates/stregsystem/cross.html b/stregsystem/templates/stregsystem/cross.html new file mode 100644 index 00000000..156ae2f2 --- /dev/null +++ b/stregsystem/templates/stregsystem/cross.html @@ -0,0 +1,13 @@ + + {{ title }} + + diff --git a/stregsystem/templates/stregsystem/external_link.html b/stregsystem/templates/stregsystem/external_link.html new file mode 100644 index 00000000..62794620 --- /dev/null +++ b/stregsystem/templates/stregsystem/external_link.html @@ -0,0 +1,11 @@ +{% load static %} + + +