{%- if include.caption -%} {%- capture caption -%} {{ include.caption | markdownify }} {%- endcapture -%} {%- assign alt = include.alt | default: include.title | default: caption | strip_html -%} {%- assign title = include.title | default: caption | strip_html -%} {%- else -%} {%- assign alt = include.alt | default: include.title | escape -%} {%- assign title = include.title | escape -%} {%- endif -%} {%- assign place = include.place | default: 'center' -%} {%- if include.link == false -%} {%- assign link = false -%} {%- else -%} {%- assign link = include.link | default: include.src -%} {%- endif -%} {%- assign src = include.src -%} {%- assign slug = src | split: '/' | last | slugify -%} {%- assign id = include.id | default: slug -%} {%- assign class_prefix = '' -%} {%- if place == 'center' -%} {%- assign width = include.width | default: 800 -%} {%- else -%} {%- assign width = include.width | default: 320 -%} {%- if width <= 200 -%} {%- assign class_prefix = 'strict-' -%} {%- endif -%} {%- endif -%} {%- assign class = class_prefix | append: place -%} {%- if include.class -%} {%- assign class = class | append: ' ' | append: include.class -%} {%- endif -%} {%- if include.img_style -%} {%- assign img_style = ' style="' | append: include.img_style | append: '"' -%} {%- else -%} {%- assign img_style = '' -%} {%- endif -%} {%- assign shape_style = '' -%} {%- if include.shape -%} {%- if include.shape == true -%} {%- assign shape_src = src -%} {%- else -%} {%- assign shape_src = include.shape -%} {%- endif -%} {%- if place == 'right' or place == 'left' -%} {%- assign shape_style = 'shape-outside: url(' | append: shape_src | append: '); shape-margin: 10px;' -%} {%- endif -%} {%- endif -%}
{%- if link -%} {%- endif -%} {{- alt -}} {%- if link -%} {%- endif -%} {%- if include.caption -%}
{{- include.caption -}}
{%- endif -%}