From 5cfce76ac1a3219fc30ae3227d1c912dd7122508 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 29 Sep 2018 15:52:27 -0400 Subject: implement responsive image sizing for mr-worldwide posts (and all others going forward) --- _includes/image.html | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to '_includes/image.html') diff --git a/_includes/image.html b/_includes/image.html index 4c5afc5..30af037 100644 --- a/_includes/image.html +++ b/_includes/image.html @@ -14,8 +14,26 @@ display: inline-block; {% endif -%} "> - - {{ include.descr }} + + + {%- if include.width %} + {%- for targetWidth in site.img_widths reversed -%} + {% if include.width <= targetWidth %}{% continue %}{% endif %} + {%- if targetWidth > 1000 %} + 500 %} + + {%- endfor %} + {%- endif %} + {{ include.descr }} + + {%- if include.descr %}
{{ include.descr }}{%- endif %} -- cgit v1.2.3