From 8260ea133df473d7f887f8d356c24d485b30ec45 Mon Sep 17 00:00:00 2001 From: thex Date: Sat, 29 Jun 2019 15:55:43 +0200 Subject: [PATCH] reduced run-time footprint, prep. for v1.0.3 --- README.md | 12 +++++----- build/build.bat | 2 +- platform/joomla/global/owlcarousel-neo.xml | 4 ++-- .../global/translation/de/owlcarousel-neo.xml | 4 ++-- platform/joomla/helium/owlcarousel-neo.xml | 4 ++-- .../helium/translation/de/owlcarousel-neo.xml | 4 ++-- platform/joomla/hydrogen/owlcarousel-neo.xml | 4 ++-- .../translation/de/owlcarousel-neo.xml | 4 ++-- src/default/owlcarousel-neo.html.twig | 22 ++++++++++--------- 9 files changed, 31 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 4b01d2a..b9d8089 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,22 @@ This project contains a Gantry Particle and is based on the default **Gantry Hel * Gantry Templating Framework and Theme ## Download -Choose the correct download for your target platform. The Joomla Plugin System is supported for all Gantry themes globally or locally for the templates Helium and Hydrogen. The latest Particle version is **v1.0.2**. +Choose the correct download for your target platform. The Joomla Plugin System is supported for all Gantry themes globally or locally for the templates Helium and Hydrogen. The latest Particle version is **v1.0.3**. ___ **Default Particle:** -[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.particle.only.EN.v1.0.2.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.particle.only.DE.v1.0.2.zip) +[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.particle.only.EN.v1.0.3.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.particle.only.DE.v1.0.3.zip) **Legacy Particle - Gantry <5.3.2:** -[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.particle.only.legacy.EN.v1.0.2.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.particle.only.legacy.DE.v1.0.2.zip) +[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.particle.only.legacy.EN.v1.0.3.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.particle.only.legacy.DE.v1.0.3.zip) **Joomla Plugin - All Templates (Global):** -[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.j3.global.EN.v1.0.2.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.j3.global.DE.v1.0.2.zip) +[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.j3.global.EN.v1.0.3.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.j3.global.DE.v1.0.3.zip) **Joomla Plugin - Hydrogen:** -[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.j3.hydrogen.EN.v1.0.2.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.j3.hydrogen.DE.v1.0.2.zip) +[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.j3.hydrogen.EN.v1.0.3.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.j3.hydrogen.DE.v1.0.3.zip) **Joomla Plugin - Helium:** -[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.j3.helium.EN.v1.0.2.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.2/ocn.j3.helium.DE.v1.0.2.zip) +[English](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.j3.helium.EN.v1.0.3.zip) / [German](https://github.com/thexmanxyz/Owl-Carousel-Neo-Gantry/releases/download/v1.0.3/ocn.j3.helium.DE.v1.0.3.zip) ___ ## Automatic Installation (Joomla only) diff --git a/build/build.bat b/build/build.bat index 62cf798..1a084a9 100644 --- a/build/build.bat +++ b/build/build.bat @@ -29,7 +29,7 @@ set scr_log_files=0 REM --- project variables --- set prj_id=ocn -set prj_rev=v1.0.2 +set prj_rev=v1.0.3 set prj_name=owlcarousel-neo set prj_fullname=Owl Carousel Neo set prj_title_hr=-------------------- diff --git a/platform/joomla/global/owlcarousel-neo.xml b/platform/joomla/global/owlcarousel-neo.xml index 1d82a79..9683a10 100644 --- a/platform/joomla/global/owlcarousel-neo.xml +++ b/platform/joomla/global/owlcarousel-neo.xml @@ -1,8 +1,8 @@ Owl Carousel Neo - Gantry Particle (Global) - 1.0.2 - 26.06.2019 + 1.0.3 + 29.06.2019 Andreas Kar andreas.kar@gmx.at https://gantryprojects.com diff --git a/platform/joomla/global/translation/de/owlcarousel-neo.xml b/platform/joomla/global/translation/de/owlcarousel-neo.xml index 6fd3b66..099b099 100644 --- a/platform/joomla/global/translation/de/owlcarousel-neo.xml +++ b/platform/joomla/global/translation/de/owlcarousel-neo.xml @@ -1,8 +1,8 @@ Owl Carousel Neo - Gantry Particle (Global) - 1.0.2 - 26.06.2019 + 1.0.3 + 29.06.2019 Andreas Kar andreas.kar@gmx.at https://gantryprojects.com diff --git a/platform/joomla/helium/owlcarousel-neo.xml b/platform/joomla/helium/owlcarousel-neo.xml index 9fdc958..c35e598 100644 --- a/platform/joomla/helium/owlcarousel-neo.xml +++ b/platform/joomla/helium/owlcarousel-neo.xml @@ -1,8 +1,8 @@ Owl Carousel Neo - Gantry Particle (Helium) - 1.0.2 - 26.06.2019 + 1.0.3 + 29.06.2019 Andreas Kar andreas.kar@gmx.at https://gantryprojects.com diff --git a/platform/joomla/helium/translation/de/owlcarousel-neo.xml b/platform/joomla/helium/translation/de/owlcarousel-neo.xml index 5ed46fa..8339b4c 100644 --- a/platform/joomla/helium/translation/de/owlcarousel-neo.xml +++ b/platform/joomla/helium/translation/de/owlcarousel-neo.xml @@ -1,8 +1,8 @@ Owl Carousel Neo - Gantry Particle (Helium) - 1.0.2 - 26.06.2019 + 1.0.3 + 29.06.2019 Andreas Kar andreas.kar@gmx.at https://gantryprojects.com diff --git a/platform/joomla/hydrogen/owlcarousel-neo.xml b/platform/joomla/hydrogen/owlcarousel-neo.xml index 797294b..96a94a8 100644 --- a/platform/joomla/hydrogen/owlcarousel-neo.xml +++ b/platform/joomla/hydrogen/owlcarousel-neo.xml @@ -1,8 +1,8 @@ Owl Carousel Neo - Gantry Particle (Hydrogen) - 1.0.2 - 26.06.2019 + 1.0.3 + 29.06.2019 Andreas Kar andreas.kar@gmx.at https://gantryprojects.com diff --git a/platform/joomla/hydrogen/translation/de/owlcarousel-neo.xml b/platform/joomla/hydrogen/translation/de/owlcarousel-neo.xml index 941e133..1a45061 100644 --- a/platform/joomla/hydrogen/translation/de/owlcarousel-neo.xml +++ b/platform/joomla/hydrogen/translation/de/owlcarousel-neo.xml @@ -1,8 +1,8 @@ Owl Carousel Neo - Gantry Particle (Hydrogen) - 1.0.2 - 26.06.2019 + 1.0.3 + 29.06.2019 Andreas Kar andreas.kar@gmx.at https://gantryprojects.com diff --git a/src/default/owlcarousel-neo.html.twig b/src/default/owlcarousel-neo.html.twig index 2eb24df..05b5576 100644 --- a/src/default/owlcarousel-neo.html.twig +++ b/src/default/owlcarousel-neo.html.twig @@ -114,16 +114,18 @@ {% for item in particle.items %} {% set showItem = item.showItem|default('yes') %} - {% set format = (showItem == 'once') ? 'Y-m-d' : 'm-d' %} - {% set start, now, end = item.startDate|date(format), "now"|date(format), item.endDate|date(format) %} - {% if showItem == 'once' %} - {% if start <= now and end >= now %} - {% set showItem = 'yes' %} - {% endif %} - {% elseif showItem == 'annual' %} - {% if (start <= end and start <= now and end >= now) or - (start > end and (start <= now or end >= now)) %} - {% set showItem = 'yes' %} + {% if showItem != 'yes' and showItem != 'no' %} + {% set format = (showItem == 'once') ? 'Y-m-d' : 'm-d' %} + {% set start, now, end = item.startDate|date(format), "now"|date(format), item.endDate|date(format) %} + {% if showItem == 'once' %} + {% if start <= now and end >= now %} + {% set showItem = 'yes' %} + {% endif %} + {% elseif showItem == 'annual' %} + {% if (start <= end and start <= now and end >= now) or + (start > end and (start <= now or end >= now)) %} + {% set showItem = 'yes' %} + {% endif %} {% endif %} {% endif %} {% if showItem == 'yes' %}