block 2.26 KB
Newer Older
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
1 2 3 4 5 6
{% if include.external_url %}
    {% assign url = include.external_url %}
{% elsif include.url %}
    {% assign url = include.url | prepend: site.baseurl %}
{% endif %}

Martin Fischbach's avatar
Martin Fischbach committed
7 8 9 10 11 12 13
{% if include.big %}
{% assign style = 'style="flex-basis: 35%;"' %}
{% else %}
{% assign style = "" %}
{% endif %}

<div class="block {{ include.class }}" {{ style }} >
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
14 15 16 17 18 19 20 21
    {%  if include.image %}
        {% if include.imagedimension %}
            {% assign dimension = include.imagedimension %}
        {% else %}
            {% assign dimension = "wide" %}
        {% endif %}
        {% if url %}
        	{% if url=="none" %}
22
				{% include image src=include.image dimension=dimension sizes="320px" class=include.imageclass style=include.imagestyle %}
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
23 24
            {% else %}
				<a href="{{ url }}">
25
					{% include image src=include.image dimension=dimension sizes="320px" class=include.imageclass style=include.imagestyle %}
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
26 27 28
				</a>
            {% endif %}
        {% else %}
29
            {% include image src=include.image dimension=dimension sizes="320px" class=include.imageclass style=include.imagestyle %}
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
        {% endif %}
    {% endif %}
    {% if include.title %}
        {% if url %}
        	{% if url=="none" %}
				<div class="title">
					{{ include.title }}
				</div>
	        {% else %}
				<a href="{{ url }}" class="title">
					{{ include.title }}
				</a>
			{% endif %}
        {% else %}
            <div class="title">
                {{ include.title }}
            </div>
        {% endif %}
    {% endif %}
    {% if include.teaser %}
        <div class="text">
            {{ include.teaser }}
        </div>
    {% endif %}
    <div class="footer">
        <div class="text">{% if site.language == "DE" %}{{ include.date | date: "%d.%m.%Y" }}{% else %}{{ include.meta }}{% endif %}</div>
        {% if include.external_url %}
            <a class="link" href="{{ include.external_url }}">
                <i class="icon-right-open"></i>{% if site.language == "DE" %}Zur Webseite{% else %}Go to website{% endif %}
            </a>
            {% elsif url=="none" %}
            {% elsif url %}
            <a class="link" href="{{ url }}">
                <i class="icon-right-open"></i>{% if site.language == "DE" %}Mehr{% else %}More{% endif %}
            </a>
        {% endif %}
    </div>
</div>