Skip to content
Snippets Groups Projects
Commit ee9f2691 authored by codecraft's avatar codecraft :crocodile:
Browse files

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

parent e78fdc42
Branches section-shortcode
No related tags found
1 merge request!46Add shortcode `section` with params title, img, alt, credit
<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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment