Permalink
Browse files

Merge branch 'develop' of https://github.com/gantry/gantry5 into develop

  • Loading branch information...
newkind committed Jan 10, 2019
2 parents c80b980 + 2d71896 commit b843f98b9790cd6903195e92902b37e08fe34b9f
@@ -1,10 +1,16 @@
# 5.4.28
## mm/dd/yyyy
## mm/dd/2019

1. [Common](#common)
1. [](#improved)
- Logo particle: Added logo image max height (#2424)
1. [](#bugfix)
- Social particle: Improved link target handling (#2214)
- Helium Copyright particle: fixed missing link (#2214)
1. [WordPress](#wordpress)
1. [](#new)
- Nothing yet

- Updated Timber to v1.8.4
# 5.4.27
## 12/14/2018

@@ -5,14 +5,15 @@
{% if (url == gantry.siteUrl()) %}{% set rel='rel="home"' %}{% endif %}
{% set class=(particle.class ? 'class="'~ particle.class ~'"') %}
{% set image = url(particle.image) %}

{% set height = particle.height ? 'style="max-height: ' ~ particle.height ~ '"' %}

{% if particle.link == true %}
<a href="{{ url }}" target="{{ particle.target|default('_self') }}" title="{{ particle.text }}" {{ rel|default('')|raw }} {{ class|default('')|raw }}>
{% else %}<div {{ class|default('')|raw }}>{% endif %}
{% if particle.svg is not empty %}
{{ particle.svg|raw }}
{% elseif image %}
<img src="{{ url(particle.image) }}" alt="{{ particle.text }}" />
<img src="{{ url(particle.image) }}" {{ height|default('')|raw }} alt="{{ particle.text }}" />
{% else %}
{{ particle.text|default('Logo') }}
{% endif %}
@@ -35,7 +35,13 @@ form:
type: input.imagepicker
label: Image
description: Select desired logo image.


height:
type: input.text
label: Maximum Height
description: Set image max. height in rem, em, px, or percentage unit values. Leave empty to use the default height.
pattern: '\d+(\.\d+){0,1}(rem|em|ex|ch|vw|vh|vmin|vmax|%|px|cm|mm|in|pt|pc)'

link:
type: input.checkbox
label: Link
@@ -1,13 +1,20 @@
{% extends '@nucleus/partials/particle.html.twig' %}

{% if particle.target %}
{% set targetAttrib = ' target="' ~ particle.target|e ~ '"' %}
{% set targetAttrib = (target == '_blank') ? targetAttrib ~ ' rel="noopener noreferrer"' : targetAttrib %}
{% endif %}

{% block particle %}
{% if particle.title %}<h2 class="g-title">{{ particle.title|raw }}</h2>{% endif %}
<div class="g-social {{ particle.css.class }}">
{% for item in particle.items %}
<a target="{{ particle.target|default('_blank')|e }}" href="{{ item.link|e }}" title="{{ item.text|e }}" aria-label="{{ item.text|e }}">
{% set title = (item.title is not empty) ? item.title|e : item.text|e %}
{% set titleAttrib = (title is not empty) ? ' title="' ~ title ~ '" aria-label="' ~ title ~ '"' : '' %}
<a href="{{ item.link|e }}"{{ targetAttrib|raw }}{{ titleAttrib|raw }}>
{% if particle.display in ['both', 'icons_only'] %}<span class="{{ item.icon|e }}"></span>{% endif %}
{% if particle.display in ['both', 'text_only'] %}<span class="g-social-text">{{ item.text|e }}</span>{% endif %}
</a>
{% endfor %}
</div>
{% endblock %}
{% endblock %}
@@ -32,9 +32,12 @@ form:
label: Target
description: Target browser window when item is clicked.
placeholder: 'Select...'
default: _blank
default: ''
options:
_parent: Self
'': None
_self: Self
_parent: Parent
_top: Top
_blank: New Window

display:
@@ -56,7 +59,6 @@ form:
ajax: true

fields:

.name:
type: input.text
label: Name
@@ -70,6 +72,10 @@ form:
type: input.text
label: Text

.title:
type: input.text
label: Title

.link:
type: input.text
label: Link
label: Link

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -6,9 +6,9 @@
{% block particle %}
<div class="g-copyright {{ particle.css.class }}">
&copy;
{% if particle.owner.link is not empty %}<a target="{{ particle.target|default('_blank')|e }}" href="{{ particle.link|e }}" title="{{ particle.owner|e }}">{% endif %}
{% if particle.link is not empty %}<a target="{{ particle.target|default('_blank')|e }}" href="{{ particle.link|e }}" title="{{ particle.owner|e }}">{% endif %}
{{ particle.owner|e }}
{% if particle.owner.link is not empty %}</a>{% endif %}
{% if particle.link is not empty %}</a>{% endif %}
{% if (start_date != end_date) %}{{ start_date|e }} - {% endif %}
{{ end_date|e }}
{% if particle.additional.text is not empty %}<br />{{ particle.additional.text|raw }}{% endif %}

0 comments on commit b843f98

Please sign in to comment.