Use picture tag to support smaller hero image on small screens
This commit is contained in:
parent
2f396bc158
commit
0917e39e40
1 changed files with 7 additions and 1 deletions
|
@ -11,7 +11,13 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block main_content %}
|
||||
{% if page.hero_image_url %}<img class="hero" src="{{ page.hero_image_url }}" decoding="async" alt="" />{% endif %}
|
||||
{% if page.hero_image_url %}
|
||||
<picture>
|
||||
{% if page.list_image_url %}<source srcset="{{ page.list_image_url }}" media="(max-width: 800px)" />{% endif %}
|
||||
|
||||
<img class="hero" src="{{ page.hero_image_url }}" decoding="async" alt="" />
|
||||
</picture>
|
||||
{% endif %}
|
||||
|
||||
{% if page.get_view_restrictions.exists %}
|
||||
<section class="notification is-danger" id="view-restriction-banner">
|
||||
|
|
Loading…
Reference in a new issue