Hello,
I want sharing this experience, and hope motivate others building/developing websites with Automad...
It is a html/template snippet, with two columns. A small column when a jpg-image exist and a big column for the content.
By default shows one column (content), but when adding an image to the page, it showing the extra column for showing the image. It is very useful, and make a template-page more flexible.
...
<div class="container">
<div class="row">
<# if jpg-image exist => add column and show image #>
<@ with '*.jpg' @>
<div class="col-2">
<img src="@{ :file }">
@{ :caption }
</div>
<@ end @>
<div class="col">
@{ +defaultContent }
</div>
</div>
</div>
...
I'm using Chota CSS as css-framework, but works also with other css-grid systems.
Hope it can inspire other devs 🙂