XF 2.2 Display condition, widgets only on mobiles/smaller screens

HenrikHansen

Well-known member
I want to embed som Google calendars, but they are not responsive, so I think it is best to embed smaller calendars in widgets only shown on small screens.
Can I make som display condition, so some widgets are only shown only smaller screens?
 
Like this.

1617987679221.png

1617987722819.png

Checking the box at the bottom removes all the default styling, so nothing is shown.

If you want to have the default titles, etc. you will need to add that back in to the template html like so:

HTML:
<div class="u-showNarrowBlock block" data-widget-key="my_widget">
    <div class="block-container">
        <h3 class="block-minorHeader">My Widget</h3>
        <div class="block-body block-row">
            Widget content
        </div>
    </div>
</div>

1617995972280.webp
 
Top Bottom