-
Notifications
You must be signed in to change notification settings - Fork 4
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 #15 from clickpress/feature-gapsizes
Add feature for gap sizes
- Loading branch information
Showing
28 changed files
with
503 additions
and
195 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,26 @@ | |
"type": "contao-bundle", | ||
"description": "Grid System for Contao based on CSS Grid", | ||
"license": "LGPL-3.0-or-later", | ||
"authors": [ | ||
{ | ||
"name": "Stefan Schulz-Lauterbach", | ||
"homepage": "https://github.com/stefansl" | ||
} | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Stefan Schulz-Lauterbach", | ||
"email": "[email protected]", | ||
"homepage": "https://clickpress.de", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Martin Auswöger", | ||
"email": "[email protected]", | ||
"homepage": "https://madeyourday.net", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Jannik Nölke", | ||
"email": "[email protected]", | ||
"homepage": "https://plakart.net", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.1", | ||
"contao/core-bundle": "^5.3" | ||
|
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,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Contao Clickpress Grid. | ||
* | ||
|
@@ -9,7 +11,7 @@ | |
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
/* | ||
* Taken with friendly permission from RockSolid Columns | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
|
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,15 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* ClickpressGrid DCA | ||
* Partly taken with friendly permission from RockSolid Columns | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* ClickpressGrid DCA Partly taken with friendly permission from RockSolid Columns. | ||
*/ | ||
|
||
|
||
$GLOBALS['TL_DCA']['tl_content']['palettes']['cp_grid_start'] = '{type_legend},type,headline;{cp_grid_legend},cp_grid_mobile,cp_grid_tablet,cp_grid_desktop,cp_grid_valign,cp_grid_halign;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID;{invisible_legend:hide},invisible,start,stop'; | ||
$GLOBALS['TL_DCA']['tl_content']['palettes']['cp_grid_start'] = '{type_legend},type,headline;{cp_grid_legend},cp_grid_mobile,cp_grid_tablet,cp_grid_desktop,cp_gap_mobile,cp_gap_tablet,cp_gap_desktop,cp_grid_valign,cp_grid_halign;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID;{invisible_legend:hide},invisible,start,stop'; | ||
$GLOBALS['TL_DCA']['tl_content']['palettes']['cp_grid_stop'] = '{type_legend},type;{protected_legend:hide},protected;{expert_legend:hide},guests;{invisible_legend:hide},invisible,start,stop'; | ||
$GLOBALS['TL_DCA']['tl_content']['palettes']['cp_column_start'] = '{type_legend},type,headline;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID;{invisible_legend:hide},invisible,start,stop'; | ||
$GLOBALS['TL_DCA']['tl_content']['palettes']['cp_column_stop'] = '{type_legend},type;{protected_legend:hide},protected;{expert_legend:hide},guests;{invisible_legend:hide},invisible,start,stop'; | ||
|
@@ -47,7 +43,6 @@ | |
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
|
||
|
||
$GLOBALS['TL_DCA']['tl_content']['fields']['cp_grid_tablet'] = [ | ||
'label' => &$GLOBALS['TL_LANG']['tl_content']['cp_grid_tablet'], | ||
'inputType' => 'select', | ||
|
@@ -77,7 +72,6 @@ | |
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
|
||
|
||
$GLOBALS['TL_DCA']['tl_content']['fields']['cp_grid_mobile'] = [ | ||
'label' => &$GLOBALS['TL_LANG']['tl_content']['cp_grid_mobile'], | ||
'inputType' => 'select', | ||
|
@@ -104,6 +98,85 @@ | |
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
|
||
$GLOBALS['TL_DCA']['tl_content']['fields']['cp_gap_mobile'] = [ | ||
'inputType' => 'select', | ||
'reference' => &$GLOBALS['TL_LANG']['tl_content']['cp_gap_options'], | ||
'default' => '', | ||
'options' => [ | ||
'gap_0', | ||
'gap_1', | ||
'gap_2', | ||
'gap_3', | ||
'gap_4', | ||
'gap_5', | ||
'gap_6', | ||
'gap_7', | ||
'gap_8', | ||
'gap_9', | ||
'gap_10', | ||
'gap_11', | ||
'gap_12', | ||
], | ||
'eval' => [ | ||
'includeBlankOption' => true, | ||
'blankOptionLabel' => '-', | ||
'tl_class' => 'w33', | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
$GLOBALS['TL_DCA']['tl_content']['fields']['cp_gap_tablet'] = [ | ||
'inputType' => 'select', | ||
'default' => '', | ||
'options' => [ | ||
'gap_0', | ||
'gap_1', | ||
'gap_2', | ||
'gap_3', | ||
'gap_4', | ||
'gap_5', | ||
'gap_6', | ||
'gap_7', | ||
'gap_8', | ||
'gap_9', | ||
'gap_10', | ||
'gap_11', | ||
'gap_12', | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_content']['cp_gap_options'], | ||
'eval' => [ | ||
'includeBlankOption' => true, | ||
'blankOptionLabel' => '-', | ||
'tl_class' => 'w33', | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
$GLOBALS['TL_DCA']['tl_content']['fields']['cp_gap_desktop'] = [ | ||
'inputType' => 'select', | ||
'default' => '', | ||
'options' => [ | ||
'gap_0', | ||
'gap_1', | ||
'gap_2', | ||
'gap_3', | ||
'gap_4', | ||
'gap_5', | ||
'gap_6', | ||
'gap_7', | ||
'gap_8', | ||
'gap_9', | ||
'gap_10', | ||
'gap_11', | ||
'gap_12', | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_content']['cp_gap_options'], | ||
'eval' => [ | ||
'includeBlankOption' => true, | ||
'blankOptionLabel' => '-', | ||
'tl_class' => 'w33', | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
|
||
$GLOBALS['TL_DCA']['tl_content']['fields']['cp_grid_valign'] = [ | ||
'inputType' => 'select', | ||
'default' => false, | ||
|
@@ -112,12 +185,12 @@ | |
'items-center' => 'center', | ||
'items-end' => 'bottom', | ||
'items-stretch' => 'stretch', | ||
'items-baseline' => 'baseline' | ||
'items-baseline' => 'baseline', | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_content']['cp_grid_valign_options'], | ||
'eval' => [ | ||
'tl_class' => 'w50 m12', | ||
'includeBlankOption' => true | ||
'tl_class' => 'w50 m12 clr', | ||
'includeBlankOption' => true, | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
]; | ||
|
@@ -126,15 +199,15 @@ | |
'inputType' => 'select', | ||
'default' => false, | ||
'options' => [ | ||
'justify-items-start'=>'left', | ||
'justify-items-center'=>'center', | ||
'justify-items-end'=>'right', | ||
'justify-items-stretch'=>'stretch', | ||
'justify-items-start' => 'left', | ||
'justify-items-center' => 'center', | ||
'justify-items-end' => 'right', | ||
'justify-items-stretch' => 'stretch', | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_content']['cp_grid_halign_options'], | ||
'eval' => [ | ||
'tl_class' => 'w50 m12', | ||
'includeBlankOption' => true | ||
'includeBlankOption' => true, | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
]; |
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,21 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* ClickpressGrid DCA | ||
* Partly taken with friendly permission from RockSolid Columns | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* @author Jannik Nölke <[email protected]> | ||
* ClickpressGrid DCA Partly taken with friendly permission from RockSolid Columns. | ||
*/ | ||
|
||
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['cp_grid_start'] = '{type_legend},type;{form_cp_grid_legend},form_cp_grid_mobile,form_cp_grid_tablet,form_cp_grid_desktop;{expert_legend:hide},class;{invisible_legend:hide},invisible'; | ||
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['cp_grid_stop'] = '{type_legend},type;{expert_legend:hide},class;{invisible_legend:hide},invisible'; | ||
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['cp_column_start'] = '{type_legend},type,headline;{expert_legend:hide},class;{invisible_legend:hide},invisible'; | ||
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['cp_column_stop'] = '{type_legend},type;{expert_legend:hide},class;{invisible_legend:hide},invisible'; | ||
$GLOBALS['TL_DCA']['tl_form_field']['fields']['form_cp_grid_desktop'] = array( | ||
$GLOBALS['TL_DCA']['tl_form_field']['fields']['form_cp_grid_desktop'] = [ | ||
'label' => &$GLOBALS['TL_LANG']['tl_form_field']['form_cp_grid_desktop'], | ||
'inputType' => 'select', | ||
'options' => array( | ||
'options' => [ | ||
'grid_100', | ||
'grid_50_50', | ||
'grid_33_33_33', | ||
|
@@ -38,19 +35,18 @@ | |
'grid_20_40_20_20', | ||
'grid_20_20_40_20', | ||
'grid_20_20_20_40', | ||
), | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_form_field']['form_cp_grid_options'], | ||
'eval' => array( | ||
'eval' => [ | ||
'tl_class' => 'w33', | ||
), | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
); | ||
]; | ||
|
||
|
||
$GLOBALS['TL_DCA']['tl_form_field']['fields']['form_cp_grid_tablet'] = array( | ||
$GLOBALS['TL_DCA']['tl_form_field']['fields']['form_cp_grid_tablet'] = [ | ||
'label' => &$GLOBALS['TL_LANG']['tl_form_field']['form_cp_grid_tablet'], | ||
'inputType' => 'select', | ||
'options' => array( | ||
'options' => [ | ||
'grid_100', | ||
'grid_50_50', | ||
'grid_33_33_33', | ||
|
@@ -68,19 +64,18 @@ | |
'grid_20_40_40', | ||
'grid_40_20_40', | ||
'grid_40_40_20', | ||
), | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_form_field']['form_cp_grid_options'], | ||
'eval' => array( | ||
'eval' => [ | ||
'tl_class' => 'w33', | ||
), | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
); | ||
|
||
]; | ||
|
||
$GLOBALS['TL_DCA']['tl_form_field']['fields']['form_cp_grid_mobile'] = array( | ||
$GLOBALS['TL_DCA']['tl_form_field']['fields']['form_cp_grid_mobile'] = [ | ||
'label' => &$GLOBALS['TL_LANG']['tl_form_field']['form_cp_grid_mobile'], | ||
'inputType' => 'select', | ||
'options' => array( | ||
'options' => [ | ||
'grid_100', | ||
'grid_50_50', | ||
'grid_33_33_33', | ||
|
@@ -95,10 +90,10 @@ | |
'grid_40_30_30', | ||
'grid_30_40_30', | ||
'grid_30_30_40', | ||
), | ||
], | ||
'reference' => &$GLOBALS['TL_LANG']['tl_form_field']['form_cp_grid_options'], | ||
'eval' => array( | ||
'eval' => [ | ||
'tl_class' => 'w33', | ||
), | ||
], | ||
'sql' => "varchar(255) NOT NULL default ''", | ||
); | ||
]; |
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,9 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
$GLOBALS['TL_DCA']['tl_layout']['palettes']['default'] .= ';{cp_grid_legend},cp_grid_load_css'; | ||
|
||
$GLOBALS['TL_DCA']['tl_layout']['fields']['cp_grid_load_css'] = array( | ||
$GLOBALS['TL_DCA']['tl_layout']['fields']['cp_grid_load_css'] = [ | ||
'inputType' => 'checkbox', | ||
'label' => &$GLOBALS['TL_LANG']['tl_layout']['cp_grid_load_css'], | ||
'sql' => "char(1) NOT NULL default '1'", | ||
); | ||
]; |
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
Oops, something went wrong.