diff --git a/babel.cfg b/babel.cfg index 9ba026f..d82fb6e 100644 --- a/babel.cfg +++ b/babel.cfg @@ -1,3 +1,4 @@ [python: snikket_web/**.py] [jinja2: snikket_web/templates/**.html] +[jinja2: snikket_web/templates/**.j2] extensions=jinja2.ext.autoescape,jinja2.ext.with_ diff --git a/snikket_web/scss/app.scss b/snikket_web/scss/app.scss index 7dc75da..5a34479 100644 --- a/snikket_web/scss/app.scss +++ b/snikket_web/scss/app.scss @@ -789,6 +789,21 @@ table { } } +.long-url-link { + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.link-col { + width: $w-l6; +} + +#clipboard-result + span { + display: none; +} + /* linearisation / responsive stuff */ @@ -828,7 +843,6 @@ table { .copy-to-clipboard { cursor: pointer; - margin-left: 0.5em; font-style: normal; text-decoration: none; } diff --git a/snikket_web/templates/admin_edit_invite.html b/snikket_web/templates/admin_edit_invite.html index 21aa78a..8c8e60e 100644 --- a/snikket_web/templates/admin_edit_invite.html +++ b/snikket_web/templates/admin_edit_invite.html @@ -1,36 +1,21 @@ {% extends "admin_app.html" %} +{% from "library.j2" import showuri %} {% block head_lead %} {{ super() }} {% include "copy-snippet.html" %} {% endblock %} - -{% macro clipboard_button(caller=None) -%} -{%- set text = caller() -%} -📋 -{%- endmacro %} - -{% macro showuri(uri, caller=None) %} -{%- if uri is none -%} -— -{%- else -%} -{{ uri }} {% call clipboard_button() %}{{ uri }}{% endcall %} -{%- endif -%} -{% endmacro %} - {% block content %}