-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from TYPO3incubator/surfcamp-team5_fjora
Image; Text; Text image elements with styling
- Loading branch information
Showing
13 changed files
with
378 additions
and
45 deletions.
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
local_packages/psi/Resources/Private/Scss/Components/_headline.scss
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,18 @@ | ||
.headline { | ||
&-center { | ||
text-align: center; | ||
} | ||
|
||
&-left { | ||
text-align: left; | ||
} | ||
|
||
&-right { | ||
text-align: right; | ||
} | ||
} | ||
|
||
.subheadline { | ||
width: 100%; | ||
display: block; | ||
} |
38 changes: 38 additions & 0 deletions
38
local_packages/psi/Resources/Private/Scss/Components/_image.scss
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,38 @@ | ||
.image { | ||
@include container; | ||
|
||
&__container { | ||
@include row; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
max-width: 1440px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
|
||
} | ||
|
||
&__content { | ||
@include column(8); | ||
|
||
&-full { | ||
@include column(12); | ||
} | ||
} | ||
|
||
&__figure { | ||
margin: 0; | ||
} | ||
|
||
&__file { | ||
width: 100%; | ||
height: auto; | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.image { | ||
@include container; | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
local_packages/psi/Resources/Private/Scss/Components/_text.scss
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,13 @@ | ||
.text { | ||
&-center { | ||
text-align: center; | ||
} | ||
|
||
&-end { | ||
text-align: right; | ||
} | ||
|
||
&-justify { | ||
text-align: justify; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
local_packages/psi/Resources/Private/Scss/Components/_textpic.scss
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,52 @@ | ||
.textpic { | ||
@include container; | ||
|
||
&__container { | ||
@include row; | ||
max-width: 1440px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
&__content { | ||
@include column(12); | ||
} | ||
|
||
&__image { | ||
@include column(12); | ||
|
||
figure { | ||
margin: 0; | ||
} | ||
|
||
&-file { | ||
width: 100%; | ||
height: auto; | ||
object-fit: cover; | ||
} | ||
|
||
&-right { | ||
order: 2; | ||
} | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.textpic { | ||
flex-direction: row; | ||
|
||
&__container { | ||
justify-content: center; | ||
align-items: center; | ||
column-gap: calc(100% / 12); | ||
} | ||
|
||
&__content { | ||
@include column(4); | ||
} | ||
|
||
&__image { | ||
@include column(5); | ||
} | ||
} | ||
} |
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
62 changes: 58 additions & 4 deletions
62
local_packages/psi/Resources/Private/Templates/Content/Image.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,59 @@ | ||
<h2>{data.header}</h2> | ||
<div class="image"> | ||
<div class="image__container"> | ||
<div class="image__content {f:if(condition: '{data.layout} == 1', then: 'image__content-full')}"> | ||
<f:if condition="{data.subheader}"> | ||
<span | ||
class="subheadline {f:if(condition: '{data.header} && {data.header_position}', then: 'headline-{data.header_position}')}"> | ||
{data.subheader} | ||
</span> | ||
</f:if> | ||
<f:if condition="{data.header}"> | ||
<f:render partial="Content/Header" arguments="{ | ||
header: data.header, | ||
layout: data.header_layout, | ||
positionClass: '{f:if(condition: data.header_position, then: \'headline-{data.header_position}\')}', | ||
default: settings.defaultHeaderType}"/> | ||
</f:if> | ||
|
||
<f:for each="{data.image}" as="image"> | ||
<f:image image="{data.image.0}"/> | ||
</f:for> | ||
<f:for each="{data.media}" as="file"> | ||
<f:render section="Image" arguments="{file: file, settings: settings}"/> | ||
</f:for> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<f:section name="Image"> | ||
<figure class="image__figure"> | ||
<picture> | ||
<f:render section="Source" | ||
arguments="{breakpoint: settings.psi.breakpoints.desktop, cropVariant: 'default', file: file, width: '1400'}"/> | ||
<f:render section="Source" | ||
arguments="{breakpoint: settings.psi.breakpoints.tablet, cropVariant: 'default', file: file, width: '900'}"/> | ||
<f:render section="Source" | ||
arguments="{breakpoint: settings.psi.breakpoints.mobile, cropVariant: 'default', file: file, width: '500'}"/> | ||
|
||
<source media="{settings.psi.breakpoints.mobile.media}" type="image/webp" | ||
srcset="{f:uri.image(image: file, width: '500', cropVariant: 'default',fileExtension: 'webp')}"/> | ||
|
||
<f:image image="{file}" | ||
alt="{file.alternative}" | ||
title="{file.title}" | ||
width="500" | ||
cropVariant="default" | ||
loading="{settings.media.lazyLoading}" | ||
decoding="{settings.media.imageDecoding}" | ||
crop="{crop}" | ||
class="image__file"/> | ||
</picture> | ||
<f:if condition="{file.description}"> | ||
<figcaption>{file.description}</figcaption> | ||
</f:if> | ||
</figure> | ||
</f:section> | ||
|
||
<f:section name="Source"> | ||
<source media="{breakpoint.media}" type="image/webp" | ||
srcset="{f:uri.image(image: file, width: width, cropVariant: cropVariant, fileExtension: 'webp')}"/> | ||
<source media="{breakpoint.media}" type="{file.properties.mime_type}" | ||
srcset="{f:uri.image(image: file, width: width, cropVariant: cropVariant, fileExtension: '{file.properties.extension}')}"/> | ||
</f:section> |
5 changes: 3 additions & 2 deletions
5
local_packages/psi/Resources/Private/Templates/Content/Text.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
44 changes: 22 additions & 22 deletions
44
local_packages/psi/Resources/Private/Templates/Content/Textpic.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
Oops, something went wrong.