diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-25 11:30:45 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-25 11:30:45 +0200 |
commit | 37b3cf9fb2a56cfa980844f527d834916b38cca8 (patch) | |
tree | 288a3b3ddc7e1fe115d568480f44313173183c2d /src/hydrilla/common_jinja_templates | |
parent | 44c09ab27ce8407f4fc5c75df9cdf309df8463eb (diff) | |
download | haketilo-hydrilla-37b3cf9fb2a56cfa980844f527d834916b38cca8.tar.gz haketilo-hydrilla-37b3cf9fb2a56cfa980844f527d834916b38cca8.zip |
[proxy] make Haketilo popup functional
* Ad hoc payload creation was additionally fixed in this commit.
* Addition on newly created script blocking/allowing rules to pattern tree was additionally fixed in this commit. It is no longer necessary to restart Haketilo for new rules to come into effect.
Diffstat (limited to 'src/hydrilla/common_jinja_templates')
-rw-r--r-- | src/hydrilla/common_jinja_templates/base.html.jinja | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/hydrilla/common_jinja_templates/base.html.jinja b/src/hydrilla/common_jinja_templates/base.html.jinja index 08178b3..0c29c0c 100644 --- a/src/hydrilla/common_jinja_templates/base.html.jinja +++ b/src/hydrilla/common_jinja_templates/base.html.jinja @@ -67,7 +67,15 @@ code in a proprietary work, I am not going to enforce this in court. </label> {% endmacro %} -{% macro form_field(field_name, required=true, sep_after=true, height=none) %} +{% + macro form_field( + field_name, + required = true, + sep_after = true, + height = none, + initial_value = none + ) +%} <div class="flex-row"> {% set attrs = { @@ -79,9 +87,11 @@ code in a proprietary work, I am not going to enforce this in court. %} {% if height is none %} + {% do attrs.update({'value': initial_value}) %} <input{{ attrs|xmlattr }}> {% else %} - <textarea{{ attrs|xmlattr }}></textarea> + {% set value = initial_value|default('', true) %} + <textarea{{ attrs|xmlattr }}>{{ value }}</textarea> {% endif %} </div> @@ -90,10 +100,17 @@ code in a proprietary work, I am not going to enforce this in court. {% endif %} {% endmacro %} +{% macro verbatim(code) %} + <code><pre>{{ code }}</pre></code> +{% endmacro %} + <html> <head> {% block head %} - <style> + {% if style_nonce is defined %} + {% set style_attrs = {'nonce': style_nonce} %} + {% endif %} + <style{{ style_attrs|default({})|xmlattr }}> {% block style %} body { color: #444; @@ -213,6 +230,13 @@ code in a proprietary work, I am not going to enforce this in court. border-radius: 0; } + code > pre { + overflow-x: auto; + background-color: #f0f0f0; + padding: 5px; + border: 1px solid #e3e3e3; + } + .hide { display: none !important; } |