Can someone explain me how to add a header image to the antimatter theme. Like it's done in all of the preview images.
Archive
I smiply used HTML:
<div align="center">
<img src="path-to-your-image.jpg"></img>
</div>
Antimatter automatically resizes it to fit on any screen-size.
If you download the blog-skeleton package you can get a working example of the demo: http://demo.getgrav.org/blog-skeleton/ You can see how the header image for each post is pulled out automatically and added to the top of the post by looking at the partials/blog_item.html.twig file. Specifically this bit:
TWIG
{% if big_header %}
{{ page.media.images|first.cropResize(900,600).html }}
{% else %}
{{ page.media.images|first.cropZoom(900,300).html }}
{% endif %}
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1323 | 9 years ago | ||
| 2 | 920 | 9 years ago | ||
| 2 | 4048 | 9 years ago | ||
| 1 | 2924 | 9 years ago | ||
| 3 | 1106 | 9 years ago |