From e8e334a67bbda217ec2d7e83e1d7e6cce93d1866 Mon Sep 17 00:00:00 2001 From: Christian Scheb Date: Sat, 9 Mar 2024 13:58:05 +0100 Subject: [PATCH] Denser detail head --- web_app/static/scss/content.scss | 13 ++- web_app/templates/hop/detail.html | 130 +++++++++++++++--------------- 2 files changed, 77 insertions(+), 66 deletions(-) diff --git a/web_app/static/scss/content.scss b/web_app/static/scss/content.scss index 8e8166f1..b1a73a46 100644 --- a/web_app/static/scss/content.scss +++ b/web_app/static/scss/content.scss @@ -9,8 +9,8 @@ } .detail-alias { - margin-top:-0.25rem; - margin-bottom: 0.5rem; + margin-top:-0.33rem; + margin-bottom: 0.75rem; font-size: 0.75rem; --bs-text-opacity: 1; color: var(--bs-secondary-color) !important; @@ -20,6 +20,15 @@ } } +.detail-summary { + margin-bottom: 1rem; + + .detail-info, + .badge-list { + margin-bottom: 0.5rem; + } +} + dl.detail-info { display: flex; flex-wrap: wrap; diff --git a/web_app/templates/hop/detail.html b/web_app/templates/hop/detail.html index 8cc0b6b8..5650c967 100644 --- a/web_app/templates/hop/detail.html +++ b/web_app/templates/hop/detail.html @@ -22,76 +22,78 @@

{{ hop.name }} Hops

{% endspaceless %}{% endif %} -
-
Recipes:
-
{{ hop.recipes_count }}
-
Purpose:
-
{{ hop.category_name }}
+
+
+
Recipes:
+
{{ hop.recipes_count }}
+
Purpose:
+
{{ hop.category_name }}
- {% if hop.recipes_alpha_mean %} -
Alpha:
-
{{ hop.alpha_level|title }}
- {% endif %} + {% if hop.recipes_alpha_mean %} +
Alpha:
+
{{ hop.alpha_level|title }}
+ {% endif %} - {% if hop.origin_countries|length > 0 %} -
Origin:
-
{% for origin in hop.origin_countries %}{% if forloop.counter0 %}, {% endif %}{{ origin.flag }} {{ origin.name }}{% endfor %}
- {% endif %} -
+ {% if hop.origin_countries|length > 0 %} +
Origin:
+
{% for origin in hop.origin_countries %}{% if forloop.counter0 %}, {% endif %}{{ origin.flag }} {{ origin.name }}{% endfor %}
+ {% endif %} +
-
- {% if hop.recipes_count %} - - {% endif %} - - {% if hop.accessible_substitutes.count %}{% spaceless %} -
-
Substitutes:
- -
- {% endspaceless %}{% endif %} - - {% if hop.significant_pairings.count %}{% spaceless %} -
-
Pairings:
+
+ {% if hop.recipes_count %} +
- {% endspaceless %}{% endif %} + + {% endif %} - {% if hop.aroma_tags.count %}{% spaceless %} -
-
Flavor:
-
    - {% for tag in hop.aroma_tags.all %} -
  • {{ tag.name }}
  • - {% endfor %} -
-
- {% endspaceless %}{% endif %} + {% if hop.accessible_substitutes.count %}{% spaceless %} +
+
Substitutes:
+ +
+ {% endspaceless %}{% endif %} + + {% if hop.significant_pairings.count %}{% spaceless %} +
+
Pairings:
+
    + {% for pairing in hop.significant_pairings %} +
  1. {{ pairing.paired_hop.name }}
  2. + {% endfor %} +
+ See Dosage +
+ {% endspaceless %}{% endif %} + + {% if hop.aroma_tags.count %}{% spaceless %} +
+
Flavor:
+
    + {% for tag in hop.aroma_tags.all %} +
  • {{ tag.name }}
  • + {% endfor %} +
+
+ {% endspaceless %}{% endif %} +