Browse Source

Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme

dependabot/npm_and_yarn/acorn-5.7.4
Rob Drew 6 years ago
parent
commit
22f232cd63
  1. 35
      templates/views/views-view-fields--recent-articles-masonry.html.twig

35
templates/views/views-view-fields--recent-articles-masonry.html.twig

@ -2,29 +2,32 @@
{#{{dump(fields.field_article_type.content|striptags|trim)}}#} {#{{dump(fields.field_article_type.content|striptags|trim)}}#}
{% if fields.field_article_type.content|striptags|trim == "Article" %} {% if fields.field_article_type.content|striptags|trim == "Article" %}
{% set _icon_ = 'fa-file-text-o' %} {% set _icon_ = 'fa-file-text-o' %}
{% set _color_ = 'blue' %} {% set _color_ = 'blue' %}
{% elseif fields.field_article_type.content|striptags|trim == "Peer-reviewed article" %}
{% set _icon_ = 'fa-volume-up' %}
{% set _color_ = 'red' %}
{% elseif fields.field_article_type.content|striptags|trim == "Audio/visual art" %} {% elseif fields.field_article_type.content|striptags|trim == "Audio/visual art" %}
{% set _icon_ = 'fa-volume-up' %} {% set _icon_ = 'fa-volume-up' %}
{% set _color_ = 'red' %} {% set _color_ = 'red' %}
{% elseif fields.field_article_type.content|striptags|trim == "Blog post" %} {% elseif fields.field_article_type.content|striptags|trim == "Blog post" %}
{% set _icon_ = 'fa-rss' %} {% set _icon_ = 'fa-rss' %}
{% set _color_ = 'green' %} {% set _color_ = 'green' %}
{% elseif fields.field_article_type.content|striptags|trim == "Creative writing" %} {% elseif fields.field_article_type.content|striptags|trim == "Creative writing" %}
{% set _icon_ = 'fa-pencil-square-o' %} {% set _icon_ = 'fa-pencil-square-o' %}
{% set _color_ = 'teal' %} {% set _color_ = 'teal' %}
{% elseif fields.field_article_type.content|striptags|trim == "News" %} {% elseif fields.field_article_type.content|striptags|trim == "News" %}
{% set _icon_ = 'fa-newspaper-o' %} {% set _icon_ = 'fa-newspaper-o' %}
{% set _color_ = 'purple' %} {% set _color_ = 'purple' %}
{% elseif fields.field_article_type.content|striptags|trim == "Note" %} {% elseif fields.field_article_type.content|striptags|trim == "Note" %}
{% set _icon_ = 'fa-envelope-open-o' %} {% set _icon_ = 'fa-envelope-open-o' %}
{% set _color_ = 'aqua' %} {% set _color_ = 'aqua' %}
{% elseif fields.field_article_type.content|striptags|trim == "Notice" %} {% elseif fields.field_article_type.content|striptags|trim == "Notice" %}
{% set _icon_ = 'fa-exclamation-circle' %} {% set _icon_ = 'fa-exclamation-circle' %}
{% set _color_ = 'teal' %} {% set _color_ = 'teal' %}
{% else %} {% else %}
{% set _icon_ = '' %} {% set _icon_ = '' %}
{% set _color_ = '' %} {% set _color_ = '' %}
{% endif %} {% endif %}
<div class="{{_color_}} teaser-card card mb-4 shadow-sm"> <div class="{{_color_}} teaser-card card mb-4 shadow-sm">

Loading…
Cancel
Save