fix: home template

This commit is contained in:
Tobias Reisinger 2020-01-25 14:34:09 +01:00
parent 5ad37ff475
commit d6a8b9328d
4 changed files with 27 additions and 18 deletions

View file

@ -2,11 +2,12 @@
{% block content %}
<div class="row">
<div class="col-12 col-md-6" height="100%">
<div class="col-12 col-md-6 mb-2" height="100%">
<h1>Herzlich Willkommen</h1>
<div width="100%">
{% include 'partials/osm.html.twig' %}
</div>
<div style="height: 45px;"><!-- SPACER FOR BUTTONS --></div>
<div style="position: absolute; bottom: 0;">
<a role="button" class="btn btn-primary" href="/kontakt">Kontakt</a>
{% include 'partials/socialmedia.html.twig' %}
@ -16,22 +17,30 @@ <h1>Herzlich Willkommen</h1>
<img width="100%" src="{{ url('theme://images/home_slideshow.gif') }}" />
</div>
</div>
<hr class="mb-5">
<div class="row">
<hr class="mb-4">
{{ page.content }}
<hr class="mb-4">
{% set news_page = pages.find('/news') %}
{% if news_page and news_page.collection() and news_page.collection()|first %}
{% set text_class = 'col-12' %}
{% set latest_news = news_page.collection()|first %}
{% if latest_news.media.images %}
{% if news_page and news_page.collection() and news_page.collection()|first %}
{% set text_class = 'col-12' %}
{% set news_latest = news_page.collection()|first %}
<div class="row">
<div class="col-12">
<h3>
<a class="text-reset" href="{{ news_latest.url }}">{{ news_latest.title }}</a>
</h3>
</div>
</div>
<div class="row">
{% if news_latest.media.images %}
{% set text_class = 'col-12 col-md-9' %}
<div class="col-12 col-md-3">
<img width="100%" src="{{ latest_news.media.images|first.url }}">
<img width="100%" src="{{ news_latest.media.images|first.url }}">
</div>
{% endif %}
<div class="{{ text_class }}">
{{ latest_news.content }}
{{ news_latest.summary }}
</div>
{% endif %}
</div>
{{ page.content }}
</div>
{% endif %}
{% endblock %}

View file

@ -6,7 +6,7 @@
{{ page.content }}
</div>
</div>
<div class="row">
<div class="row mb-3">
<div class="col-12">
{% include 'partials/socialmedia.html.twig' %}
</div>

View file

@ -21,10 +21,10 @@ <h3 >{{ page.header.subtitle }}</h3>
<p class="prev-next text-center">
{% if not page.isLast %}
<a class="btn" href="{{ page.prevSibling.url }}"><i class="fa fa-angle-left"></i> {{ 'THEME_QUARK.BLOG.ITEM.PREV_POST'|t }}</a>
<a class="btn" href="{{ page.prevSibling.url }}"><i class="fa fa-angle-left"></i> Vorheriger Eintrag</a>
{% endif %}
{% if not page.isFirst %}
<a class="btn" href="{{ page.nextSibling.url }}">{{ 'THEME_QUARK.BLOG.ITEM.NEXT_POST'|t }} <i class="fa fa-angle-right"></i></a>
<a class="btn" href="{{ page.nextSibling.url }}">Nächster Eintrag <i class="fa fa-angle-right"></i></a>
{% endif %}
</p>

View file

@ -2,10 +2,10 @@
{% if page.header.link %}
<{{ title_level }} class="p-name">
{% if page.header.continue_link is not same as(false) %}
<a href="{{ page.url }}"><i class="fa fa-angle-double-right u-url"></i></a>
<a href="{{ page.url }}"><i class="fa fa-angle-double-right"></i></a>
{% endif %}
<a href="{{ page.header.link }}" class="u-url">{{ page.title }}</a>
<a href="{{ page.header.link }}" class="text-reset">{{ page.title }}</a>
</{{ title_level }}>
{% else %}
<{{ title_level }} class="p-name my-1"><a href="{{ page.url }}" class="u-url">{{ page.title }}</a></{{ title_level }}>
<{{ title_level }} class="p-name my-1"><a href="{{ page.url }}" class="text-reset">{{ page.title }}</a></{{ title_level }}>
{% endif %}