Skip to content

Commit

Permalink
Merge pull request #38 from TYPO3incubator/feature/spacings-bgcolor
Browse files Browse the repository at this point in the history
Feature/spacings bgcolor
  • Loading branch information
JuliaGru authored Apr 12, 2024
2 parents 109ca0f + 49ee588 commit 4e486ff
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 12 deletions.
9 changes: 7 additions & 2 deletions assets/scss/base/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ html {
@apply text-5xl font-bold font-heading block;
}

.heading-xl, form h2 {
.heading-xl {
@apply text-3xl font-bold font-heading block;
}

Expand All @@ -58,7 +58,6 @@ html {
h4,
h5,
span {
@apply mb-1;
&.default {
@apply text-lg font-bold font-heading block;
}
Expand Down Expand Up @@ -108,24 +107,29 @@ html {
&-label {
@apply inline-block mb-1 font-bold;
}

&-text {
@apply block mt-1 text-xs;
}

&-control {
@apply bg-white shadow appearance-none rounded w-full py-2 px-3 text-black leading-tight focus:outline-none focus:ring-2 resize-none;
}

&-check {
&-label {
@apply flex items-center gap-2;
}
}

&-checkbox {
@apply rounded h-5 w-5 accent-secondary-500;
}

&-radio {
@apply h-5 w-5 accent-secondary-500;
}

&-group {
@apply mb-4 last:mb-0;
}
Expand All @@ -140,6 +144,7 @@ html {
[type="file"] {
@apply text-primarytext;
}

[type="file"]::-webkit-file-upload-button {
@extend .btn;
@extend .btn-primary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugin.tx_form {
110 = EXT:success/Configuration/Sets/_LandingPage/Yaml/FormSetup.yaml
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ prototypes:
formElementsDefinition:
Form:
renderingOptions:
partialRootPaths:
20: 'EXT:success/Resources/Private/Templates/_LandingPage/Partials/Forms/'
translation:
translationFiles:
10: 'EXT:success/Resources/Private/Language/locallang_form.xlf'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@
</main>
<f:render partial="Footer" arguments="{_all}" />
<f:render partial="Page/Modal" />
<span class="heading-xxl heading-xl heading-lg form-group form-label form-text"></span>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@

<f:layout name="Default"/>
<f:section name="Main">
<div class="container px-5 mx-auto py-12 max-w-screen-md">
<f:cObject typoscriptObjectPath="tt_content.form_formframework.20" data="{rawData}"/>
<div class="container px-5 mx-auto max-w-screen-md">
<f:render partial="Content/Header"
arguments="{headerLayout: data.header_layout, headerStyle: data.header_style, header: data.header}"/>
<div class="mt-5">
<f:cObject typoscriptObjectPath="tt_content.form_formframework.20" data="{rawData}"/>
</div>
</div>
</f:section>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<f:defaultCase></f:defaultCase>
</f:switch>

<div id="c{data.uid}" class="{background} space-before-{data.space_before_class} space-before-{data.space_after_class}">
<div id="c{data.uid}" class="{background} space-before-{data.space_before_class} space-after-{data.space_after_class}">
<f:render section="Main" />
</div>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
<formvh:renderRenderable renderable="{page}">

<f:for each="{page.elements}" as="element">
<f:render partial="{element.templateName}" arguments="{element: element}" />
</f:for>
</formvh:renderRenderable>
</html>
23 changes: 18 additions & 5 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,23 @@ export default {
lighttext: 'var(--color-lighttext)',
},
extend: {},
safelist: [
'heading-xxl',
'heading-xl',
'heading-lg',
]
},
safelist: [
'heading-xxl',
'heading-xl',
'heading-lg',
'space-before-extra-small',
'space-before-small',
'space-before-medium',
'space-before-large',
'space-before-extra-large',
'space-after-extra-small',
'space-after-small',
'space-after-medium',
'space-after-large',
'space-after-extra-large',
'form-group',
'form-label',
'form-text'
]
}

0 comments on commit 4e486ff

Please sign in to comment.