{% extends '@nucleus/partials/particle.html.twig' %} {% set attr_extra = '' %} {% if particle.extra %} {% for attributes in particle.extra %} {% for key, value in attributes %} {% set attr_extra = attr_extra ~ ' ' ~ key|e ~ '="' ~ value|e('html_attr') ~ '"' %} {% endfor %} {% endfor %} {% endif %} {% set article_settings = particle.article %} {% set filter = article_settings.filter %} {% set sort = article_settings.sort %} {% set limit = article_settings.limit %} {% set display = article_settings.display %} {# Category Finder #} {% set category_options = filter.categories ? {id: [filter.categories|split(','), 0]} : {} %} {% set categories = joomla.finder('category', category_options).published(1).language().limit(0).find() %} {# Content Finder #} {% if filter.articles %} {% set article_options = filter.articles ? {id: [filter.articles|replace(' ', '')|split(',')]} : {} %} {% set article_finder = joomla.finder('content', article_options).published(1).language() %} {% else %} {% set article_finder = joomla.finder('content').category(categories).published(1).language() %} {% endif %} {% set featured = filter.featured|default('include') %} {% if featured == 'exclude' %} {% do article_finder.featured(false) %} {% elseif featured == 'only' %} {% do article_finder.featured(true) %} {% endif %} {% set articles = article_finder.order(sort.orderby, sort.ordering).limit(limit.total).start(limit.start).find() %} {% set particleheading %}
{% if particle.mainheading %}

{{ particle.mainheading|raw }}

{% endif %} {% if particle.introtext %}

{{ particle.introtext|raw }}

{% endif %}
{% endset %} {%- set slideshow_settings -%} { autoplay:{{ particle.autoplay|default("true")|e }}, autoplayInterval:{{ particle.autoplayInterval|default(7000)|e }}, kenburns:{{ particle.kenburns|default("false")|e }}, animation:'{{ particle.animation|default('fade')|e }}', duration:{{ particle.animationDuration|default(500)|e }}, pauseOnHover:{{ particle.pauseOnHover|default("true")|e }}, height:'{{ particle.height|default('auto')|e }}' } {%- endset -%} {% set slideshow_slides %} {% for article in articles %} {% set slide_media %} {% if display.image.enabled and article.images.image_intro or article.images.image_fulltext %} {% if article.images.image_intro and display.image.enabled == 'intro' or display.image.enabled == 'show' %} {{ display.title.limit ? article.title|truncate_text(display.title.limit) : article.title }} {% elseif article.images.image_fulltext and display.image.enabled == 'full' %} {{ display.title.limit ? article.title|truncate_text(display.title.limit) : article.title }} {% endif %} {% endif %} {% endset %} {% set slide_overlay %} {% set overlay_position %} {%- if particle.overlayposition|default('bottom') == 'bottom' -%} uk-overlay-bottom {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'left' -%} uk-overlay-left {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'right' -%} uk-overlay-right {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'top' -%} uk-overlay-top {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'bottom-left' -%} uk-flex-bottom {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'bottom-center' -%} uk-flex-bottom uk-flex-center {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'bottom-right' -%} uk-flex-bottom uk-flex-right {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'middle-left' -%} uk-flex-middle {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'middle-center' -%} uk-flex-middle uk-flex-center {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'middle-right' -%} uk-flex-middle uk-flex-right {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'top-left' -%} uk-flex-top {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'top-center' -%} uk-flex-top uk-flex-center {%- endif -%} {%- if particle.overlayposition|default('bottom') == 'top-right' -%} uk-flex-top uk-flex-right {%- endif -%} {%- endset -%} {%- set slide_overlay_animation -%} {%- if particle.overlayanimation|default('fade') == 'fade' -%} uk-overlay-fade {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-left' -%} uk-overlay-slide-left {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-right' -%} uk-overlay-slide-right {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-top' -%} uk-overlay-slide-top {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-bottom' -%} uk-overlay-slide-bottom {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-left-short' -%} uk-overlay-slide-left uk-overlay-left-short {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-right-short' -%} uk-overlay-slide-right uk-overlay-right-short {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-top-short' -%} uk-overlay-slide-top uk-overlay-top-short {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'slide-bottom-short' -%} uk-overlay-slide-bottom uk-overlay-bottom-short {%- endif -%} {%- if particle.overlayanimation|default('fade') == 'scale' -%} uk-overlay-scale {%- endif -%} {%- endset -%} {% set articletitle %}

{%- if display.title.enabled|default('show') == 'show' -%} {{- display.title.limit ? article.title|truncate_text(display.title.limit) : article.title -}} {%- else -%} {{- display.title.limit ? article.title|truncate_text(display.title.limit) : article.title -}} {%- endif -%}

{% endset %} {% set articledetails %}
{% if display.date.enabled %} {%- if display.date.enabled == 'published' -%} {{- article.publish_up|date(display.date.format) -}} {%- elseif display.date.enabled == 'modified' -%} {{- article.modified|date(display.date.format) -}} {%- else -%} {{- article.created|date(display.date.format) -}} {%- endif -%} {% endif %} {% if display.author.enabled %} {%- if display.author.enabled|default('show') == 'show' -%} {{- article.author.name -}} {%- else -%} {% if article.created_by_alias %} {{- article.created_by_alias -}} {%- else -%} {{- article.author.name -}} {%- endif -%} {%- endif -%} {% endif %} {% if display.category.enabled %} {% set category_link = display.category.enabled == 'link' %} {% set cat = article.categories|last %} {% if category_link %} {{- cat.title -}} {% else %} {{- cat.title -}} {% endif %} {% endif %} {% if display.hits.enabled %} {{- article.hits -}} {% endif %}
{% endset %} {% set readmorebutton %}
{% endset %} {% set articletext %} {% set article_text = display.text.type == 'intro' ? article.introtext : article.text %}
{%- if display.text.formatting == 'text' -%} {{- article_text|truncate_text(display.text.limit)|raw -}} {%- else -%} {{- gantry.platform.filter(article_text)|truncate_html(display.text.limit)|html|raw -}} {%- endif -%} {%- if particle.overlaystyle|default('style1') == 'style2' and display.read_more.enabled -%} {{ readmorebutton }} {%- endif -%}
{% endset %} {% if particle.overlaystyle|default('style1') == 'style1' or particle.overlaystyle|default('style1') == 'style3' %} {% if (particle.overlayposition|default('bottom') == 'bottom') or (particle.overlayposition|default('bottom') == 'top') or (particle.overlayposition|default('bottom') == 'left') or (particle.overlayposition|default('bottom') == 'right') %}
{% if display.title.enabled %} {{ articletitle }} {% endif %} {% if particle.articledetails|default('show') == 'show' %} {{ articledetails }} {% endif %} {% if display.text.type %} {{ articletext }} {% endif %} {% if particle.articledetails|default('show') == 'showbottom' %} {{ articledetails }} {% endif %} {% if display.read_more.enabled %} {{ readmorebutton }} {% endif %}
{% else %}
{% if display.title.enabled %} {{ articletitle }} {% endif %} {% if particle.articledetails|default('show') == 'show' %} {{ articledetails }} {% endif %} {% if display.text.type %} {{ articletext }} {% endif %} {% if particle.articledetails|default('show') == 'showbottom' %} {{ articledetails }} {% endif %} {% if display.read_more.enabled %} {{ readmorebutton }} {% endif %}
{% endif %} {% endif %} {% if particle.overlaystyle|default('style1') == 'style2' %} {% if (particle.overlayposition|default('bottom') == 'bottom') or (particle.overlayposition|default('bottom') == 'top') or (particle.overlayposition|default('bottom') == 'left') or (particle.overlayposition|default('bottom') == 'right') %}
{% if display.title.enabled %} {{ articletitle }} {% endif %} {% if display.text.type or display.read_more.enabled %} {{ articletext }} {% endif %}
{% else %}
{% if display.title.enabled %} {{ articletitle }} {% endif %} {% if display.text.type or display.read_more.enabled %} {{ articletext }} {% endif %}
{% endif %} {% endif %} {% endset %}
  • {{ slide_media }} {% if display.title.enabled or particle.articledetails|default('show') == 'show' or display.text.type or display.read_more.enabled %} {{ slide_overlay }} {% endif %}
  • {% endfor %} {% endset %} {% block particle %}
    {% if particle.mainheading or particle.introtext %} {{ particleheading }} {% endif %}
    {% endblock %}