feat: design change to hero and add stats element
All checks were successful
Build / build (push) Successful in 2m28s
Build / deploy-stage (push) Successful in 3m30s
Build / switch-stage (push) Successful in 2m10s

This commit is contained in:
2024-12-12 23:52:34 +01:00
parent 7133371206
commit daa02d36d5
11 changed files with 207 additions and 96 deletions

View File

@@ -0,0 +1,46 @@
.frame-type-cloonar_stats .stats-wrapper {
display: flex;
flex-wrap: wrap;
gap: 2rem;
justify-content: space-between;
align-items: flex-start;
position: relative;
z-index: 10; /* Ensure it's on top of the hero container */
background: #fff;
padding: 3rem 1rem;
max-width: 1140px;
margin-left: auto;
margin-right: auto;
}
/* Each paragraph is treated as a column */
.frame-type-cloonar_stats .stats-wrapper p {
flex: 1 1 calc(25% - 2rem);
min-width: 150px;
text-align: center;
margin-bottom: 1rem;
}
/* Lead paragraphs have larger text for numbers */
.frame-type-cloonar_stats .stats-wrapper p.lead {
font-size: 2rem;
font-weight: bold;
color: #3c6418;
margin-bottom: 0.5rem;
}
.frame-type-cloonar_stats .stats-wrapper p:not(.lead) {
font-size: 0.9rem;
color: #444;
}
@media (max-width: 768px) {
.frame-type-cloonar_stats .stats-wrapper {
gap: 1rem;
padding: 2rem 1rem;
margin-top: -5rem; /* Adjust as needed for smaller screens */
}
.frame-type-cloonar_stats .stats-wrapper p {
flex: 1 1 100%;
}
}

View File

@@ -0,0 +1,10 @@
name: cloonar/stats
typeName: cloonar_stats
group: default
prefixFields: true
prefixType: full
fields:
- identifier: bodytext
type: Textarea
enableRichtext: true
useExistingField: true

View File

@@ -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" product-name="cloonar/stats">
<header/>
<body>
<trans-unit id="title">
<source>Statistics Block</source>
</trans-unit>
<trans-unit id="description">
<source>A responsive statistics content block with four editable columns.</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,16 @@
<html
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
data-namespace-typo3-fluid="true"
>
<f:layout name="Preview"/>
<f:section name="Header">
<be:link.editRecord uid="{data.uid}" table="{data.mainType}">
Statistics Preview
</be:link.editRecord>
</f:section>
<f:section name="Content">
</f:section>
</html>

View File

@@ -0,0 +1,13 @@
<f:layout name="Default" />
<f:section name="Header" />
<f:section name="Main">
<f:asset.css identifier="CBStats" href="{cb:assetPath()}/frontend.css" />
<div class="stats-wrapper">
<f:format.html>
{data.bodytext}
</f:format.html>
</div>
</f:section>