Commit 1ef2c637 authored by Michael Apfelthaler's avatar Michael Apfelthaler

Fix News Nav

parent 86dd2dd6
{% extends "index" %} {% extends "index" %}
{% block navigation %}
{{ include('components/navigationSubpage.twig') }}
{% endblock %}
{% block content %} {% block content %}
<div class="news maxWidthLimit"> <div class="subpage-mt">
{% for newsElement in craft.entries.section('news').all() %} <div class="news maxWidthLimit">
{% for newsElement in craft.entries.section('news').all() %}
{% set image = newsElement.images.one() %} {% set image = newsElement.images.one() %}
<a href="{{newsElement.url}}" class="news-item"> <a href="{{newsElement.url}}" class="news-item">
<div class="news-thumbnail"> <div class="news-thumbnail">
<img src="{{ craft.app.sites.primarySite.baseUrl }}/{{image.url}}" alt="{{image.title}}"> <img src="{{ craft.app.sites.primarySite.baseUrl }}/{{image.url}}" alt="{{image.title}}">
</div> </div>
<div class="news-details"> <div class="news-details">
<h3 class="news-heading">{{newsElement.title}}</h3> <h3 class="news-heading">{{newsElement.title}}</h3>
<p class="news-teaser"> <p class="news-teaser">
{{ newsElement.shortDescription|length > 100 ? newsElement.shortDescription|slice(0, 100) ~ '...' {{ newsElement.shortDescription|length > 100 ? newsElement.shortDescription|slice(0, 100) ~ '...'
:newsElement.shortDescription }} :newsElement.shortDescription }}
</p> </p>
</div> </div>
</a> </a>
{% endfor %} {% endfor %}
</div>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment