ew_bloggy/Resources/Private/Templates/PageLayout/Header.html
2025-01-21 20:22:57 +01:00

105 lines
5.6 KiB
HTML

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:ew="http://typo3.org/ns/Evoweb/EwBloggy/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:if condition="{post}">
<f:asset.css identifier="ew-bloggy-pagelayout" href="EXT:ew_bloggy/Resources/Public/Css/pagelayout.min.css"/>
<div class="
tw-relative
tw-bg-white dark:tw-bg-component-bg
tw-rounded-component
shadow-component
tw-m-component
tw-border-solid
tw-border-l-12 tw-border-r-0 tw-border-b-0 tw-border-t-0
tw-border-green-600
">
<div class="tw-absolute tw-top-5 tw-left-4">
<core:iconForRecord table="pages" row="{post.asArray}" size="large" />
</div>
<div class="tw-relative tw-p-5 tw-pl-19 tw-min-h-19">
<div class="[&_>_*:first-child]:tw-mt-0 [&_>_*:last-child]:tw-mb-0">
<p><f:if condition="{post.abstract} || {post.description}">
<f:then>{f:if(condition: post.abstract, then: post.abstract, else: post.description)}</f:then>
<f:else><f:translate key="pagelayout.message.notabstractordescription" extensionName="ew_bloggy" /></f:else>
</f:if></p>
</div>
<div class="tw-grid tw-gap-2.5 tw-grid-cols-component">
<div class="tw-mt-5">
<h3 class="tw-text-xs tw-font-bold tw-mt-0 tw-mb-1.5"><f:translate key="pagelayout.section.published" extensionName="ew_bloggy" /></h3>
<div class="[&_>_*:first-child]:tw-mt-0 [&_>_*:last-child]:tw-mb-0">
<time datetime="{f:format.date(format: '%Y-%m-%dT%H:%M:%S-%z', date: post.publishDate)}" itemprop="datepublished">{f:format.date(format: '%d.%m.%Y - %H:%M', date: post.publishDate)}</time>
</div>
</div>
<div class="tw-mt-5">
<h3 class="tw-text-xs tw-font-bold tw-mt-0 tw-mb-1.5"><f:translate key="pagelayout.section.authors" extensionName="ew_bloggy" /></h3>
<div class="[&_>_*:first-child]:tw-mt-0 [&_>_*:last-child]:tw-mb-0">
<f:if condition="{post.authors}">
<f:then>
<ul class="tw-list-none tw-p-0">
<f:for each="{post.authors}" as="author">
<li>{author.name}</li>
</f:for>
</ul>
</f:then>
<f:else>
<p><f:translate key="pagelayout.message.noauthor" extensionName="ew_bloggy" /></p>
</f:else>
</f:if>
</div>
</div>
<div class="tw-mt-5">
<h3 class="tw-text-xs tw-font-bold tw-mt-0 tw-mb-1.5"><f:translate key="pagelayout.section.featuredimage" extensionName="ew_bloggy" /></h3>
<div class="[&_>_*:first-child]:tw-mt-0 [&_>_*:last-child]:tw-mb-0">
<f:if condition="{post.featuredImage}">
<f:then>
<f:image loading="lazy" class="tw-h-auto tw-max-w-full" image="{post.featuredImage}" alt="{post.featuredImage.alternative}" title="{post.featuredImage.title}" height="100c" width="200" />
</f:then>
<f:else>
<p><f:translate key="pagelayout.message.nofeaturedimage" extensionName="ew_bloggy" /></p>
</f:else>
</f:if>
</div>
</div>
<f:if condition="{post.tags}">
<div class="tw-mt-5">
<h3 class="tw-text-xs tw-font-bold tw-mt-0 tw-mb-1.5"><f:translate key="pagelayout.section.tags" extensionName="ew_bloggy" /></h3>
<div class="[&_>_*:first-child]:tw-mt-0 [&_>_*:last-child]:tw-mb-0">
<ul class="tw-list-none tw-p-0">
<f:for each="{post.tags}" as="tag">
<li class="tw-inline"><span class="badge badge-info">{tag.title}</span></li>
</f:for>
</ul>
</div>
</div>
</f:if>
<f:if condition="{post.categories}">
<div class="tw-mt-5">
<h3 class="tw-text-xs tw-font-bold tw-mt-0 tw-mb-1.5"><f:translate key="pagelayout.section.categories" extensionName="ew_bloggy" /></h3>
<div class="[&_>_*:first-child]:tw-mt-0 [&_>_*:last-child]:tw-mb-0">
<ul class="tw-list-none tw-p-0">
<f:for each="{post.categories}" as="category">
<li class="tw-inline"><span class="badge badge-info">{category.title}</span></li>
</f:for>
</ul>
</div>
</div>
</f:if>
</div>
</div>
<div class="tw-p-5 tw-pt-0">
<ew:link.be.post post="{post}" action="edit" class="btn btn-default">
<core:icon identifier="record-blog-post" />
<f:translate key="pagelayout.button.post.edit" extensionName="ew_bloggy" />
</ew:link.be.post>
</div>
</div>
</f:if>
</html>