Skip to content

Commit

Permalink
Merge pull request #23 from TYPO3incubator/feature/ce-textmedia
Browse files Browse the repository at this point in the history
[FEATURE] Add the template to the text media element
  • Loading branch information
OttoAndras authored Apr 11, 2024
2 parents ccce248 + ed5d32c commit 867782e
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html
data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>
<div class="background-secondary py-12">
<div class="container px-5 mx-auto">
<f:render partial="Content/Header"
arguments="{headerLayout: data.header_layout, headerStyle: data.header_style, header: data.header}"/>
<div class="grid md:grid-cols-6 grid-cols-4 gap-5 md:gap-8">
<f:if condition="{data.assets}">
<f:for each="{data.assets}" as="media">
<f:image src="{media.uid}" treatIdAsReference="1" class="object-cover h-full w-full" width="300"/>
</f:for>
</f:if>
</div>
</div>
</div>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html
data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>
<div class="mt-8">
<f:render partial="Content/Header"
arguments="{headerLayout: data.header_layout, headerStyle: data.header_style, header: data.header}"/>
<div class="grid md:grid-cols-4 grid-cols-2 gap-5 md:gap-8">
<f:if condition="{data.assets}">
<f:for each="{data.assets}" as="media">
<div class="rounded background-white p-5 flex justify-center">
<f:image src="{media.uid}" treatIdAsReference="1" class="h-16 w-auto object-contain" width="400"/>
</div>
</f:for>
</f:if>
</div>
</div>
</html>
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
<h1>TEXTMEDIA</h1>
<html
data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
>
<div class="background-secondary py-12">
<div class="container px-5 mx-auto">
<div class="grid gap-8 md:grid-cols-2">
<f:switch expression="{data.imageorient}">
<f:case value="1">
<f:render section="text" arguments="{data: data}"/>
<f:render section="media" arguments="{data: data}"/>
</f:case>
<f:defaultCase>
<f:render section="media" arguments="{data: data}"/>
<f:render section="text" arguments="{data: data}"/>
</f:defaultCase>
</f:switch>
</div>
</div>
</div>
<f:section name="text">
<div class="flex items-center">
<div>
<f:render partial="Content/Header"
arguments="{headerLayout: data.header_layout, headerStyle: data.header_style, header: data.header}"/>
<div class="rte">
<f:format.html>{data.bodytext}</f:format.html>
</div>
</div>
</div>
</f:section>
<f:section name="media">
<div class="md:flex justify-center items-center">
<div class="aspect-square rounded overflow-hidden rotate-left max-w-80">
<f:if condition="{data.assets}">
<f:for each="{data.assets}" as="media">
<f:image src="{media.uid}" treatIdAsReference="1" class="object-cover h-full w-full" width="400"/>
</f:for>
</f:if>
</div>
</div>
</f:section>
</html>

0 comments on commit 867782e

Please sign in to comment.