-
-
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: Allow sizes and multiplier for container
Related: #22
- Loading branch information
1 parent
b6aeb22
commit 5a9a3de
Showing
11 changed files
with
349 additions
and
16 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
27 changes: 27 additions & 0 deletions
27
...Configuration/TCA/Overrides/tt_content_container_2col_50_50_with_container_multiplier.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,27 @@ | ||
<?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-2col-50-50-with-container-multiplier'): void { | ||
GeneralUtility::makeInstance(Registry::class)->configureContainer(new ContainerConfiguration( | ||
$cType, | ||
'2 Column: 50-50', | ||
'(50% / 50%)', | ||
[ | ||
[ | ||
[ | ||
'name' => 'Column 101', | ||
'colPos' => 101, | ||
], | ||
[ | ||
'name' => 'Column 102', | ||
'colPos' => 102, | ||
], | ||
], | ||
] | ||
)); | ||
})(); |
27 changes: 27 additions & 0 deletions
27
...ample/Configuration/TCA/Overrides/tt_content_container_2col_50_50_with_container_size.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,27 @@ | ||
<?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-2col-50-50-with-container-size'): void { | ||
GeneralUtility::makeInstance(Registry::class)->configureContainer(new ContainerConfiguration( | ||
$cType, | ||
'2 Column: 50-50', | ||
'(50% / 50%)', | ||
[ | ||
[ | ||
[ | ||
'name' => 'Column 101', | ||
'colPos' => 101, | ||
], | ||
[ | ||
'name' => 'Column 102', | ||
'colPos' => 102, | ||
], | ||
], | ||
] | ||
)); | ||
})(); |
41 changes: 41 additions & 0 deletions
41
...xample/Configuration/TypoScript/Container/2col-50-50-with-container-multiplier.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,41 @@ | ||
plugin.tx_responsiveimages { | ||
settings { | ||
container { | ||
example_container-2col-50-50-with-container-multiplier { | ||
columns { | ||
101 { | ||
multiplier { | ||
xs = 1 | ||
sm = 1 | ||
md = 0,5 | ||
lg = 0,5 | ||
xl = 0,5 | ||
} | ||
} | ||
|
||
102 { | ||
multiplier { | ||
xs = 1 | ||
sm = 1 | ||
md = 0,5 | ||
lg = 0,5 | ||
xl = 0,5 | ||
} | ||
} | ||
} | ||
multiplier { | ||
xs = 0.8 | ||
sm = 0.8 | ||
md = 0.8 | ||
lg = 0.8 | ||
xl = 0.8 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tt_content.example_container-2col-50-50-with-container-multiplier < lib.containerElement | ||
tt_content.example_container-2col-50-50-with-container-multiplier { | ||
templateName = 2col-50-50 | ||
} |
41 changes: 41 additions & 0 deletions
41
...iner_example/Configuration/TypoScript/Container/2col-50-50-with-container-size.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,41 @@ | ||
plugin.tx_responsiveimages { | ||
settings { | ||
container { | ||
example_container-2col-50-50-with-container-size { | ||
columns { | ||
101 { | ||
multiplier { | ||
xs = 1 | ||
sm = 1 | ||
md = 0,5 | ||
lg = 0,5 | ||
xl = 0,5 | ||
} | ||
} | ||
|
||
102 { | ||
multiplier { | ||
xs = 1 | ||
sm = 1 | ||
md = 0,5 | ||
lg = 0,5 | ||
xl = 0,5 | ||
} | ||
} | ||
} | ||
sizes { | ||
xs = 600 | ||
sm = 900 | ||
md = 1200 | ||
lg = 1500 | ||
xl = 1800 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tt_content.example_container-2col-50-50-with-container-size < lib.containerElement | ||
tt_content.example_container-2col-50-50-with-container-size { | ||
templateName = 2col-50-50 | ||
} |
61 changes: 61 additions & 0 deletions
61
Tests/Fixtures/container_example/Test/Fixtures/1col2colWidthContainerMultiplierDatabase.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,61 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'tt_content' => [ | ||
0 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'example_container-1col', | ||
'header' => '1col', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '0', | ||
'sys_language_uid' => '0', | ||
'tx_container_parent' => '0', | ||
], | ||
1 => [ | ||
'uid' => '2', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'example_container-2col-50-50-with-container-multiplier', | ||
'header' => '2col in 2col', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '101', | ||
'sys_language_uid' => '0', | ||
'tx_container_parent' => '1', | ||
], | ||
2 => [ | ||
'uid' => '3', | ||
'pid' => '2', | ||
'hidden' => '0', | ||
'sorting' => '1', | ||
'CType' => 'image', | ||
'header' => 'image in 2col in 1col', | ||
'deleted' => '0', | ||
'starttime' => '0', | ||
'endtime' => '0', | ||
'colPos' => '102', | ||
'sys_language_uid' => '0', | ||
'image' => '1', | ||
'tx_container_parent' => '2', | ||
], | ||
], | ||
'sys_file_reference' => [ | ||
0 => [ | ||
'uid' => '1', | ||
'pid' => '2', | ||
'uid_local' => '1', | ||
'uid_foreign' => '3', | ||
'tablenames' => 'tt_content', | ||
'fieldname' => 'image', | ||
], | ||
], | ||
]; |
Oops, something went wrong.