From 737534f6121b8cea5319f3dda48512bc216e2b0f Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 7 Jul 2020 18:25:35 +0200 Subject: [PATCH] archives --- web/app/themes/la_mine/agenda.php | 1 - web/app/themes/la_mine/archive.php | 1 - web/app/themes/la_mine/asset/dist/style.css | 2 +- .../la_mine/asset/images/objet_drag_5.svg | 127 +++++++++++++++++- web/app/themes/la_mine/templates/agenda.twig | 23 +++- web/app/themes/la_mine/templates/archive.twig | 35 +++-- .../components/thumbnails/thumbnails.twig | 5 +- 7 files changed, 171 insertions(+), 23 deletions(-) diff --git a/web/app/themes/la_mine/agenda.php b/web/app/themes/la_mine/agenda.php index fc612300..a39bfe25 100644 --- a/web/app/themes/la_mine/agenda.php +++ b/web/app/themes/la_mine/agenda.php @@ -12,6 +12,5 @@ $args = array( $context['post'] = Timber::get_post(); $context['posts'] = Timber::get_posts( $args ); -$context['terms'] = Timber::get_terms(array( 'taxonomy'=> 'category', 'hide_empty' => true, 'parent' => 0)); Timber::render('agenda.twig', $context ); diff --git a/web/app/themes/la_mine/archive.php b/web/app/themes/la_mine/archive.php index 394b9f5a..b060bc9d 100644 --- a/web/app/themes/la_mine/archive.php +++ b/web/app/themes/la_mine/archive.php @@ -12,6 +12,5 @@ $args = array( $context['post'] = Timber::get_post(); $context['posts'] = Timber::get_posts( $args ); -$context['terms'] = Timber::get_terms(array( 'taxonomy'=> 'category', 'hide_empty' => true, 'parent' => 0)); Timber::render('archive.twig', $context ); diff --git a/web/app/themes/la_mine/asset/dist/style.css b/web/app/themes/la_mine/asset/dist/style.css index 79e9cd26..79ae8346 100644 --- a/web/app/themes/la_mine/asset/dist/style.css +++ b/web/app/themes/la_mine/asset/dist/style.css @@ -1003,7 +1003,7 @@ body.la-collecte .__header h3{ .thumbnails .atelier_bois{ background-image: url("../images/atelier_couture.png"); } - .thumbnails .atelier_couture{ + .thumbnails .atelier_couture_avec_saroj{ background-image: url("../images/atelier_couture.png"); } .thumbnails .atelier_tricot_solidaire{ diff --git a/web/app/themes/la_mine/asset/images/objet_drag_5.svg b/web/app/themes/la_mine/asset/images/objet_drag_5.svg index d3e3f4b1..c6fbabe7 100644 --- a/web/app/themes/la_mine/asset/images/objet_drag_5.svg +++ b/web/app/themes/la_mine/asset/images/objet_drag_5.svg @@ -1 +1,126 @@ -RESSOURCERIE \ No newline at end of file + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/app/themes/la_mine/templates/agenda.twig b/web/app/themes/la_mine/templates/agenda.twig index bcc8ffb0..4aadc6f8 100644 --- a/web/app/themes/la_mine/templates/agenda.twig +++ b/web/app/themes/la_mine/templates/agenda.twig @@ -1,21 +1,32 @@ {% extends "base.twig" %} {% block content %} {% include 'components/title_page.twig' %} +{% set now = 'now'|date('Ydj') %}
{% for item in posts %} - {% include 'components/thumbnails/thumbnails.twig'%} + {% set end = item.informations_fin_event|date("Ydj") %} + {% if now <= end %} + {% include 'components/thumbnails/thumbnails.twig'%} + {% endif %} {% endfor %}
diff --git a/web/app/themes/la_mine/templates/archive.twig b/web/app/themes/la_mine/templates/archive.twig index bcc8ffb0..04632ace 100644 --- a/web/app/themes/la_mine/templates/archive.twig +++ b/web/app/themes/la_mine/templates/archive.twig @@ -1,21 +1,34 @@ {% extends "base.twig" %} {% block content %} {% include 'components/title_page.twig' %} +{% set now = 'now'|date('Ydj') %}
-
    -
  • - Tous -
  • - {% for cat in terms %} -
  • - {{cat.name}} -
  • - {% endfor %} -
+
    +
  • + Tous +
  • + {% set newArray = [] %} + {% for cat in posts %} + {% set term = cat.categories|last.slug %} + {% set end = cat.informations_fin_event|date("Ydj") %} + {% if term not in newArray and now >= end %} +
  • + {{cat.categories|last.name}} +
  • + {% set newArray = newArray|merge([term]) %} + {% endif %} + {% endfor %} +
{% for item in posts %} - {% include 'components/thumbnails/thumbnails.twig'%} + {% set end = item.informations_fin_event|date("Ydj") %} + {% if now >= end %} + + {% include 'components/thumbnails/thumbnails.twig'%} + + {% endif %} + {% endfor %}
diff --git a/web/app/themes/la_mine/templates/components/thumbnails/thumbnails.twig b/web/app/themes/la_mine/templates/components/thumbnails/thumbnails.twig index 15c90343..6ce9942a 100644 --- a/web/app/themes/la_mine/templates/components/thumbnails/thumbnails.twig +++ b/web/app/themes/la_mine/templates/components/thumbnails/thumbnails.twig @@ -5,7 +5,7 @@
-
+
@@ -44,7 +44,8 @@ {% endif %}
-
{{item.lieu}}
+ +
{{item.informations_lieu}}