Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
🔨 Include CSS directly to the page
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Nov 2, 2017
1 parent 25bf41a commit 086d76e
Show file tree
Hide file tree
Showing 22 changed files with 145 additions and 149 deletions.
8 changes: 4 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/.editorconfig export-ignore
/.gitignore export-ignore
/CODE_OF_CONDUCT.md export-ignore
/gulp.json export-ignore
/package.json export-ignore
/CODE_OF_CONDUCT.md export-ignore
/package.json export-ignore
2 changes: 0 additions & 2 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Jonnitto:
left: flex-md-row-reverse
right: false
floatLeft: 'jonnitto-textwithplyr--floatleft'

#float-md-left my-md-2 mr-md-3 maxwith-md-50'
floatRight: 'jonnitto-textwithplyr--floatright'

Neos:
Expand Down
13 changes: 5 additions & 8 deletions Resources/Private/Fusion/Overwrite.fusion
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
prototype(Neos.Neos:Page) {
prototype(Page) {
head.textWithPlyrMaxFloatWith = Neos.Fusion:Tag {
tagName = 'link'
attributes {
rel = 'stylesheet'
href = Neos.Fusion:ResourceUri {
path = 'resource://Jonnitto.TextWithPlyr/Public/MaxFloatWith.css'
}
@if.hasVideoOrIsBackendAndActive = ${(q(node).children('[instanceof Neos.Neos:ContentCollection]').find('[instanceof Jonnitto.TextWithPlyr:AlignmentFloatLeftMixin][alignment="floatLeft"],[instanceof Jonnitto.TextWithPlyr:AlignmentFloatRightMixin][alignment="floatRight"]').is() || node.context.inBackend) && Configuration.setting('Jonnitto.TextWithPlyr.includeMaxFloatWithCss')}
tagName = 'style'
content = Carbon.FileContent:FileContent {
path = 'resource://Jonnitto.TextWithPlyr/Private/Templates/InlineAssets/MaxFloatWith.css'
}
@if.hasVideoOrIsBackendAndActive = ${(q(node).children('[instanceof Neos.Neos:ContentCollection]').find('[instanceof Jonnitto.TextWithPlyr:BasicMixin]').filter('[alignment="floatLeft"],[alignment="floatRight"]').is() || node.context.inBackend) && Configuration.setting('Jonnitto.TextWithPlyr.includeMaxFloatWithCss')}
}
}
6 changes: 2 additions & 4 deletions Resources/Private/Fusion/Prototypes/Tag.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ prototype(Jonnitto.TextWithPlyr:Tag) < prototype(Neos.Fusion:Tag) {
}

content = Neos.Fusion:Template {
templatePath = 'resource://Jonnitto.TextWithPlyr/Private/Templates/Media.html'
templatePath = 'resource://Jonnitto.TextWithPlyr/Private/Fusion/Prototypes/Tag.html'
@process.row = Neos.Fusion:Tag {
@if.isLeftOrRight = ${hasRow}
attributes.class = Neos.Fusion:RawArray {
Expand All @@ -39,9 +39,7 @@ prototype(Jonnitto.TextWithPlyr:Tag) < prototype(Neos.Fusion:Tag) {

text = Neos.Fusion:Tag {
@context.property = ${'text'}
attributes.class = Neos.Fusion:RawArray {
col = ${hasRow ? config.class.colText : false}
}
attributes.class = ${hasRow ? config.class.colText : false}
content = ${q(node).property(property)}
@process {
convertUris = ConvertUris
Expand Down
11 changes: 11 additions & 0 deletions Resources/Private/Fusion/Prototypes/Tag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<f:comment>For float, the text need to be after the media</f:comment>
<f:if condition="{hasRow}">
<f:then>
{text -> f:format.raw()}
{media -> f:format.raw()}
</f:then>
<f:else>
{media -> f:format.raw()}
{text -> f:format.raw()}
</f:else>
</f:if>
1 change: 1 addition & 0 deletions Resources/Private/Templates/InlineAssets/MaxFloatWith.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions Resources/Private/Templates/Media.html

This file was deleted.

44 changes: 22 additions & 22 deletions Resources/Private/Translations/de/NodeTypes/AlignmentMixin.xlf
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="properties.alignment" xml:space="preserve">
<source>Position</source>
</trans-unit>
<trans-unit id="properties.alignment.selectBoxEditor.placeholder" xml:space="preserve">
<source>Standard</source>
</trans-unit>
<trans-unit id="left" xml:space="preserve">
<source>Links</source>
</trans-unit>
<trans-unit id="right" xml:space="preserve">
<source>Rechts</source>
</trans-unit>
<trans-unit id="floatLeft" xml:space="preserve">
<source>Links umfliessen</source>
</trans-unit>
<trans-unit id="floatRight" xml:space="preserve">
<source>Rechts umfliessen</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="properties.alignment" xml:space="preserve">
<source>Position</source>
</trans-unit>
<trans-unit id="properties.alignment.selectBoxEditor.placeholder" xml:space="preserve">
<source>Standard</source>
</trans-unit>
<trans-unit id="left" xml:space="preserve">
<source>Links</source>
</trans-unit>
<trans-unit id="right" xml:space="preserve">
<source>Rechts</source>
</trans-unit>
<trans-unit id="floatLeft" xml:space="preserve">
<source>Links umfliessen</source>
</trans-unit>
<trans-unit id="floatRight" xml:space="preserve">
<source>Rechts umfliessen</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/de/NodeTypes/Audio.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit Audioplayer</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit Audioplayer</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/de/NodeTypes/Text.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="properties.text.aloha.placeholder" xml:space="preserve">
<source><![CDATA[<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>]]></source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="properties.text.aloha.placeholder" xml:space="preserve">
<source><![CDATA[<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>]]></source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/de/NodeTypes/Video.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit Video</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit Video</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/de/NodeTypes/Vimeo.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit Vimeo Video</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit Vimeo Video</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/de/NodeTypes/YouTube.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit YouTube-Video</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text mit YouTube-Video</source>
</trans-unit>
</body>
</file>
</xliff>
50 changes: 25 additions & 25 deletions Resources/Private/Translations/en/NodeTypes/AlignmentMixin.xlf
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="properties.alignment" xml:space="preserve">
<source>Position</source>
</trans-unit>
<trans-unit id="properties.alignment.selectBoxEditor.placeholder" xml:space="preserve">
<source>Default</source>
</trans-unit>
<trans-unit id="left" xml:space="preserve">
<source>Left</source>
</trans-unit>
<trans-unit id="center" xml:space="preserve">
<source>Center</source>
</trans-unit>
<trans-unit id="right" xml:space="preserve">
<source>Right</source>
</trans-unit>
<trans-unit id="floatLeft" xml:space="preserve">
<source>Left floating</source>
</trans-unit>
<trans-unit id="floatRight" xml:space="preserve">
<source>Right floating</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="properties.alignment" xml:space="preserve">
<source>Position</source>
</trans-unit>
<trans-unit id="properties.alignment.selectBoxEditor.placeholder" xml:space="preserve">
<source>Default</source>
</trans-unit>
<trans-unit id="left" xml:space="preserve">
<source>Left</source>
</trans-unit>
<trans-unit id="center" xml:space="preserve">
<source>Center</source>
</trans-unit>
<trans-unit id="right" xml:space="preserve">
<source>Right</source>
</trans-unit>
<trans-unit id="floatLeft" xml:space="preserve">
<source>Left floating</source>
</trans-unit>
<trans-unit id="floatRight" xml:space="preserve">
<source>Right floating</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/en/NodeTypes/Audio.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with audio player</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with audio player</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/en/NodeTypes/Text.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="properties.text.aloha.placeholder" xml:space="preserve">
<source><![CDATA[<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>]]></source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="properties.text.aloha.placeholder" xml:space="preserve">
<source><![CDATA[<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>]]></source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/en/NodeTypes/Video.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with video</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with video</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/en/NodeTypes/Vimeo.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with Vimeo video</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with Vimeo video</source>
</trans-unit>
</body>
</file>
</xliff>
14 changes: 7 additions & 7 deletions Resources/Private/Translations/en/NodeTypes/YouTube.xlf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with YouTube video</source>
</trans-unit>
</body>
</file>
<file original="" product-name="Jonnitto.TextWithPlyr" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Text with YouTube video</source>
</trans-unit>
</body>
</file>
</xliff>
2 changes: 1 addition & 1 deletion Resources/Public/MaxFloatWith.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"require": {
"neos/neos": "~3.0 || dev-master",
"jonnitto/plyr": "^1.2"
"jonnitto/plyr": "^1.2",
"carbon/filecontent": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion gulp.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"root": {
"base": "./Resources",
"src": "Private",
"dest": "Public"
"dest": "Public",
"inlineAssets": true
},
"browserSync": {
"enable": false
Expand Down

0 comments on commit 086d76e

Please sign in to comment.