ajax
This commit is contained in:
@@ -1,49 +1,25 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
{% set blog_image = page.media.images[page.header.hero_image] ?: page.media.images|first %}
|
||||
{% set collection = page.collection() %}
|
||||
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
|
||||
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
|
||||
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
|
||||
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css/bricklayer.css') %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{% do assets.add('theme://js/bricklayer.min.js') %}
|
||||
{% do assets.add('theme://js/scopedQuerySelectorShim.min.js') %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block hero %}
|
||||
{% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
|
||||
{% block header %}
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">{{site.title}}</a>
|
||||
</h1>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper">
|
||||
|
||||
{% block item %}
|
||||
|
||||
<div class="bricklayer">
|
||||
{% for child in collection %}
|
||||
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
|
||||
<div id="listing-footer">
|
||||
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<section class="body-wrapper" id="item_list">
|
||||
{% block item %}
|
||||
{% for child in collection %}
|
||||
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
</section>
|
||||
<script>
|
||||
//Bricklayer
|
||||
var bricklayer = new Bricklayer(document.querySelector('.bricklayer'))
|
||||
</script>
|
||||
|
||||
{% block aside %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -17,32 +17,27 @@
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css-compiled/theme'~compress) %}
|
||||
{% do assets.addCss('theme://css/normelize.css') %}
|
||||
{% endblock %}
|
||||
{{ assets.css()|raw }}
|
||||
|
||||
{% block javascripts %}
|
||||
{% do assets.addJs('jquery', 101) %}
|
||||
{% do assets.addJs('theme://js/script_k.js', {group:'bottom'}) %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{{ assets.js()|raw }}
|
||||
|
||||
{% endblock head %}
|
||||
</head>
|
||||
<body id="top" class="{{ header.title|hyphenize }}">
|
||||
|
||||
{% block header %}
|
||||
<header>
|
||||
<a href="/"><h1>{{ site.title }}</h1></a>
|
||||
</header>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
<section id="start">
|
||||
{% block body %}
|
||||
<section>
|
||||
{% block content %}{% endblock %}
|
||||
<div class="body-center" id="text_figli">
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
{% block aside %}
|
||||
|
||||
@@ -1,32 +1,15 @@
|
||||
<div>
|
||||
|
||||
{% if not hero_image_name %}
|
||||
<div class="content-title text-center">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
{% if page.header.subtitle %}
|
||||
<h3 >{{ page.header.subtitle }}</h3>
|
||||
{% endif %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="e-content">
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
<div class="card-image">
|
||||
{% for image in page.media.images %}
|
||||
{{ image.html }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="content-title">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
</div>
|
||||
|
||||
<p class="prev-next text-center">
|
||||
{% if not page.isLast %}
|
||||
<a class="btn" href="{{ page.prevSibling.url }}"><i class="fa fa-angle-left"></i> {{ 'THEME_QUARK.BLOG.ITEM.PREV_POST'|t }}</a>
|
||||
{% endif %}
|
||||
<div class="e-content">
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
{% if not page.isFirst %}
|
||||
<a class="btn" href="{{ page.nextSibling.url }}">{{ 'THEME_QUARK.BLOG.ITEM.NEXT_POST'|t }} <i class="fa fa-angle-right"></i></a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<div class="card-image">
|
||||
{% for image in page.media.images %}
|
||||
{{ image.html }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -2,15 +2,20 @@
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
<div class="card-image">
|
||||
<a href="{{ page.url }}">{{ image.cropZoom(800,400).html }}</a>
|
||||
<a href="{{ page.url }}">{{ image.html("", "Projet") }}</a>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
{% if page.header.title %}
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
{% endif %}
|
||||
|
||||
<div class="card-header">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
</div>
|
||||
{% if page.header.taxonomy.tag %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.header.date %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<span>•</span>
|
||||
<span class="blog-date">
|
||||
<time class="dt-published" datetime="{{ page.date|date("c") }}">
|
||||
<i class="fa fa-calendar"></i> {{ page.date|date(system.pages.dateformat.short) }}
|
||||
<time class="dt-published" datetime="{{ page.date|date("Y") }}">
|
||||
{{ page.date|date("Y") }}
|
||||
</time>
|
||||
</span>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<div class="other_projets">
|
||||
<h3>Les autres projets <span class="{{page.parent.title|lower}}">{{page.parent.title|lower}}s</span></h3>
|
||||
{% set collection_random = page.parent.collection|slice(1,3) %}
|
||||
|
||||
{% for item in collection_random %}
|
||||
{% if item.title == page.title == false %}
|
||||
<div class="card">
|
||||
<div class="card-images">
|
||||
<a href="{{item.url}}">
|
||||
{% for image in item.media.images|slice(0,1) %}
|
||||
{{ image.html }}
|
||||
{% endfor %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-header">
|
||||
{% if item.header.title %}
|
||||
{% include 'partials/blog/title.html.twig' with { 'page': item } %}
|
||||
{% endif %}
|
||||
{% if item.header.taxonomy.tag %}
|
||||
<!-- <span>•</span> -->
|
||||
{% include 'partials/blog/taxonomy.html.twig' with { 'page': item } %}
|
||||
{% endif %}
|
||||
{% if item.header.date %}
|
||||
<!-- <span>•</span> -->
|
||||
{% include 'partials/blog/date.html.twig' with { 'page': item } %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -1,7 +1,8 @@
|
||||
{% if page.taxonomy.tag %}
|
||||
<span>•</span>
|
||||
<span class="tags">
|
||||
{% for tag in page.taxonomy.tag %}
|
||||
<a class="label label-rounded {{ label_style ?: 'label-secondary' }} p-category" href="{{ blog.url|rtrim('/') }}/tag{{ config.system.param_sep }}{{ tag }}#body-wrapper">{{ tag }}</a>
|
||||
{{ tag }}
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{% set item_col = show_sidebar ? 'col-9 col-md-12' : 'col-12' %}
|
||||
{% set sidebar_col = show_sidebar ? 'col-3 col-md-12' : 'col-12' %}
|
||||
|
||||
<div class="columns">
|
||||
<div id="item" class="column {{ item_col }} extra-spacing">
|
||||
<div id="item" class="column">
|
||||
{% block item %}{% endblock %}
|
||||
</div>
|
||||
{% if show_sidebar %}
|
||||
<div id="sidebar" class="column {{ sidebar_col }}">
|
||||
{% block sidebar %}{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% block footer %}
|
||||
{% include 'partials/blog/other_projets.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block aside %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
{% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}
|
||||
{% set new_base_url = blog.url == '/' ? '' : blog.url %}
|
||||
|
||||
<div class="sidebar-left">
|
||||
{% set options = { items: {'@page': '/contact' } } %}
|
||||
{% set my_collection = page.collection(options) %}
|
||||
<ul>
|
||||
{% for p in my_collection %}
|
||||
<a href="{{p.url}}"><li>{{ p.title }}</li></a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-right">
|
||||
{% set options = { items: {'@page': '/projets' } } %}
|
||||
{% set my_collection = page.collection(options) %}
|
||||
|
||||
<ul>
|
||||
{% include 'partials/taxonomylist.html.twig' with {'base_url': new_base_url, 'taxonomy':'category'} %}
|
||||
<!-- {% for i in my_collection %}
|
||||
<li>{{i.title}}</li>
|
||||
{% endfor %} -->
|
||||
</ul>
|
||||
<div class="list-projets">
|
||||
{% include 'partials/taxonomylist.html.twig' with { 'taxonomy':'category'} %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
|
||||
|
||||
{% macro pageLinkName(text) %}
|
||||
{{ text|lower|replace({' ':'_'}) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% if taxlist %}
|
||||
<ul>
|
||||
{% for tax,value in taxlist[taxonomy] %}
|
||||
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
|
||||
{% import _self as macro %}
|
||||
|
||||
{% for tax,value in taxlist[taxonomy] %}
|
||||
<ul class="{{ macro.pageLinkName(tax) }}">
|
||||
{{ tax }}
|
||||
|
||||
{% set options = { items: {'@taxonomy': {'category': tax} } } %}
|
||||
{% set my_collection = page.collection(options) %}
|
||||
|
||||
{% for i in my_collection %}
|
||||
<li>
|
||||
<a class="label {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
|
||||
<a href="{{i.url}}">{{i.title}}</a>
|
||||
</li>
|
||||
|
||||
{% set options = { items: {'@taxonomy': {'category': tax} } } %}
|
||||
{% set my_collection = page.collection(options) %}
|
||||
|
||||
{% for i in my_collection %}
|
||||
<li>{{i.title}}</li>
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">{{site.title}} • </a><a class="{{page.parent.title|lower}}" href="{{page.parent.url|lower}}">{{page.parent.title|lower}}</a>
|
||||
</h1>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper">
|
||||
{% embed 'partials/layout.html.twig' %}
|
||||
{% block item %}
|
||||
{% include 'partials/blog-item.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user