Skip to content
Snippets Groups Projects

Add shortcode `section` with params title, img, alt, credit

Merged codecraft requested to merge section-shortcode into master
1 file
+ 17
0
Compare changes
  • Side-by-side
  • Inline
+ 17
0
<section class="section">
<h2 class="title is-2">{{ title }}</h2>
<div class="columns is-vcentered">
<div class="column">
<figure class="image is-4by3">
{% set image = resize_image(path="@/" ~ page.colocated_path ~ "/" ~ img, width=800, height=600) -%}
<img src="{{image.url}}" alt="{{ alt }}"/>
{% if credit %}
<figcaption class="p-1 has-text-white has-background-black is-size-7 is-italic">{{ credit }}</figcaption>
{% endif %}
</figure>
</div>
<div class="column content">
{{ body|markdown|safe }}
</div>
</div>
</section>
Loading