show different string count for different mobile screen sizes in twig

849 Views Asked by At

I have set up a rule so that if the string is over 155 then it makes this link appear for mobile only.

{% if page.description|length > 155 %}
<div id="brand-desc-mobile" class="hide-on-med-and-up center-align">
<a id="modalDescBtn" class="modal-trigger" href="#modalDesc">Lire la suite</a></div>
{% endif %}

I was wondering if it is possible in twig to be able to show different string counts depending on the size of the screen for smaller mobile devices instead of the string count being 155 for all mobile devices?

0

There are 0 best solutions below