From 654548137937d5346d58a8757fd266580f29a377 Mon Sep 17 00:00:00 2001 From: Giacomo Lanza <37865804+Zack-83@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:44:43 +0100 Subject: [PATCH 1/2] ein bisschen Farbe :-) --- src/terms/static/css/style.css | 41 +++++++++++++++++++++++++++++++ src/terms/templates/_element.html | 13 +++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/terms/static/css/style.css b/src/terms/static/css/style.css index 2869837..ce14e2c 100644 --- a/src/terms/static/css/style.css +++ b/src/terms/static/css/style.css @@ -53,3 +53,44 @@ main { margin-top: 6rem; margin-bottom: 6rem; } + +.code-questions { + color: rgb(16, 31, 112); + background-color: rgba(16, 31, 112, 0.1); +} +.code-options { + color: rgb(255, 100, 0); + background-color: rgba(255, 100, 0, 0.1); +} +.code-options-provider { + color: white; + background-color: rgba(255, 100, 0, 0.8); +} +.code-conditions { + color: rgb(128, 0, 128); + background-color: rgba(128, 0, 128, 0.1); +} +.code-tasks { + color: rgb(128, 0, 0); + background-color: rgba(128, 0, 0, 0.1); +} +.code-views { + color: rgb(0, 128, 0); + background-color: rgba(0, 128, 0, 0.1); +} +.code-order { + color: rgb(96, 96, 96); + background-color: rgba(96, 96, 96, 0.1); +} +.code-default { + color: rgb(96, 96, 96); + background-color: rgba(96, 96, 96, 0.1); +} +.code-optional { + color: white; + background-color: rgb(119.085, 119.085, 119.085); +} +.code-import { + color: black; + background-color: rgba(96, 96, 96, 0.1); +} diff --git a/src/terms/templates/_element.html b/src/terms/templates/_element.html index a5ec06c..f8cb6e4 100644 --- a/src/terms/templates/_element.html +++ b/src/terms/templates/_element.html @@ -1,3 +1,5 @@ + +
@@ -18,6 +20,15 @@ {{ key }}
+ {% if key in ["catalog","section","page","questionset","question"] %}

+ {% elif key in ["attribute","parent"] %}

+ {% elif key in ["optionset","option"] %}

+ {% elif key in ["condition"] %}

+ {% elif key in ["task"] %}

+ {% elif key in ["view"] %}

+ {% elif key in ["is_optional","is_collection","key","path"] %}

+ {% elif key in ["comment","help_de","help_en","help_es","help_fr","help_it"] %}

+ {% else %}

{% endif %} {% if value is string %} {{ value | striptags }} {% elif value is mapping %} @@ -29,7 +40,7 @@ {% endfor %} {% else %} - {{ value }} + {{ value }}

{% endif %}
From b529e96a75f14f1a0a122cc8f97d9db2ba0a2bab Mon Sep 17 00:00:00 2001 From: Giacomo Lanza <37865804+Zack-83@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:28:45 +0100 Subject: [PATCH 2/2] Update _element.html --- src/terms/templates/_element.html | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/terms/templates/_element.html b/src/terms/templates/_element.html index f8cb6e4..b53d1da 100644 --- a/src/terms/templates/_element.html +++ b/src/terms/templates/_element.html @@ -29,19 +29,20 @@ {% elif key in ["is_optional","is_collection","key","path"] %}

{% elif key in ["comment","help_de","help_en","help_es","help_fr","help_it"] %}

{% else %}

{% endif %} - {% if value is string %} - {{ value | striptags }} - {% elif value is mapping %} - {{ value.uri }} - {% elif value is iterable %} -

- {% else %} - {{ value }}

- {% endif %} + {% if value is string %} + {{ value | striptags }} + {% elif value is mapping %} + {{ value.uri }} + {% elif value is iterable %} + + {% else %} + {{ value }} + {% endif %} +