feat: add news detail design
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<f:layout name="General" />
|
||||
|
||||
<f:section name="content">
|
||||
<!-- First image if present -->
|
||||
<f:if condition="{newsItem.media}">
|
||||
<div class="news-detail__main-image">
|
||||
<figure>
|
||||
<f:image image="{newsItem.media.0.originalResource}" alt="{newsItem.media.0.originalResource.alternative}" title="{newsItem.media.0.originalResource.title}" loading="lazy" />
|
||||
</figure>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<!-- News title -->
|
||||
<h1 class="news-detail__title">{newsItem.title}</h1>
|
||||
|
||||
<!-- Teaser text -->
|
||||
<f:if condition="{newsItem.teaser}">
|
||||
<div class="news-detail__teaser">
|
||||
{newsItem.teaser}
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<!-- Bodytext -->
|
||||
<div class="news-detail__bodytext">
|
||||
<f:format.html>
|
||||
{newsItem.bodytext}
|
||||
</f:format.html>
|
||||
</div>
|
||||
|
||||
<!-- Content elements if present -->
|
||||
<f:if condition="{newsItem.contentElements}">
|
||||
<!-- content elements -->
|
||||
<div class="news-detail__content-elements">
|
||||
<f:cObject typoscriptObjectPath="lib.tx_news.contentElementRendering">{newsItem.contentElementIdList}</f:cObject>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<!-- Gallery if more than one picture -->
|
||||
<f:if condition="{f:count(subject: newsItem.media)} > 1">
|
||||
<div class="news-detail__gallery news-detail__gallery--grid">
|
||||
<f:for each="{newsItem.media}" as="mediaItem" iteration="iterator">
|
||||
<figure class="news-detail__gallery-item">
|
||||
<f:image image="{mediaItem.originalResource}" alt="{mediaItem.originalResource.alternative}" title="{mediaItem.originalResource.title}" loading="lazy" />
|
||||
</figure>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
@@ -25,17 +25,20 @@
|
||||
</f:section>
|
||||
|
||||
<f:section name="content">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<h2>{contentObjectData.header}</h2>
|
||||
</div>
|
||||
<f:if condition="{settings.listPid}">
|
||||
<f:then>
|
||||
<f:if condition="{settings.listPid}">
|
||||
<f:then>
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<h2>{contentObjectData.header}</h2>
|
||||
</div>
|
||||
<!-- Desktop button -->
|
||||
<f:link.page title="Alle Artikel" pageUid="{settings.listPid}" class="btn header-btn">Alle Artikel</f:link.page>
|
||||
</f:then>
|
||||
</f:if>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<h1><span class="tapered">{contentObjectData.header}</span></h1>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<!--TYPO3SEARCH_end-->
|
||||
<f:if condition="{news}">
|
||||
<f:then>
|
||||
|
||||
Reference in New Issue
Block a user