form + filter
This commit is contained in:
39
user/themes/lecampus/templates/archive.html.twig
Normal file
39
user/themes/lecampus/templates/archive.html.twig
Normal file
@@ -0,0 +1,39 @@
|
||||
{% 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 hero %}
|
||||
{% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper" class="section blog-listing">
|
||||
<section class="container {{ grid_size }}">
|
||||
<div class="cat">
|
||||
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag'} %}
|
||||
</div>
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% embed 'partials/layout.html.twig' with {blog: page} %}
|
||||
|
||||
{% block item %}
|
||||
{% for child in page.find('/agenda').children %}
|
||||
|
||||
{% if child.header.date_end|date("d/m/y") <= "now"|date("d/m/y") %}
|
||||
{{child.title}}
|
||||
{% include 'partials/cal-list-event.html.twig' with {blog: page, page: child} %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
@@ -21,13 +21,9 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if show_sidebar %}
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -11,9 +11,12 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<section id="body-wrapper" class="section blog-listing">
|
||||
<section class="container {{ grid_size }}">
|
||||
|
||||
<div class="cat">
|
||||
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag'} %}
|
||||
</div>
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
@@ -21,15 +24,16 @@
|
||||
{% embed 'partials/layout.html.twig' with {blog: page} %}
|
||||
|
||||
{% block item %}
|
||||
<div class="cat">
|
||||
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag'} %}
|
||||
</div>
|
||||
{% for child in collection %}
|
||||
{% include 'partials/cal-list-event.html.twig' with {blog: page, page: child} %}
|
||||
{% endfor %}
|
||||
{% for child in collection %}
|
||||
{% if child.header.date_end|date("d/m/y") >= "now"|date("d/m/y") %}
|
||||
{% include 'partials/cal-list-event.html.twig' with {blog: page, page: child} %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
{% embed 'partials/layout.html.twig' %}
|
||||
{% block item %}
|
||||
{% include 'partials/blog-item.html.twig' %}
|
||||
{% include 'partials/cal-event.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
</section>
|
||||
|
@@ -10,7 +10,9 @@
|
||||
{% endif %}
|
||||
|
||||
{% for item in collection %}
|
||||
<div class="sub-content">
|
||||
<h3>{{item.title}}</h3>
|
||||
{{item.content}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
@@ -20,8 +20,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper" class="section blog-listing">
|
||||
<section class="container {{ grid_size }}">
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
@@ -35,6 +33,5 @@
|
||||
{% for child in page.collection %}
|
||||
{{child.content}}
|
||||
{% endfor %}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -24,11 +24,11 @@
|
||||
{% block javascripts %}
|
||||
|
||||
{% do assets.addJs('jquery', 101) %}
|
||||
{% do assets.addJs('theme://js/masonry.pkgd.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/imagesloaded.pkgd.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/multipleFilterMasonry.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/jquery.slides.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/leaflet.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/masonry.pkgd.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/multipleFilterMasonry.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/imagesloaded.pkgd.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/jquery.slides.min.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -47,22 +47,20 @@
|
||||
<a href="/"><h1>{{site.title}}</h1></a>
|
||||
</section>
|
||||
<section class="desktop-menu">
|
||||
<nav class="dropmenu animated">
|
||||
{% block header_navigation %}
|
||||
{% include 'partials/navigation.html.twig' %}
|
||||
{% endblock %}
|
||||
</nav>
|
||||
|
||||
<nav class="dropmenu animated">
|
||||
{% block header_navigation %}
|
||||
{% include 'partials/navigation.html.twig' %}
|
||||
{% endblock %}
|
||||
{% if config.plugins.login.enabled and grav.user.username %}
|
||||
<span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
|
||||
{% endif %}
|
||||
|
||||
</nav>
|
||||
|
||||
{% if config.plugins.login.enabled and grav.user.username %}
|
||||
<span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
|
||||
{% endif %}
|
||||
|
||||
<div class="reso">
|
||||
<img src="/user/themes/lecampus/images/fb.svg" alt="">
|
||||
<img src="/user/themes/lecampus/images/yt.svg" alt="">
|
||||
</div>
|
||||
<div class="reso">
|
||||
<img src="/user/themes/lecampus/images/fb.svg" alt="">
|
||||
<img src="/user/themes/lecampus/images/yt.svg" alt="">
|
||||
</div>
|
||||
</section>
|
||||
</nav>
|
||||
</section>
|
||||
|
@@ -7,5 +7,5 @@
|
||||
<a href="{{ page.header.link }}" class="u-url">{{ page.title }}</a>
|
||||
</{{ title_level }}>
|
||||
{% else %}
|
||||
<{{ title_level }} class="p-name mt-1"><a href="{{ page.url }}" class="u-url">{{ page.title }}</a></{{ title_level }}>
|
||||
<{{ title_level }}>{{ page.title }}</{{ title_level }}>
|
||||
{% endif %}
|
||||
|
@@ -1,23 +1,14 @@
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
<div class="content-item h-entry">
|
||||
{% 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/public.html.twig' %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% include 'partials/blog/reseaux_sociaux.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="e-content">
|
||||
{% if image %}
|
||||
{{ image.html }}
|
||||
{% endif %}
|
||||
{{ page.content|raw }}
|
||||
{% if not hero_image_name %}
|
||||
<div class="content">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
<div class="reso">
|
||||
<img src="/user/themes/lecampus/images/fb.svg" alt="">
|
||||
</div>
|
||||
{% if page.header.subtitle %}
|
||||
<h3 >{{ page.header.subtitle }}</h3>
|
||||
{% endif %}
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<div class="card">
|
||||
{% for tag in page.taxonomy.tag %}
|
||||
<div class="card {{tag}} Tous">
|
||||
{% endfor %}
|
||||
<div class="card-header">
|
||||
{% include 'partials/blog/public.html.twig' %}
|
||||
</div>
|
||||
@@ -14,11 +16,13 @@
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
</div>
|
||||
<div class="card-summary">
|
||||
<a href="{{ page.url }}">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.summary|raw }}
|
||||
{% else %}
|
||||
{{ page.content|raw }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -3,7 +3,9 @@
|
||||
|
||||
<section id="footer" class="section blog-listing">
|
||||
{% for p in page.find('/home').children if p != page %}
|
||||
<h1>{{p.title}}</h1>
|
||||
{{p.content}}
|
||||
<div class="sub-content">
|
||||
<h2>{{p.title}}</h2>
|
||||
{{p.content}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
@@ -3,9 +3,11 @@
|
||||
|
||||
<div id="item">
|
||||
{% block item %}{% endblock %}
|
||||
|
||||
{% if show_sidebar %}
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
@@ -1,12 +1,32 @@
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
|
||||
|
||||
{% if taxlist %}
|
||||
<span class="tags">
|
||||
<a class="" href="#">Tous</a>
|
||||
<div class="tags">
|
||||
<div class="btn-toolbar filters">
|
||||
<div data-toggle="buttons" class="btn-group">
|
||||
<label class="btn btn-default">
|
||||
<input type="checkbox" value=Tous >
|
||||
Tous
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{% for tax,value in taxlist[taxonomy] %}
|
||||
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
|
||||
<a class="label label-rounded {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
|
||||
<div class="btn-toolbar filters">
|
||||
<div data-toggle="buttons" class="btn-group">
|
||||
<label class="btn btn-default">
|
||||
<input type="checkbox" value={{tax}} >
|
||||
{{tax}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<a class="" href="#">Achives</a>
|
||||
</span>
|
||||
<div class="btn-toolbar filters">
|
||||
<div data-toggle="buttons" class="btn-group">
|
||||
<label class="btn btn-default">
|
||||
<a href="/archive">archive</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user