loader ajax
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{% set body_classes = body_class(['header-fixed', 'header-animated', 'header-dark', 'header-transparent', 'sticky-footer']) %}
|
||||
{% set grid_size = theme_var('grid-size') %}
|
||||
{% set compress = theme_var('production-mode') ? '.min.css' : '.css' %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
|
||||
<head>
|
||||
@@ -16,12 +17,13 @@
|
||||
<link rel="canonical" href="{{ page.url(true, true) }}" />
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css/hamburgers.css') %}
|
||||
{% do assets.addCss('theme://css-compiled/theme'~compress) %}
|
||||
{% endblock %}
|
||||
{{ assets.css()|raw }}
|
||||
|
||||
{% block javascripts %}
|
||||
{% do assets.addJs('jquery', 101) %}
|
||||
{% do assets.addJs('theme://js/jquery-3.4.1.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/jquery.lazy.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
|
||||
{% endblock %}
|
||||
@@ -31,26 +33,39 @@
|
||||
{% endblock head %}
|
||||
</head>
|
||||
<body id="top" class="{{ header.title|hyphenize }}">
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
|
||||
<section id="start">
|
||||
|
||||
{% block body %}
|
||||
<div class="body-center" id="text_figli">
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
{% block aside %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block aside %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
</section>
|
||||
|
||||
{% block bottom %}
|
||||
{{ assets.js('bottom')|raw }}
|
||||
{% endblock %}
|
||||
{% block footer %}
|
||||
|
||||
{% set options = { items: {'@page.self': '/contact'} } %}
|
||||
|
||||
<footer>
|
||||
{% for item in page.collection(options) %}
|
||||
{{item.content}}
|
||||
{% endfor %}
|
||||
</footer>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block bottom %}
|
||||
{{ assets.js('bottom')|raw }}
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
</div>
|
||||
|
||||
<div class="card-image">
|
||||
{% for image in page.media.images %}
|
||||
<img class="lazy" data-src="{{image.url}}" alt="images">
|
||||
{% endfor %}
|
||||
|
||||
{% for image in page.media.images %}
|
||||
{% set services_image = image.derivatives(400).sizes('(min-width:224px) 404px, 100vw') %}
|
||||
|
||||
<img class="lazy" data-src="{{ services_image.url() }}" data-srcset="{{ services_image.srcset() }}">
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -2,28 +2,37 @@
|
||||
|
||||
{% import _self as macro %}
|
||||
|
||||
<div class="card">
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
<div id="{{ page.folder }}" class="card-image">
|
||||
<a href="{{ page.url }}">
|
||||
|
||||
<div class="card-header">
|
||||
{% if page.header.title %}
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
{% endif %}
|
||||
{% if page.header.taxonomy.tag %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
{% endif %}
|
||||
{% set image = page.media.images|first %}
|
||||
{% set services_image = page.media.images|first.derivatives(400).sizes('(min-width:224px) 404px, 100vw') %}
|
||||
|
||||
{% if page.header.date %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if image %}
|
||||
<!-- card projet -->
|
||||
<div class="card">
|
||||
<div class='loader'></div>
|
||||
|
||||
<img class="lazy" data-src="{{image.url}}" alt="Projet">
|
||||
<div id="{{ page.folder }}" class="card-image">
|
||||
<a href="{{ page.url }}">
|
||||
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-header">
|
||||
{% if page.header.title %}
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
{% endif %}
|
||||
{% if page.header.taxonomy.tag %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.header.date %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<img class="lazy" data-src="{{ services_image.url() }}" data-srcset="{{ services_image.srcset() }}">
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'p'} %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
<div id="item" class="column">
|
||||
<div id='icone_list'>
|
||||
<button class='hamburger hamburger--slider is-active' type='button'>
|
||||
<span class='hamburger-box'>
|
||||
<span class='hamburger-inner'></span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
{% block item %}{% endblock %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
<div class="sidebar-right">
|
||||
<div class="list-projets">
|
||||
{% include 'partials/taxonomylist.html.twig' with { 'taxonomy':'category'} %}
|
||||
<div id="icone_list">
|
||||
<button class="hamburger hamburger--slider" type="button">
|
||||
<span class="hamburger-box">
|
||||
<span class="hamburger-inner"></span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="list-projets close">
|
||||
<div class="container">
|
||||
{% include 'partials/taxonomylist.html.twig' with { 'taxonomy':'category'} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
|
||||
|
||||
{% macro pageLinkName(text) %}
|
||||
{{ text|lower|replace({' ':'_'}) }}
|
||||
{{ text|lower|replace({' ':'_', 'é':'e'}) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% import _self as macro %}
|
||||
|
||||
{% for tax,value in taxlist[taxonomy] %}
|
||||
<ul class="{{ macro.pageLinkName(tax) }}">
|
||||
{{ tax }}
|
||||
<ul>
|
||||
<span class="cat">{{ tax }}</span>
|
||||
|
||||
{% set options = { items: {'@taxonomy': {'category': tax} } } %}
|
||||
{% set my_collection = page.collection(options) %}
|
||||
|
||||
{% for i in my_collection %}
|
||||
<li>
|
||||
{% if i.media.images|first %}
|
||||
<li class="{{i.parent.folder}}">
|
||||
<a id="{{i.parent.folder}}" href="{{i.url}}">{{i.title}}</a>
|
||||
{% set image = page.media.images|first %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user