mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
Relocated the code to load portfolio assets
This commit is contained in:
parent
f80c6c79ad
commit
35af0514a6
1 changed files with 7 additions and 21 deletions
|
@ -1,4 +1,5 @@
|
|||
{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
|
||||
{% set body_classes = body_class(['single']) %} {# Here, you can define aditional css classes for body, separated with comas #}
|
||||
{% set compress = theme_var('production-mode') ? '.min.css' : '.css' %}
|
||||
{% set favicon = theme_config.favicon ? theme_config.favicon|first : { type:'image/png', path: url('theme://images/favicon.png') } %}
|
||||
{% set new_base_url = base_url_absolute ~ theme_config.blog_page %}
|
||||
|
@ -21,11 +22,7 @@
|
|||
{% do assets.addCss('theme://assets/css/fontawesome-all.min.css') %}
|
||||
{% do assets.addCss('theme://assets/css/misc.css') %}
|
||||
{% do assets.addCss('theme://assets/css/custom.css', 5) %}
|
||||
{% if page.template() == 'portfolio' %}
|
||||
{% do assets.addCss('theme://assets/css/glightbox.min.css') %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{{ assets.css()|raw }}
|
||||
|
||||
{% block javascripts %}
|
||||
{% do assets.add('jquery',101) %}
|
||||
|
@ -34,15 +31,15 @@
|
|||
{% do assets.addJs('theme://assets/js/util.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://assets/js/main.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://assets/js/custom.js', {group:'bottom'}) %}
|
||||
{% if page.template() == 'portfolio' %}
|
||||
{% do assets.addJs('theme://assets/js/glightbox.min.js', {group:'bottom'}) %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{{ assets.js()|raw }}
|
||||
|
||||
{% block assets deferred %}
|
||||
{{ assets.css()|raw }}
|
||||
{{ assets.js()|raw }}
|
||||
{% endblock %}
|
||||
|
||||
</head>
|
||||
<body
|
||||
class="is-preload">
|
||||
<body class="{% block body_classes %}{{ body_classes }}{% endblock %} is-preload">
|
||||
<!-- Wrapper -->
|
||||
<div id="wrapper">
|
||||
|
||||
|
@ -69,17 +66,6 @@
|
|||
|
||||
{% block bottom %}
|
||||
{{ assets.js('bottom')|raw }}
|
||||
{% if page.template() == 'portfolio' %}
|
||||
<script>
|
||||
const lightbox = GLightbox({
|
||||
touchNavigation: true,
|
||||
loop: true,
|
||||
autoplayVideos: true,
|
||||
openEffect: 'zoom',
|
||||
closeEffect: 'fade'
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Reference in a new issue