aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/common_jinja_templates
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-26 16:05:49 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-26 16:05:49 +0200
commitf78ae614702a79d43a6083f3d8880ac9cb026f05 (patch)
treef8f426bcb6ceb5e69f765c7d8d274b3b65944d2e /src/hydrilla/common_jinja_templates
parent01834fe901117809490fbf59b104833bdd88ea20 (diff)
downloadhaketilo-hydrilla-f78ae614702a79d43a6083f3d8880ac9cb026f05.tar.gz
haketilo-hydrilla-f78ae614702a79d43a6083f3d8880ac9cb026f05.zip
[proxy] Make some improvements to the URL patterns doc page internationalization and make it accessible from items import page
Diffstat (limited to 'src/hydrilla/common_jinja_templates')
-rw-r--r--src/hydrilla/common_jinja_templates/base.html.jinja41
1 files changed, 39 insertions, 2 deletions
diff --git a/src/hydrilla/common_jinja_templates/base.html.jinja b/src/hydrilla/common_jinja_templates/base.html.jinja
index f8a5200..cdaffe3 100644
--- a/src/hydrilla/common_jinja_templates/base.html.jinja
+++ b/src/hydrilla/common_jinja_templates/base.html.jinja
@@ -63,7 +63,10 @@ code in a proprietary work, I am not going to enforce this in court.
{% macro label(label_text, label_name=none) %}
{% set for_attr = label_name and (label_name + "_field") %}
<label {{ {'for': for_attr, 'class': 'section-label'}|xmlattr }}>
- {{ label_text }}
+ <span>{{ label_text }}</span>
+ {% if caller is defined %}
+ {{ caller() }}
+ {% endif %}
</label>
{% endmacro %}
@@ -116,6 +119,10 @@ code in a proprietary work, I am not going to enforce this in court.
</li>
{% endmacro %}
+{% macro doc_link(doc_url) %}
+ <a class="doc-link" href="{{ doc_url }}" target="_blank"></a>
+{% endmacro %}
+
<html>
<head>
{% block head %}
@@ -165,7 +172,7 @@ code in a proprietary work, I am not going to enforce this in court.
margin: 0 0 10px 0;
}
- .section-label {
+ .section-label > span:first-child {
font-style: italic;
text-decoration: underline #ccc;
}
@@ -242,6 +249,36 @@ code in a proprietary work, I am not going to enforce this in court.
border-radius: 0;
}
+ .doc-link {
+ display: inline-block;
+ width: 1.2em;
+ height: 1em;
+ }
+
+ .doc-link::after {
+ content: "?";
+ position:absolute;
+ display: inline-block;
+ width:1.2em;
+ height:1.2em;
+ line-height: 1.2em;
+ border: 2px solid #ffffff88;
+ border-radius: 1em;
+ transform: translate(1px, calc(-0.1em - 1px));
+ background-color: #4caf50;
+ color:white;
+ text-align: center;
+ font-style: normal;
+ font-family: initial;
+ font-size: 90%;
+ font-weight:bold;
+ }
+
+ .doc-link:hover::after {
+ color: #ffffffaa;
+ border-color: #4caf50;
+ }
+
code > pre {
overflow-x: auto;
background-color: #f0f0f0;