diff --git a/contao/dca/tl_content.php b/contao/dca/tl_content.php index fc751bf..8b55633 100644 --- a/contao/dca/tl_content.php +++ b/contao/dca/tl_content.php @@ -19,7 +19,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['mateModal'] = '{type_legend},type;{modal_link_legend},mateModal_linkText,mateModal_linkClass;{modal_headline_legend},headline;{modal_text_legend},mateModal_text,mateModal_class;{template_legend:hide},mateModal_customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID;{invisible_legend:hide},invisible,start,stop'; $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'mateTeaserBoxPlus'; -$GLOBALS['TL_DCA']['tl_content']['subpalettes']['mateTeaserBoxPlus'] = 'mateTeaserBoxPlus_text,mateTeaserBoxPlus_color,mateTeaserBoxPlus_bg,mateTeaserBoxPlus_size'; +$GLOBALS['TL_DCA']['tl_content']['subpalettes']['mateTeaserBoxPlus'] = 'mateTeaserBoxPlus_text,mateTeaserBoxPlus_color,mateTeaserBoxPlus_bg,mateTeaserBoxPlus_colorHover,mateTeaserBoxPlus_bgHover,mateTeaserBoxPlus_size'; /** * Add fields to tl_content @@ -204,21 +204,35 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['mateTeaserBoxPlus_bg'] = [ 'exclude' => true, 'inputType' => 'text', - 'eval' => ['tl_class'=>'w25'], + 'eval' => ['tl_class'=>'w33'], + 'sql' => "text NULL" +]; + +$GLOBALS['TL_DCA']['tl_content']['fields']['mateTeaserBoxPlus_bgHover'] = [ + 'exclude' => true, + 'inputType' => 'text', + 'eval' => ['tl_class'=>'w33'], 'sql' => "text NULL" ]; $GLOBALS['TL_DCA']['tl_content']['fields']['mateTeaserBoxPlus_text'] = [ 'exclude' => true, 'inputType' => 'text', - 'eval' => ['tl_class'=>'w25'], + 'eval' => ['tl_class'=>'w33'], 'sql' => "text NULL" ]; $GLOBALS['TL_DCA']['tl_content']['fields']['mateTeaserBoxPlus_color'] = [ 'exclude' => true, 'inputType' => 'text', - 'eval' => ['tl_class'=>'w25'], + 'eval' => ['tl_class'=>'w33'], + 'sql' => "text NULL" +]; + +$GLOBALS['TL_DCA']['tl_content']['fields']['mateTeaserBoxPlus_colorHover'] = [ + 'exclude' => true, + 'inputType' => 'text', + 'eval' => ['tl_class'=>'w33'], 'sql' => "text NULL" ]; @@ -226,7 +240,7 @@ 'exclude' => true, 'inputType' => 'select', 'options' => &$GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size']['options'], - 'eval' => ['chosen'=>true, 'tl_class'=>'w25'], + 'eval' => ['chosen'=>true, 'tl_class'=>'w33'], 'sql' => "varchar(64) NOT NULL default 'normal'" ]; diff --git a/contao/languages/de/tl_content.php b/contao/languages/de/tl_content.php index a92fd94..4daf20e 100644 --- a/contao/languages/de/tl_content.php +++ b/contao/languages/de/tl_content.php @@ -28,6 +28,8 @@ $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_text'] = ['Text', 'Text, der mittig und groß in dem Bereich angezeigt wird, wo eigentlich das Bild wäre.']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_color'] = ['Textfarbe (optional)', 'Hier können Sie die Textfarbe ändern. Mögliche Werte sind z. B. #000, black, rgba(0,0,0) ...']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_bg'] = ['Hintergrund (optional)', 'Hier können Sie die Hintergrundfarbe ändern. Möglich Werte sind z. B. #000, black, rgba(0,0,0) ...']; +$GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_colorHover'] = ['Hover-Textfarbe (optional)', 'Hier können Sie die Hover-Textfarbe ändern. Mögliche Werte sind z. B. #000, black, rgba(0,0,0) ...']; +$GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_bgHover'] = ['Hover-Hintergrund (optional)', 'Hier können Sie die Hover-Hintergrundfarbe ändern. Möglich Werte sind z. B. #000, black, rgba(0,0,0) ...']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size'] = ['Schriftgröße', 'Hier können Sie die Schriftgröße anpassen.']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size']['options']['verySmall'] = 'sehr klein'; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size']['options']['small'] = 'klein'; diff --git a/contao/languages/en/tl_content.php b/contao/languages/en/tl_content.php index 53f3b75..bd3ae32 100644 --- a/contao/languages/en/tl_content.php +++ b/contao/languages/en/tl_content.php @@ -28,6 +28,8 @@ $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_text'] = ['Text', 'Text that is displayed in the centre and large in the area where the image would actually be.']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_color'] = ['Text colour (optional)', 'You can change the text colour here. Possible values are e.g. #000, black, rgba(0,0,0) ...']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_bg'] = ['Background (optional)', 'You can change the background colour here. Possible values are e.g. #000, black, rgba(0,0,0) ...']; +$GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_colorHover'] = ['Text colour on hover (optional)', 'You can change the text colour on hover here. Possible values are e.g. #000, black, rgba(0,0,0) ...']; +$GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_bgHover'] = ['Background on hover (optional)', 'You can change the background colour on hover here. Possible values are e.g. #000, black, rgba(0,0,0) ...']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size'] = ['Font size', 'You can adjust the font size here.']; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size']['options']['verySmall'] = 'very small'; $GLOBALS['TL_LANG']['tl_content']['mateTeaserBoxPlus_size']['options']['small'] = 'small'; diff --git a/contao/templates/elements/mate/ce_mate_teaserbox.html5 b/contao/templates/elements/mate/ce_mate_teaserbox.html5 index b01658f..063bb2c 100644 --- a/contao/templates/elements/mate/ce_mate_teaserbox.html5 +++ b/contao/templates/elements/mate/ce_mate_teaserbox.html5 @@ -2,35 +2,45 @@