Hi there,
I’m working on a project where a page will have huge difference between mobile and desktop layout, to the extreme where just SASS tricks with breakpoints wont do the job.
My idea was to make 2 different snippets for the same page, for example myPage-mobile.php
and myPage-desktop.php
, which both will echo the same content, but will display it in completely different way. The idea is that in the parent myPage.php
I could write something like:
if (device()->isMobile()) {
<?php echo snippet for mobile
}
if (device()->isDesktop()) {
<?php echo snippet for desktop
}
… using something like Kirby Device.
Is there an other way to approach this, or do you have any tips?