feat: snow reports on TYPO3 13, with a page type for the static pages
The snow report list ("Schneehöhen" plugin) is ported from TYPO3 10:
SnowreportController, SnowreportRepository::getSnowreportsForRegions(),
the plugin registration with its flexform (regions) and the template,
which now formats dates with d.m.Y.
Page type 1705 (/<page>/snowreport) renders only the snow report plugins
of a page, like /form for forms. The static pages of the hybrid setup can
load it to replace the snow reports frozen at export time; each list
carries id="snowreport-<content uid>" for hx-select, since TYPO3 10 gives
the plugin no element of its own. ep:import-snowreport already flushes
the page cache after each import. The suffix is in the PageType enhancer
of every site with snow reports.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat: the snow report box includes the spacing of its content element
id="snowreport-<content uid>" moves from the list to a wrapper around
ep:container. The static pages of the hybrid setup no longer export the
snow reports at all, only an empty placeholder that loads the whole box,
spacing included, from /<page>/snowreport, so a page never shows
outdated snow depths.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
62f3bee230
commit
ca2fdc1e13
12 files changed
+211
-1
No files matched your search
@@ -0,0 +1,61 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
||||
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:layout name="Default"/>
|
||||
|
||||
<f:section name="Main">
|
||||
<f:comment>
|
||||
The id lets the static pages of the hybrid setup pick this list, with the spacing of
|
||||
ep:container, out of the snow report page type (/path/snowreport), which renders every
|
||||
snow report plugin of a page.
|
||||
</f:comment>
|
||||
<div id="snowreport-{data.uid}">
|
||||
<ep:container data="{data}">
|
||||
<div class="flex flex-col space-y-2">
|
||||
<f:for each="{list}" as="snowreport">
|
||||
<div class="grid md:grid-cols-3 md:gap-y-0">
|
||||
<div class="md:col-span-1 bg-ep-primary-dark p-2 flex items-start space-x-2">
|
||||
{ep:icon(icon: 'flag-{snowreport.countryCode -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6')}
|
||||
<f:link.typolink parameter="{snowreport.regionDetailPage}"
|
||||
title="{snowreport.regionName}"
|
||||
class="text-white uppercase text-lg">
|
||||
{snowreport.regionName}
|
||||
</f:link.typolink>
|
||||
</div>
|
||||
<div class="md:col-span-2 bg-ep-primary-dark/20 p-2">
|
||||
<f:if condition="{snowreport.inSeason}">
|
||||
<f:then>
|
||||
<ul class="flex flex-col space-y-1">
|
||||
<li>
|
||||
<strong>Berg/Tal:</strong> {snowreport.snow_level_mountain -> v:or(alternative: '-')}/{snowreport.snow_level_valley -> v:or(alternative: '-')} cm
|
||||
</li>
|
||||
<li>
|
||||
<strong>Qualität:</strong> {snowreport.snow_quality}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Geöffnete Lifte:</strong> <f:if condition="{snowreport.lifts_opened} > 0"><f:then>{snowreport.lifts_opened}/{snowreport.lifts_total}</f:then><f:else>keine Angabe</f:else></f:if>
|
||||
</li>
|
||||
<li>
|
||||
<strong>Letzter Schneefall:</strong> {f:if(condition: snowreport.last_snowfall, then: '{snowreport.last_snowfall -> f:format.date(format: \'d.m.Y\')}', else: 'keine Angabe')}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Letzte Akt.:</strong> {snowreport.last_update -> f:format.date(format: 'd.m.Y')}
|
||||
</li>
|
||||
</ul>
|
||||
</f:then>
|
||||
<f:else>
|
||||
Saison vom {snowreport.seasonStart -> f:format.date(format: 'd.m.Y')} bis {snowreport.seasonEnd -> f:format.date(format: 'd.m.Y')}
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</ep:container>
|
||||
</div>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user