From e6bfbef4b98dff168812db52339b3e2cc37cc8d5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 27 Aug 2019 14:46:54 +0200 Subject: Callout for operation/site detail --- scss/bootstrap-callout.scss | 68 ++++++++++++------------------ scss/pergamon.scss | 1 + showcase/templates/showcase/item-find.html | 20 ++++----- 3 files changed, 38 insertions(+), 51 deletions(-) diff --git a/scss/bootstrap-callout.scss b/scss/bootstrap-callout.scss index 1364867..1dc08a1 100644 --- a/scss/bootstrap-callout.scss +++ b/scss/bootstrap-callout.scss @@ -1,77 +1,63 @@ .bs-callout { padding: 20px; - margin: 20px 0; - border: 1px solid #eee; - border-left-width: 5px; - border-radius: 4px; - margin-left: 50px; + margin: 20px 0; + border: 1px solid #eee; + border-left-width: 5px; + border-radius: 4px; + margin-left: 50px; } + .bs-callout-xl { margin-left: 0px; } + .bs-callout-lg { margin-left: 50px; } + .bs-callout-md { margin-left: 100px; } + .bs-callout-sm { margin-left: 150px; } + .bs-callout-xs { margin-left: 200px; } + .bs-callout h4 { margin-top: 0; - margin-bottom: 5px; + margin-bottom: 5px; } + .bs-callout p:last-child { margin-bottom: 0; } + .bs-callout code { border-radius: 4px; } + .bs-callout+.bs-callout { margin-top: -5px; } + .bs-callout-default { border-left-color: #777; - background-color: #f7f7f9; + background-color: #f7f7f9; } + .bs-callout-default h4 { color: #777; } -.bs-callout-primary { - border-left-color: #428bca; -} -.bs-callout-primary h4 { - color: #428bca; -} -.bs-callout-success { - border-left-color: #5cb85c; - background-color: #efffe8; -} -.bs-callout-success h4 { - color: #5cb85c; -} -.bs-callout-danger { - border-left-color: #d9534f; - background-color: #fcf2f2; -} -.bs-callout-danger h4 { - color: #d9534f; -} -.bs-callout-warning { - border-left-color: #f0ad4e; - background-color: #fefbed; -} -.bs-callout-warning h4 { - color: #f0ad4e; -} -.bs-callout-info { - border-left-color: #5bc0de; - background-color: #f0f7fd; -} -.bs-callout-info h4 { - color: #5bc0de; -} + +@each $color, $value in $theme-colors { + .bs-callout-#{$color} { + border-left-color: $value; + } + .bs-callout-#{$color} h4 { + color: $value; + } +} \ No newline at end of file diff --git a/scss/pergamon.scss b/scss/pergamon.scss index 452e1d5..67b8e85 100644 --- a/scss/pergamon.scss +++ b/scss/pergamon.scss @@ -1,5 +1,6 @@ @import "custom"; @import "bootstrap-src/scss/bootstrap"; +@import "bootstrap-callout"; body{ background-color: #eee; diff --git a/showcase/templates/showcase/item-find.html b/showcase/templates/showcase/item-find.html index 6d67ac5..e3f0f43 100644 --- a/showcase/templates/showcase/item-find.html +++ b/showcase/templates/showcase/item-find.html @@ -4,7 +4,7 @@ {% block body_class %}template-showcase-item{% endblock %} {% block content %} -

{{page.title}}

+

{{page.title}}

{{current_number_1}} / {{total}}
@@ -46,39 +46,39 @@
{% endif %} -

{{data.denomination}}

+

{{data.denomination}}

-
+
{% if data.public_description %}
{{data.public_description|linebreaks}}
{% elif data.description %}
{{data.description|linebreaks}}
{% endif %} - {% if data.object_types %} + {% if data.object_types|length %}

{% trans "Object type:" %} {{data.object_types|join:" ; "}}

{% endif %} - {% if data.materials %} + {% if data.materials|length %}

{% trans "Materials:" %} {{data.materials|join:" ; "}}

{% endif %} - {% if data.datings %}

{% trans "Period(s):" %} + {% if data.datings|length %}

{% trans "Period(s):" %} {% for dating in data.datings %}{% if forloop.counter0 %} ; {% endif %}{{dating.period}}{% endfor %}

{% endif %}
-
+
{% with data.base_finds.0.context_record.site as site %} {% with data.base_finds.0.context_record.operation as operation %} -
{% trans "Archaeological site / Operation" %}
+

{% trans "Archaeological site / Operation" %}

{{site.name}} {% if site.discovery_date %}({{site.discovery_date}}){% endif %}
{{site.towns.0}}

{% if operation.year %}

{% trans "Year of the survey:" %} {{operation.year}}

{% endif %} {% if site.shipwreck_name %}

{% trans "Shipwreck" %} : {{site.shipwreck_name}} {% if site.sinking_date %} {% trans "sinking" %} {{site.sinking_date}}{% endif %}

{% endif %} - {% if site.periods %} + {% if site.periods|length %}

{% trans "Period(s):" %} {{site.periods|join:" ; "}}

{% endif %} - {% if site.remains %} + {% if site.remains|length %}

{% trans "Remain(s):" %} {{site.remains|join:" ; "}}

{% endif %} {% endwith %} -- cgit v1.2.3