Conditional Results Based on Viewport/Screen Size in Tag Pairs #10402
-
Newb question here: Is there a way to create conditional results based on viewport (eg mobile vs desktop)? For example, from the docs:
Can I get 3 on mobile and 5 on larger devices? Or: `{{ collection:blog paginate="10" as="posts" }}{{ /collection:blog }}` set the paginate to different values? |
Beta Was this translation helpful? Give feedback.
Answered by
jackmcdade
Jul 5, 2024
Replies: 1 comment 1 reply
-
Alas no, server side isn't going to know the viewport. What I would do is pull 5 and then hide the last 2 on mobile with CSS. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dugtratch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alas no, server side isn't going to know the viewport.
What I would do is pull 5 and then hide the last 2 on mobile with CSS.