From a5946f996f31d5020aec887a2500a49edef69940 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 6 Apr 2020 18:10:42 +0200 Subject: Layout: use float position for images --- scss/pergamon.scss | 11 ++++ showcase/templates/showcase/item-find.html | 93 +++++++++++++++--------------- showcase/templates/showcase/show_case.html | 10 +--- 3 files changed, 60 insertions(+), 54 deletions(-) diff --git a/scss/pergamon.scss b/scss/pergamon.scss index d8ab1a3..d50e31f 100644 --- a/scss/pergamon.scss +++ b/scss/pergamon.scss @@ -82,4 +82,15 @@ main.container{ margin-bottom: 0; } +.show-case{ + max-width: 1024px; + background-color: #fff; + border-radius: 4px; +} + +.card-body.legend { + padding: 0.5rem; + font-size: 0.9em; +} + @import "custom_post"; \ No newline at end of file diff --git a/showcase/templates/showcase/item-find.html b/showcase/templates/showcase/item-find.html index 403f524..0659e5f 100644 --- a/showcase/templates/showcase/item-find.html +++ b/showcase/templates/showcase/item-find.html @@ -39,58 +39,57 @@
-
-
-
+
+
{% if data.images.0.thumbnail %} -
- +
+
+ + {% if data.images.0.authors %} +
© {% for author in data.images.0.authors %} + {% if author.type == "Auteur principal" %}{% if forloop.counter0 %} ; {% endif %}{{author.person}}{% endif %} + {% endfor %}
{% endif %} +
{% endif %} - {% if data.images.0.thumbnail %} -
- {% else %} -
- {% endif %} -

{{data.denomination}}

+

{{data.denomination}}

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

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

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

{% trans "Material(s):" %} {{data.materials|join:" ; "}}

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

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

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

{% trans "ID:" %} {{data.free_id}}

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

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

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

{% trans "Material(s):" %} {{data.materials|join:" ; "}}

+ {% endif %} + {% if data.datings|length %}

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

{% endif %} + {% if data.free_id %}

{% trans "ID:" %} {{data.free_id}}

{% 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" %}

-

{{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|length %} -

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

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

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

- {% endif %} - {% endwith %} - {% endwith %} -
+
+ {% with data.base_finds.0.context_record.site as site %} + {% with data.base_finds.0.context_record.operation as 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|length %} +

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

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

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

+ {% endif %} + {% endwith %} + {% endwith %}
diff --git a/showcase/templates/showcase/show_case.html b/showcase/templates/showcase/show_case.html index acc599a..f9888c6 100644 --- a/showcase/templates/showcase/show_case.html +++ b/showcase/templates/showcase/show_case.html @@ -8,18 +8,14 @@
-
-
-
+
+
{% image page.image original as head_image %} {{ head_image.alt }}
-
-
+
{{ page.body|richtext }} -
-
-- cgit v1.2.3