Browse Source

fixing teasers

dependabot/npm_and_yarn/acorn-5.7.4
rdrew 6 years ago
parent
commit
7c14e4dec4
  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)}}#}
{% if fields.field_article_type.content|striptags|trim == "Article" %}
{% set _icon_ = 'fa-file-text-o' %}
{% set _color_ = 'blue' %}
{% set _icon_ = 'fa-file-text-o' %}
{% 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" %}
{% set _icon_ = 'fa-volume-up' %}
{% set _color_ = 'red' %}
{% set _icon_ = 'fa-volume-up' %}
{% set _color_ = 'red' %}
{% elseif fields.field_article_type.content|striptags|trim == "Blog post" %}
{% set _icon_ = 'fa-rss' %}
{% set _color_ = 'green' %}
{% set _icon_ = 'fa-rss' %}
{% set _color_ = 'green' %}
{% elseif fields.field_article_type.content|striptags|trim == "Creative writing" %}
{% set _icon_ = 'fa-pencil-square-o' %}
{% set _color_ = 'teal' %}
{% set _icon_ = 'fa-pencil-square-o' %}
{% set _color_ = 'teal' %}
{% elseif fields.field_article_type.content|striptags|trim == "News" %}
{% set _icon_ = 'fa-newspaper-o' %}
{% set _color_ = 'purple' %}
{% set _icon_ = 'fa-newspaper-o' %}
{% set _color_ = 'purple' %}
{% elseif fields.field_article_type.content|striptags|trim == "Note" %}
{% set _icon_ = 'fa-envelope-open-o' %}
{% set _color_ = 'aqua' %}
{% set _icon_ = 'fa-envelope-open-o' %}
{% set _color_ = 'aqua' %}
{% elseif fields.field_article_type.content|striptags|trim == "Notice" %}
{% set _icon_ = 'fa-exclamation-circle' %}
{% set _color_ = 'teal' %}
{% set _icon_ = 'fa-exclamation-circle' %}
{% set _color_ = 'teal' %}
{% else %}
{% set _icon_ = '' %}
{% set _color_ = '' %}
{% set _icon_ = '' %}
{% set _color_ = '' %}
{% endif %}
<div class="{{_color_}} teaser-card card mb-4 shadow-sm">

Loading…
Cancel
Save