Fix section menu styles

This commit is contained in:
Björn Fromme
2022-03-21 15:33:53 +01:00
parent 92e0c94a59
commit 00340fba1f
2 changed files with 47 additions and 37 deletions
@@ -1,27 +1,32 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default" />
<f:section name="Main">
<f:spaceless>
<f:if condition="{menu}">
<div class="flex flex-col space-y-2">
<f:for each="{menu}" as="page">
<f:if condition="{page.content}">
<f:for each="{page.content}" as="element">
<f:if condition="{element.data.header}">
<button type="button"
class="button w-full"
data-controller="scroll-to"
data-scroll-to-target-value="c{element.data.uid}"
data-action="scroll-to#scroll">
{element.data.header}
</button>
</f:if>
</f:for>
</f:if>
</f:for>
</div>
<ep:container data="{data}">
<div class="flex flex-col space-y-2 max-w-screen-sm">
<f:for each="{menu}" as="page">
<f:if condition="{page.content}">
<f:for each="{page.content}" as="element">
<f:if condition="{element.data.header}">
<button type="button"
class="button"
data-controller="scroll-to"
data-scroll-to-target-value="c{element.data.uid}"
data-action="scroll-to#scroll">
{element.data.header}
</button>
</f:if>
</f:for>
</f:if>
</f:for>
</div>
</ep:container>
</f:if>
</f:spaceless>
</f:section>
@@ -1,28 +1,33 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default" />
<f:section name="Main">
<f:if condition="{menu}">
<div class="flex flex-col space-y-2">
<f:for each="{menu}" as="page">
<a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
{page.title}
</a>
<f:if condition="{page.content}">
<ul>
<f:for each="{page.content}" as="element">
<li>
<a href="{page.link}#c{element.data.uid}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{element.data.header}">
{element.data.header}
</a>
</li>
</f:for>
</ul>
</f:if>
</f:for>
</div>
<ep:container data="{data}">
<div class="flex flex-col space-y-2 max-w-screen-sm">
<f:for each="{menu}" as="page">
<a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}" class="button">
{page.title}
</a>
<f:if condition="{page.content}">
<ul>
<f:for each="{page.content}" as="element">
<li>
<a href="{page.link}#c{element.data.uid}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{element.data.header}" class="button">
{element.data.header}
</a>
</li>
</f:for>
</ul>
</f:if>
</f:for>
</div>
</ep:container>
</f:if>
</f:section>