You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cheese-theme/templates/modular-with-schedule.html....

66 lines
1.7 KiB

{% extends 'partials/base.html.twig' %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% block head %}
<base href="/">
{{ parent() }}
{% endblock %}
{% block javascripts %}
{% do assets.add('theme://js/singlepagenav.min.js') %}
{% do assets.addJs('/schedule/assets/inline.bundle.js', {group: 'bottom'}) %}
{% do assets.addJs('/schedule/assets/polyfills.bundle.js', {group: 'bottom'}) %}
{% do assets.addJs('/schedule/assets/main.bundle.js', {group: 'bottom'}) %}
{{ parent() }}
{% endblock %}
{% block stylesheets %}
{% do assets.addCss('/schedule/assets/styles.bundle.css') %}
{{ parent() }}
{% endblock %}
{% block bottom %}
{{ parent() }}
<script>
// singlePageNav initialization & configuration
$('nav').singlePageNav({
offset: $('#header').outerHeight(),
filter: 'a[href*="#"]',
updateHash: true,
currentClass: 'active',
beforeStart: function() {
if ($('body').hasClass('mobile-nav-open')) {
$('#toggle').removeClass('active');
$('#overlay').removeClass('open');
$('body').removeClass('mobile-nav-open');
}
}
});
</script>
{% endblock %}
{% block hero %}
{% for module in page.collection() if module.template == 'modular/hero' %}
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
{{ module.content }}
{% endfor %}
{% endblock %}
{% block body %}
{% for module in page.collection() if module.template != 'modular/hero' %}
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
{{ module.content }}
{% endfor %}
{% endblock %}