From 6e70f28ccbd5afc1506f71f013278a9d157ef03a Mon Sep 17 00:00:00 2001 From: Prefetch Date: Thu, 27 Oct 2022 20:40:09 +0200 Subject: Optimize last images, add proof template, improve CSS --- source/_includes/image.html | 19 +++++++++++++------ source/_includes/preamble.html | 4 ++-- source/_includes/proof/end.html | 3 +++ source/_includes/proof/start.html | 6 ++++++ 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 source/_includes/proof/end.html create mode 100644 source/_includes/proof/start.html (limited to 'source/_includes') diff --git a/source/_includes/image.html b/source/_includes/image.html index a9bc3fd..5b4f35f 100644 --- a/source/_includes/image.html +++ b/source/_includes/image.html @@ -12,22 +12,29 @@ {% comment %} If 'name' ends in "full", half-size image must exist {% endcomment %} {% assign name_full = name %} {% if suffix == "full" %} - {% assign name_half = prefix | append: "half" %} + {% assign name_half = prefix | append: "half" %} {% else %} - {% assign name_half = name_full %} + {% assign name_half = name_full %} {% endif %} {% comment %} Insert the image, linking to the full-size version {% endcomment %} +{% if include.class %} + {% assign add_class = 'class="' | append: include.class | append: '"' %} +{% endif %} +{% if include.style or include.width %} + {% assign set_width = "width:" | append: include.width %} + {% assign set_style = include.style | default: set_width %} + {% assign add_style = 'style="' | append: set_style | append: '"' %} +{% endif %}

- {% assign set_width = "width:" | append: include.width %} - + {% if name_full == name_half %} - {{ include.alt }} + {{ include.alt }} {% else %} - {{ include.alt }} + {{ include.alt }} {% endif %} diff --git a/source/_includes/preamble.html b/source/_includes/preamble.html index 312f1cf..c94741b 100644 --- a/source/_includes/preamble.html +++ b/source/_includes/preamble.html @@ -1,9 +1,9 @@ {% if page.layout == "blog" or page.syntax %} - + {% endif %} {% if page.layout == "concept" or page.maths %} {% endif %} - + diff --git a/source/_includes/proof/end.html b/source/_includes/proof/end.html new file mode 100644 index 0000000..29533a4 --- /dev/null +++ b/source/_includes/proof/end.html @@ -0,0 +1,3 @@ + + + diff --git a/source/_includes/proof/start.html b/source/_includes/proof/start.html new file mode 100644 index 0000000..780b159 --- /dev/null +++ b/source/_includes/proof/start.html @@ -0,0 +1,6 @@ +

+ + +
+
+ -- cgit v1.2.3