This commit is contained in:
= 2021-06-02 16:04:38 +05:00
commit f37b63338c
5 changed files with 31 additions and 7 deletions

View File

@ -19,7 +19,10 @@
href="{{reklama.url|default('#')}}" target="_blank"
{% endif %}
>
<img src="{{reklama.media|media_cdn}}" alt="{{reklama.title}}">
<picture>
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
<img src="{{reklama.media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}">
</picture>
</a>
{% endfor %}

View File

@ -12,5 +12,8 @@
{% endif %}
class="{{ css_class }}"
>
<img src="{{reklama.media|media_cdn}}" alt="{{reklama.title}}">
<picture>
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
<img src="{{reklama.media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}">
</picture>
</a>

View File

@ -9,7 +9,10 @@
href="{{reklama.url|default('#')}}" target="_blank"
{% endif %}
>
<img src="{{reklama.media|media_cdn}}" alt="{{reklama.title}}">
<picture>
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
<img src="{{reklama.media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}">
</picture>
</a>
{% endfor %}
</div>

View File

@ -61,6 +61,6 @@ fields:
type: mediafinder
media_mobile:
label: 'Media for mobile'
mode: file
mode: image
span: auto
type: mediafinder

View File

@ -52,6 +52,21 @@ random = 0
code = "right-bottom"
type = "slider"
random = 0
[adverts right_top_m]
code = "right-top"
type = "slider"
random = 0
[adverts right_middle_m]
code = "right-middle"
type = "slider"
random = 0
[adverts right_bottom_m]
code = "right-bottom"
type = "slider"
random = 0
==
<section class="hero">
<div class="auto__container">
@ -80,7 +95,7 @@ random = 0
<div class="main__body-row">
{% partial 'index/category_posts' category = blogCategories.categories.shift %}
<div class="banner__mobile">
{% component 'right_top' css_class= 'main__sidebar-adv' %}
{% component 'right_top_m' css_class= 'main__sidebar-adv' %}
</div>
{% partial 'index/category_posts' category = blogCategories.categories.shift %}
</div>
@ -92,7 +107,7 @@ random = 0
<div class="main__body-row">
{% partial 'index/category_posts' category = blogCategories.categories.shift %}
<div class="banner__mobile">
{% component 'right_middle' css_class = 'main__sidebar-adv' %}
{% component 'right_middle_m' css_class = 'main__sidebar-adv' %}
</div>
{% partial 'index/category_posts' category = blogCategories.categories.shift %}
</div>
@ -104,7 +119,7 @@ random = 0
<div class="main__body-row">
{% partial 'index/category_posts' category = blogCategories.categories.shift %}
<div class="banner__mobile">
{% component 'right_bottom' css_class= 'main__sidebar-adv' %}
{% component 'right_bottom_m' css_class= 'main__sidebar-adv' %}
</div>
{% partial 'index/category_posts' category = blogCategories.categories.shift %}
</div>