feat: many changes
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: cloonar/cards
|
||||
typeName: cloonar_cards
|
||||
group: default
|
||||
prefixFields: true
|
||||
prefixType: full
|
||||
iconIdentifier: 'content-card-container'
|
||||
fields:
|
||||
-
|
||||
identifier: header
|
||||
useExistingField: true
|
||||
-
|
||||
identifier: bodytext
|
||||
type: Textarea
|
||||
enableRichtext: false
|
||||
useExistingField: true
|
||||
-
|
||||
identifier: cards
|
||||
type: Collection
|
||||
labelField: header
|
||||
fields:
|
||||
-
|
||||
identifier: header
|
||||
type: Text
|
||||
-
|
||||
identifier: bodytext
|
||||
type: Textarea
|
||||
enableRichtext: true
|
||||
rows: 15
|
||||
-
|
||||
identifier: images
|
||||
type: File
|
||||
extendedPalette: false
|
||||
minitems: 1
|
||||
maxitems: 1
|
||||
allowed: common-image-types
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file datatype="plaintext" original="labels.xlf" source-language="en" date="2024-12-12T00:46:08+00:00" product-name="cloonar/hero">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="title">
|
||||
<source>Cards</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description">
|
||||
<source>Card Element will show a list of cards</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:layout name="Default" />
|
||||
|
||||
<f:section name="Main">
|
||||
<strong>Card Container</strong>
|
||||
<f:if condition="{data.header}">
|
||||
<p><strong>Header:</strong> {data.header}</p>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,55 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:layout name="Default" />
|
||||
|
||||
<f:section name="Header" />
|
||||
|
||||
<f:section name="Main">
|
||||
<div class="card-container">
|
||||
<f:if condition="{data.header}">
|
||||
<h2><f:format.html parseFuncTSPath="lib.parseFunc_RTE">{data.header}</f:format.html></h2>
|
||||
</f:if>
|
||||
<f:if condition="{data.bodytext}">
|
||||
<f:then>
|
||||
<div class="max-w-3xl prose lg:prose-lg">
|
||||
<p>{data.bodytext}</p>
|
||||
</div>
|
||||
</f:then>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.cards}">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<f:for each="{data.cards}" as="card">
|
||||
<div class="card-flip group perspective" tabindex="0">
|
||||
<div class="card-flip-inner relative w-full h-64 preserve-3d group-hover:rotate-y-180 group-focus:rotate-y-180 duration-500">
|
||||
<div class="card-front absolute w-full h-full backface-hidden overflow-hidden shadow-lg">
|
||||
<f:if condition="{card.images}">
|
||||
<f:then>
|
||||
<f:image image="{card.images.0}" alt="{card.images.0.alternative}" class="w-full h-full object-cover grayscale group-hover:grayscale-0 transition-all duration-500" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="w-full h-full bg-gray-300 flex items-center justify-center">
|
||||
<span class="text-gray-500">No Image</span>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<div class="absolute inset-0 bg-black bg-opacity-40 flex items-center justify-center">
|
||||
<h3 class="text-white text-xl font-bold text-center p-4">{card.header}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-back absolute w-full h-full backface-hidden rotate-y-180 bg-gray-100 shadow-lg p-6 overflow-y-auto">
|
||||
<h4 class="text-lg font-semibold mb-2">{card.header}</h4>
|
||||
<div class="text-sm">
|
||||
<f:format.html>{card.bodytext}</f:format.html>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user