-
-
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.
[TASK] Add possibility to override for sizes
Related: #16
- Loading branch information
1 parent
14ad109
commit 1aefb4e
Showing
16 changed files
with
465 additions
and
24 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
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
36 changes: 36 additions & 0 deletions
36
...s/Fixtures/base_example/Configuration/TypoScript/ContentElements/imageFixWidth.typoscript
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,36 @@ | ||
tt_content.imageFixWidth < tt_content.image | ||
tt_content.imageFixWidth { | ||
templateRootPaths { | ||
110 = EXT:base_example/Resources/Private/Templates/FluidStyledContent | ||
} | ||
partialRootPaths { | ||
110 = EXT:base_example/Resources/Private/Partials/FluidStyledContent | ||
} | ||
|
||
dataProcessing { | ||
20 > | ||
20 = Codappix\ResponsiveImages\DataProcessing\ResponsiveImagesProcessor | ||
20 { | ||
fieldName = image | ||
filesDataKey = files | ||
} | ||
} | ||
} | ||
|
||
plugin.tx_responsiveimages { | ||
settings { | ||
contentelements { | ||
imageFixWidth { | ||
image { | ||
sizes { | ||
xs = 600 | ||
sm = 900 | ||
md = 1200 | ||
lg = 1600 | ||
xl = 1600 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
Tests/Fixtures/base_example/Configuration/TypoScript/Rendering.typoscript
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,2 +1,2 @@ | ||
page = PAGE | ||
page.10 < styles.content.get | ||
page.10 < styles.content.get |
32 changes: 32 additions & 0 deletions
32
Tests/Fixtures/base_example/Test/Fixtures/0colImageFixWidthDatabase.php
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,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'tt_content' => [ | ||
1 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'imageFixWidth', | ||
'header' => 'imageFixWidth', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '0', | ||
'sys_language_uid' => '0', | ||
'image' => '1', | ||
], | ||
], | ||
'sys_file_reference' => [ | ||
0 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'uid_local' => '1', | ||
'uid_foreign' => '1', | ||
'tablenames' => 'tt_content', | ||
'fieldname' => 'image', | ||
], | ||
], | ||
]; |
23 changes: 23 additions & 0 deletions
23
...es/container_example/Configuration/TCA/Overrides/tt_content_container_1col_full_width.php
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use B13\Container\Tca\ContainerConfiguration; | ||
use B13\Container\Tca\Registry; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
(static function (string $cType = 'example_container-1col-full-width'): void { | ||
GeneralUtility::makeInstance(Registry::class)->configureContainer(new ContainerConfiguration( | ||
$cType, | ||
'1 Column: 100', | ||
'(100%)', | ||
[ | ||
[ | ||
[ | ||
'name' => 'Column 101', | ||
'colPos' => 101, | ||
], | ||
], | ||
] | ||
)); | ||
})(); |
22 changes: 22 additions & 0 deletions
22
.../Fixtures/container_example/Configuration/TypoScript/Container/1col-full-witdh.typoscript
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,22 @@ | ||
plugin.tx_responsiveimages { | ||
settings { | ||
example_container-1col-full-width { | ||
columns { | ||
101 { | ||
sizes { | ||
xs = 1254 | ||
sm = 1203 | ||
md = 1578 | ||
lg = 1920 | ||
xl = 1920 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tt_content.example_container-1col-full-width < lib.containerElement | ||
tt_content.example_container-1col-full-width { | ||
templateName = 1col | ||
} |
33 changes: 33 additions & 0 deletions
33
Tests/Fixtures/container_example/Test/Fixtures/0colImageFixWidthDatabase.php
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,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'tt_content' => [ | ||
1 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'imageFixWidth', | ||
'header' => 'imageFixWidth', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '0', | ||
'sys_language_uid' => '0', | ||
'image' => '1', | ||
'tx_container_parent' => '0', | ||
], | ||
], | ||
'sys_file_reference' => [ | ||
0 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'uid_local' => '1', | ||
'uid_foreign' => '1', | ||
'tablenames' => 'tt_content', | ||
'fieldname' => 'image', | ||
], | ||
], | ||
]; |
Oops, something went wrong.