On the main page and some subpages I use Swiper. That's why I decided to separate
it from main theme.js file and include it via assets manager cms GRAV.
In the directory user/themes/abm/assets/css and user/theme/abm/assets/js I have placed the appropriate files.
In the file user/themes/abm/templates/partials/swiper the code:
{% do assets.addCss('theme://assets/css/swiper-bundle.min.css') %}
{% do assets.addJs('theme://assets/js/swiper-bundle.min.js', { group: 'bottom', priority: 110 }) %}
<div class="swiper-container {{ swiper.container.classes }}" {{ swiper.container.data|raw }}>
{% if swiper.thumbs %}
<div class="swiper-main">
{% endif %}
<div class="swiper {{ swiper.swiper.classes }}">
<div class="swiper-wrapper {{ swiper.wrapper.classes }}">
{% block swiperWrapper %}{% endblock %}
</div>
</div>
{% if swiper.thumbs %}
</div>
{% endif %}
{% block swiperThumbs %}{% endblock %}
{% block swiperStatic %}{% endblock %}
</div>
On localhost everything works, but after uploading to the server I have the following problem.
After clearing the cache, the page is displayed ok but only the first time. Each subsequent page view and there are no links to Swiper's .css and .js in the code.