-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] responsive background images for parallax element (#211)
- Loading branch information
1 parent
a8fcc37
commit 4782fa9
Showing
4 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
103 changes: 103 additions & 0 deletions
103
Configuration/TypoScript/Library/lib.responsiveBackgroundImage.setupts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
lib.responsiveBackgroundImage = TEXT | ||
lib.responsiveBackgroundImage { | ||
current = 1 | ||
wrap = responsiveBg| | ||
|
||
append = LOAD_REGISTER | ||
append { | ||
t3kit_responsiveBackgroundImage = TEXT | ||
t3kit_responsiveBackgroundImage { | ||
prepend = TEXT | ||
prepend { | ||
data = register:t3kit_responsiveBackgroundImage | ||
wrap = |, | ||
required = 1 | ||
} | ||
|
||
current = 1 | ||
trim = 1 | ||
} | ||
} | ||
|
||
} | ||
|
||
page.cssInline { | ||
1450 = FILES | ||
1450 { | ||
|
||
references.data = register:t3kit_responsiveBackgroundImage | ||
|
||
renderObj = COA | ||
renderObj { | ||
5 = LOAD_REGISTER | ||
5 { | ||
mediaImageIndex = TEXT | ||
mediaImageIndex { | ||
cObject = TEXT | ||
cObject { | ||
data = register:sectionIteration | ||
intval = 1 | ||
outerWrap = |+1 | ||
} | ||
|
||
prioriCalc = 1 | ||
} | ||
} | ||
|
||
10 = TEXT | ||
10 { | ||
prepend = TEXT | ||
prepend { | ||
data = file:current:uid | ||
noTrimWrap = |.responsiveBg| { background-image: url(/| | ||
} | ||
|
||
cObject = IMG_RESOURCE | ||
cObject { | ||
file { | ||
import.data = file:current:uid | ||
treatIdAsReference = 1 | ||
width = 767 | ||
} | ||
} | ||
|
||
append = TEXT | ||
append { | ||
value = ); } | ||
} | ||
} | ||
|
||
20 = TEXT | ||
20.cObject < .10 | ||
20 { | ||
cObject.cObject.file.width = 992px | ||
noTrimWrap = | @media (min-width: 768px) { | } | | ||
} | ||
|
||
30 = TEXT | ||
30.cObject < .10 | ||
30 { | ||
cObject.cObject.file.width = 1920 | ||
noTrimWrap = | @media (min-width: 992px) { | } | | ||
} | ||
60 = TEXT | ||
60.cObject < .10 | ||
60 { | ||
cObject.cObject.file.width = 1000 | ||
noTrimWrap = | @media (max-width: 767px) and (-webkit-min-device-pixel-ratio: 2), (max-width: 767px) and (min-resolution: 2dppx) { | } | | ||
} | ||
70 = TEXT | ||
70.cObject < .10 | ||
70 { | ||
cObject.cObject.file.width = 1536 | ||
noTrimWrap = | @media (min-width: 768px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 768px) and (min-resolution: 2dppx) { | } | | ||
} | ||
80 = TEXT | ||
80.cObject < .10 | ||
80 { | ||
cObject.cObject.file.width = 2400 | ||
noTrimWrap = | @media (min-width: 992px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 992px) and (min-resolution: 2dppx) { | } | | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> | ||
<f:spaceless> | ||
|
||
<f:comment><!-- ### Wrapper class===frame_class||Margin Top===space_before_class||Margin Bottom===space_after_class ### --></f:comment> | ||
<f:if condition="({data.frame_class} && ({data.frame_class} != 'default')) || {data.space_before_class} || {data.space_after_class}"> | ||
<div class="{data.frame_class} {data.space_before_class} {data.space_after_class}"> | ||
</f:if> | ||
|
||
<f:comment><!-- ### element body ### --></f:comment> | ||
<div id="c{data.uid}" class="frame frame-type-{data.CType} {layoutClass} {f:if(condition: data.layout, then: ' frame-layout-{data.layout}')} {alignClass} {f:if( condition: data.flexform_container, then: ' {data.flexform_container}')}"> | ||
<f:if condition="{data._LOCALIZED_UID}"> | ||
<a id="c{data._LOCALIZED_UID}"></a> | ||
</f:if> | ||
<f:render section="Before" optional="true"> | ||
<f:render partial="DropIn/Before/All" arguments="{_all}" /> | ||
</f:render> | ||
<f:render section="Header" optional="true"> | ||
<f:render partial="Header/All" arguments="{_all}" /> | ||
</f:render> | ||
|
||
<f:render section="Main" optional="true" /> | ||
|
||
<f:render section="Footer" optional="true"> | ||
<f:render partial="Footer/All" arguments="{_all}" /> | ||
</f:render> | ||
<f:render section="After" optional="true"> | ||
<f:render partial="DropIn/After/All" arguments="{_all}" /> | ||
</f:render> | ||
</div> | ||
|
||
<f:comment><!-- ### Wrapper class===frame_class||Margin Top===space_before_class||Margin Bottom===space_after_class ### --></f:comment> | ||
<f:if condition="({data.frame_class} && ({data.frame_class} != 'default')) || {data.space_before_class} || {data.space_after_class}"> | ||
</div> | ||
</f:if> | ||
|
||
</f:spaceless> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters