Browse code

Modernize and adjust code to Contao 5

Benjamin Roth authored on26/10/2023 15:21:49
Showing34 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+services:
2
+    _defaults:
3
+        autowire: true
4
+        autoconfigure: true
5
+        public: false
6
+
7
+    EsalesMedia\ContentHelperBundle\:
8
+        resource: ../src
9
+        exclude: ../src/{EsalesMediaContentHelperBundle.php,ContaoManager,Entity,Migrations,Model,Resources,Tests,Widget}
0 10
new file mode 100644
... ...
@@ -0,0 +1,28 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/**
12
+ * Content elements
13
+ */
14
+$GLOBALS['TL_CTE']['rs_columns']['rs_columns_start'] = 'EsalesMedia\\ContentHelperBundle\\FrontendController\\ColumnsStart';
15
+$GLOBALS['TL_CTE']['rs_columns']['rs_column_start'] = 'EsalesMedia\\ContentHelperBundle\\FrontendController\\ColumnStart';
16
+
17
+/**
18
+ * Frontend module
19
+ */
20
+$GLOBALS['FE_MOD']['miscellaneous']['articlelist'] = 'EsalesMedia\\ContentHelperBundle\\FrontendModule\\ArticleListModule';
21
+
22
+
23
+/**
24
+ * Hooks
25
+ */
26
+$GLOBALS['TL_HOOKS']['parseTemplate'][] = array('esalesmedia_content_helper.listener.template','onParseTemplate');
27
+$GLOBALS['TL_HOOKS']['generatePage'][] = array('esalesmedia_content_helper.listener.page','onGeneratePage');
28
+$GLOBALS['TL_HOOKS']['replaceInsertTags'][] = array('esalesmedia_content_helper.listener.insert_tags','onReplaceInsertTags');
0 29
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/*
12
+ * Modify palettes
13
+ */
14
+
15
+use Contao\CoreBundle\DataContainer\PaletteManipulator;
16
+
17
+foreach ($GLOBALS['TL_DCA']['tl_article']['palettes'] as $key => $palette)
18
+{
19
+    if ($key != '__selector__')
20
+    {
21
+        PaletteManipulator::create()->addField('hideInArticleList','teaser', PaletteManipulator::POSITION_AFTER)->applyToPalette($key,'tl_article');
22
+    }
23
+}
24
+
25
+/*
26
+ * Add fields
27
+ */
28
+
29
+$GLOBALS['TL_DCA']['tl_article']['fields']['hideInArticleList'] = array
30
+(
31
+    'label'                   => &$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'],
32
+    'exclude'                 => true,
33
+    'inputType'               => 'checkbox',
34
+    'eval'                    => array('tl_class'=>'w50'),
35
+    'sql'                     => "char(1) NOT NULL default ''"
36
+);
0 37
new file mode 100644
... ...
@@ -0,0 +1,154 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/*
12
+ * Modify palettes
13
+ */
14
+
15
+use Contao\CoreBundle\DataContainer\PaletteManipulator;
16
+
17
+foreach ($GLOBALS['TL_DCA']['tl_content']['palettes'] as $key => $palette)
18
+{
19
+    if ($key != '__selector__')
20
+    {
21
+        PaletteManipulator::create()->addField('es_textAlign', 'cssID')->addField('es_spacing', 'es_textAlign')->addField('es_padding', 'es_spacing')->applyToPalette($key, 'tl_content');
22
+        PaletteManipulator::create()->addLegend('es_animate_legend','protected_legend', PaletteManipulator::POSITION_AFTER,true)->addField('es_animate','es_animate_legend', PaletteManipulator::POSITION_APPEND)->applyToPalette($key,'tl_content');
23
+    }
24
+}
25
+PaletteManipulator::create()->addField('es_col_text','headline', PaletteManipulator::POSITION_AFTER)->applyToPalette('text','tl_content');
26
+
27
+PaletteManipulator::create()->addLegend('col_layout_legend','rs_columns_legend')->addField('es_rs_columns_valign','col_layout_legend', PaletteManipulator::POSITION_APPEND)->applyToPalette('rs_columns_start','tl_content');
28
+PaletteManipulator::create()->addLegend('col_layout_legend','protected_legend')->addField('es_rs_column_sort_large','col_layout_legend', PaletteManipulator::POSITION_APPEND)->addField('es_rs_column_sort_medium','es_rs_column_sort_large')->addField('es_rs_column_sort_small','es_rs_column_sort_medium')->addField('es_rs_columns_valign','es_rs_column_sort_small')->applyToPalette('rs_column_start','tl_content');
29
+
30
+$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'es_animate';
31
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['es_animate'] = 'es_animate_children,es_animate_type,es_animate_fade';
32
+
33
+/*
34
+ * Add fields
35
+ */
36
+
37
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_col_text'] = array
38
+(
39
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_col_text'],
40
+    'exclude'                 => true,
41
+    'inputType'               => 'select',
42
+    'options'                 => array('2col'),
43
+    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_col_text'],
44
+    'eval'                    => array('tl_class'=>'clr w50','mandatory'=>false,'includeBlankOption'=>true),
45
+    'sql'                     => "varchar(32) NOT NULL default ''"
46
+);
47
+
48
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_spacing'] = array
49
+(
50
+  'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_spacing'],
51
+  'exclude'                 => true,
52
+  'inputType'               => 'select',
53
+  'options'                 => array('default','paragraph'),
54
+  'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_spacing'],
55
+  'eval'                    => array('tl_class'=>'clr w50','mandatory'=>false,'includeBlankOption'=>true),
56
+  'sql'                     => "varchar(32) NOT NULL default ''"
57
+);
58
+
59
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_padding'] = array
60
+(
61
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_padding'],
62
+    'exclude'                 => true,
63
+    'inputType'               => 'checkbox',
64
+    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_padding'],
65
+    'eval'                    => array('tl_class'=>'w50 m12'),
66
+    'sql'                     => "char(1) NOT NULL default ''"
67
+);
68
+
69
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_textAlign'] = array
70
+(
71
+  'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_textAlign'],
72
+  'exclude'                 => true,
73
+  'inputType'               => 'select',
74
+  'options'                 => array('left','center','right'),
75
+  'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign'],
76
+  'eval'                    => array('tl_class'=>'w50','mandatory'=>false,'includeBlankOption'=>true),
77
+  'sql'                     => "varchar(32) NOT NULL default ''"
78
+);
79
+
80
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_columns_valign'] = array
81
+(
82
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_columns_valign'],
83
+    'exclude'                 => true,
84
+    'inputType'               => 'select',
85
+    'options'                 => array('top','center','bottom','stretch'),
86
+    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign'],
87
+    'eval'                    => array('tl_class'=>'w50','mandatory'=>false,'includeBlankOption'=>true),
88
+    'sql'                     => "varchar(16) NOT NULL default ''"
89
+);
90
+
91
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_column_sort_small'] = array
92
+(
93
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_small'],
94
+    'exclude'                 => true,
95
+    'inputType'               => 'text',
96
+    'eval'                    => array('tl_class'=>'rs_columns_w33', 'rgxp'=>'natural','maxval'=>6),
97
+    'sql'                     => "varchar(255) NOT NULL default ''"
98
+);
99
+
100
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_column_sort_medium'] = array
101
+(
102
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_medium'],
103
+    'exclude'                 => true,
104
+    'inputType'               => 'text',
105
+    'eval'                    => array('tl_class'=>'rs_columns_w33', 'rgxp'=>'natural','maxval'=>6),
106
+    'sql'                     => "varchar(255) NOT NULL default ''"
107
+);
108
+
109
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_column_sort_large'] = array
110
+(
111
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_large'],
112
+    'exclude'                 => true,
113
+    'inputType'               => 'text',
114
+    'eval'                    => array('tl_class'=>'rs_columns_w33', 'rgxp'=>'natural','maxval'=>6),
115
+    'sql'                     => "varchar(255) NOT NULL default ''"
116
+);
117
+
118
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate'] = array
119
+(
120
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate'],
121
+    'exclude'                 => true,
122
+    'inputType'               => 'checkbox',
123
+    'eval'                    => array('tl_class'=>'w50', 'submitOnChange'=>true),
124
+    'sql'                     => "char(1) NOT NULL default ''"
125
+);
126
+
127
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate_children'] = array
128
+(
129
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate_children'],
130
+    'exclude'                 => true,
131
+    'inputType'               => 'checkbox',
132
+    'eval'                    => array('tl_class'=>'w50'),
133
+    'sql'                     => "char(1) NOT NULL default ''"
134
+);
135
+
136
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate_type'] = array
137
+(
138
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate_type'],
139
+    'exclude'                 => true,
140
+    'inputType'               => 'select',
141
+    'options'                 => array('-move','-move -move-right','-move -move-top','-move -move-bottom'),
142
+    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type'],
143
+    'eval'                    => array('tl_class'=>'clr w50','mandatory'=>true,'includeBlankOption'=>true),
144
+    'sql'                     => "varchar(32) NOT NULL default ''"
145
+);
146
+
147
+$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate_fade'] = array
148
+(
149
+    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate_fade'],
150
+    'exclude'                 => true,
151
+    'inputType'               => 'checkbox',
152
+    'eval'                    => array('tl_class'=>'w50 m12'),
153
+    'sql'                     => "char(1) NOT NULL default ''"
154
+);
0 155
new file mode 100644
... ...
@@ -0,0 +1,30 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/*
12
+ * Modify palettes
13
+ */
14
+
15
+use Contao\CoreBundle\DataContainer\PaletteManipulator;
16
+
17
+PaletteManipulator::create()->addField('rs_columns_load_css_flex','rs_columns_load_css')->applyToPalette('default','tl_layout');
18
+
19
+/*
20
+ * Add fields
21
+ */
22
+
23
+$GLOBALS['TL_DCA']['tl_layout']['fields']['rs_columns_load_css_flex'] = array
24
+(
25
+  'label'                   => &$GLOBALS['TL_LANG']['tl_layout']['rs_columns_load_css_flex'],
26
+  'exclude'                 => true,
27
+  'inputType'               => 'checkbox',
28
+  'eval'                    => array('tl_class'=>'w50'),
29
+  'sql'                     => "char(1) NOT NULL default ''",
30
+);
0 31
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/**
12
+ * Fields
13
+ */
14
+$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'][0] = 'In Artikelliste verstecken';
15
+$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'][1] = 'Der Artikel wird in der Artikelliste nicht angezeigt';
0 16
new file mode 100644
... ...
@@ -0,0 +1,61 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/**
12
+ * Fields
13
+ */
14
+$GLOBALS['TL_LANG']['tl_content']['es_col_text'][0] = 'Mehrspaltiger Text';
15
+$GLOBALS['TL_LANG']['tl_content']['es_col_text'][1] = 'Der Text wird in Spalten ausgegeben.';
16
+$GLOBALS['TL_LANG']['tl_content']['es_spacing'][0] = 'Abstand nach dem Element';
17
+$GLOBALS['TL_LANG']['tl_content']['es_spacing'][1] = 'Fügt einen Abstand nach dem Element ein.';
18
+$GLOBALS['TL_LANG']['tl_content']['es_padding'][0] = 'Innenabstand';
19
+$GLOBALS['TL_LANG']['tl_content']['es_padding'][1] = 'Es wird Oben und Unten ein Innenabstand angewendet.';
20
+$GLOBALS['TL_LANG']['tl_content']['es_textAlign'][0] = 'Text-Ausrichtung';
21
+$GLOBALS['TL_LANG']['tl_content']['es_textAlign'][1] = 'Die Textausrichtung innerhalb des Elements. (Evtl. wird diese Einstellung durch spezifisches CSS überschrieben.)';
22
+$GLOBALS['TL_LANG']['tl_content']['es_rs_columns_valign'][0] = 'Vertikale Ausrichtung';
23
+$GLOBALS['TL_LANG']['tl_content']['es_rs_columns_valign'][1] = 'Vertikale Ausrichtung des Spalteninhalts.';
24
+$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_large'][0] = 'Desktop-Sortierung';
25
+$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_large'][1] = 'Anordnung der Spalte am Desktop.';
26
+$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_medium'][0] = 'Tablet-Sortierung';
27
+$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_medium'][1] = 'Anordnung der Spalte am Tablet.';
28
+$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_small'][0] = 'Mobile-Sortierung';
29
+$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_small'][1] = 'Anordnung der Spalte am Mobilgerät.';
30
+$GLOBALS['TL_LANG']['tl_content']['es_animate'][0] = 'Element animieren';
31
+$GLOBALS['TL_LANG']['tl_content']['es_animate'][1] = 'Animiert das Element, sobald es im sichtbaren Bereich ist.';
32
+$GLOBALS['TL_LANG']['tl_content']['es_animate_children'][0] = 'Kindelemente einzeln animieren';
33
+$GLOBALS['TL_LANG']['tl_content']['es_animate_children'][1] = 'Es werden die Kindelemente (z.B. mehrere Boxen/Spalten) einzeln animiert, anstatt das Hauptelement.';
34
+$GLOBALS['TL_LANG']['tl_content']['es_animate_type'][0] = 'Animationstyp';
35
+$GLOBALS['TL_LANG']['tl_content']['es_animate_type'][1] = 'Legt fest, wie das Element animiert werden soll.';
36
+$GLOBALS['TL_LANG']['tl_content']['es_animate_fade'][0] = 'Beim Animieren einblenden';
37
+$GLOBALS['TL_LANG']['tl_content']['es_animate_fade'][1] = 'Das Element wird während der Animation erst sichtbar.';
38
+
39
+/**
40
+ * Legends
41
+ */
42
+$GLOBALS['TL_LANG']['tl_content']['col_layout_legend'] = 'Spaltenlayout';
43
+$GLOBALS['TL_LANG']['tl_content']['es_animate_legend'] = 'Animations-Einstellungen';
44
+
45
+/**
46
+ * References
47
+ */
48
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_col_text']['2col'] = '2-Spalten';
49
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_spacing']['default'] = 'Standard';
50
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_spacing']['paragraph'] = 'Absatz';
51
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['top'] = 'Oben';
52
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['center'] = 'Mitte';
53
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['bottom'] = 'Unten';
54
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['stretch'] = 'Gleiche Höhe';
55
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign']['left'] = 'Linksbündig';
56
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign']['center'] = 'Zentriert';
57
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign']['right'] = 'Rechtsbündig';
58
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move'] = 'Einfliegen von rechts';
59
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move -move-right'] = 'Einfliegen von links';
60
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move -move-top'] = 'Einfliegen von unten';
61
+$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move -move-bottom'] = 'Einfliegen von oben';
0 62
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/**
12
+ * Fields
13
+ */
14
+$GLOBALS['TL_LANG']['tl_layout']['rs_columns_load_css_flex'][0] = 'Flexbox Spalten-Stylesheet laden';
15
+$GLOBALS['TL_LANG']['tl_layout']['rs_columns_load_css_flex'][1] = 'Ermöglicht die Verwendung der Spaltenumschlagelemente. Alternativ können Sie Ihr eigenes Stylesheet einbinden.';
0 16
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+@mixin transform($transform...) {
2
+  -webkit-transform: $transform;
3
+  -moz-transform: $transform;
4
+  -ms-transform: $transform;
5
+  -o-transform: $transform;
6
+  transform: $transform;
7
+}
8
+
9
+@mixin transition($transition...) {
10
+  -webkit-transition: $transition;
11
+  -moz-transition: $transition;
12
+  -ms-transition: $transition;
13
+  -o-transition: $transition;
14
+  transition: $transition;
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,70 @@
1
+@import "helper";
2
+
3
+@mixin animation-start {
4
+  @include transition(opacity 0.6s linear, transform 0.6s ease-out);
5
+
6
+  .-fade& {
7
+    opacity: 1;
8
+  }
9
+  .-move& {
10
+    @include transform(translate(0, 0));
11
+  }
12
+}
13
+
14
+@mixin animation-presets {
15
+  .-fade& {
16
+    opacity: 0;
17
+  }
18
+  .-move& {
19
+    @include transform(translate(50px, 0));
20
+  }
21
+  .-move-right& {
22
+    @include transform(translate(-50px, 0));
23
+  }
24
+  .-move-top& {
25
+    @include transform(translate(0, 50px));
26
+  }
27
+  .-move-bottom& {
28
+    @include transform(translate(0, -50px));
29
+  }
30
+}
31
+
32
+.is-animated {
33
+  &:not(.rs-columns):not(.animate-children) {
34
+    > *:not(.rs-columns) {
35
+      .-in-view& {
36
+        @include animation-start;
37
+      }
38
+      :not(.-in-view)& {
39
+        @include animation-presets;
40
+      }
41
+    }
42
+  }
43
+
44
+  &:not(.rs-columns):not(.animate-children) {
45
+    > *.rs-columns {
46
+      > * {
47
+        &.-in-view {
48
+          @include animation-start;
49
+        }
50
+
51
+        &:not(.-in-view) {
52
+          @include animation-presets;
53
+        }
54
+      }
55
+    }
56
+  }
57
+
58
+  &.rs-columns,
59
+  &.animate-children {
60
+    > * {
61
+      &.-in-view {
62
+        @include animation-start;
63
+      }
64
+
65
+      &:not(.-in-view) {
66
+        @include animation-presets;
67
+      }
68
+    }
69
+  }
70
+}
0 71
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+$gutter-default: (floor((1 / 960) * 1000000) / 1000000 * 30) * 100%;
2
+.ce_text {
3
+
4
+  &.layout_2col {
5
+
6
+    .text {
7
+      -webkit-column-count: 2;
8
+      -moz-column-count: 2;
9
+      column-count: 2;
10
+      -webkit-column-gap: $gutter-default;
11
+      -moz-column-gap: $gutter-default;
12
+      column-gap: $gutter-default;
13
+
14
+      p, div, ul, ol, dl {
15
+        break-inside: avoid-column;
16
+        break-before: auto;
17
+      }
18
+
19
+      h1, h2, h3, h4, h5, h6 {
20
+        break-inside: avoid-column;
21
+        break-after: avoid-column;
22
+      }
23
+    }
24
+
25
+    @media screen and (max-width: 599px) {
26
+      .text {
27
+        -webkit-column-count: 1;
28
+        -moz-column-count: 1;
29
+        column-count: 1;
30
+      }
31
+    }
32
+  }
33
+}
0 34
new file mode 100644
... ...
@@ -0,0 +1,97 @@
1
+@mixin column-classes($gutter-width, $max-columns, $class-name) {
2
+  @for $cols from 1 through $max-columns {
3
+    @for $span from 1 through $cols {
4
+      &.-#{unquote($class-name)}-col-#{$cols}-#{$span} {
5
+        flex-basis: 100% / $cols * $span - ($gutter-width * 100%);
6
+        order: 6;
7
+      }
8
+    }
9
+  }
10
+
11
+  @for $cols from 1 through $max-columns {
12
+    &.-#{unquote($class-name)}-order-#{$cols} {
13
+      order: $cols;
14
+    }
15
+  }
16
+}
17
+
18
+$gutter-width: floor((1 / 960) * 1000000) / 1000000 * 30;
19
+
20
+.rs-columns {
21
+  display: flex;
22
+  align-items: flex-start;
23
+  flex-wrap: wrap;
24
+  margin-left: -#{$gutter-width * 100%};
25
+  margin-top: -#{$gutter-width * 100%};
26
+
27
+  &.-valign-center {
28
+    align-items: center;
29
+  }
30
+  &.-valign-bottom {
31
+    align-items: flex-end;
32
+  }
33
+  &.-valign-stretch {
34
+    align-items: stretch;
35
+  }
36
+}
37
+
38
+.rs-column {
39
+  flex: 0;
40
+  max-width: 100%;
41
+  min-width: 0;
42
+  margin-top: $gutter-width * 100%;
43
+  margin-left: $gutter-width * 100%;
44
+  order: 6;
45
+
46
+  /*> * + * {
47
+    margin-top: 30px;
48
+  }*/
49
+
50
+  @include column-classes($gutter-width, 6, large);
51
+
52
+  &.-valign-center {
53
+    align-self: center;
54
+  }
55
+  &.-valign-bottom {
56
+    align-self: flex-end;
57
+  }
58
+  &.-valign-stretch {
59
+    align-self: stretch;
60
+  }
61
+}
62
+
63
+// Tablet portrait format (viewport width 900px and below)
64
+@media screen and (max-width: 900px) {
65
+  $gutter-width: floor((1 / 900) * 1000000) / 1000000 * 30;
66
+
67
+  .rs-columns {
68
+    margin-left: -#{$gutter-width * 100%};
69
+    margin-top: -#{$gutter-width * 100%};
70
+  }
71
+
72
+  .rs-column {
73
+    margin-top: $gutter-width * 100%;
74
+    margin-left: $gutter-width * 100%;
75
+    order: 6;
76
+
77
+    @include column-classes($gutter-width, 6, medium);
78
+  }
79
+}
80
+
81
+// Mobile (viewport width 599px and below)
82
+@media screen and (max-width: 599px) {
83
+  $gutter-width: floor((1 / 599) * 1000000) / 1000000 * 30;
84
+
85
+  .rs-columns {
86
+    margin-left: -#{$gutter-width * 100%};
87
+    margin-top: -#{$gutter-width * 100%};
88
+  }
89
+
90
+  .rs-column {
91
+    margin-top: $gutter-width * 100%;
92
+    margin-left: $gutter-width * 100%;
93
+    order: 6;
94
+
95
+    @include column-classes($gutter-width, 6, small);
96
+  }
97
+}
0 98
new file mode 100644
... ...
@@ -0,0 +1,91 @@
1
+(function(){
2
+
3
+  function isElementInViewport(element) {
4
+    var rect = element.getBoundingClientRect();
5
+    if (
6
+      rect.bottom < 0)
7
+    {
8
+      return 2;
9
+    }
10
+    else if (
11
+      rect.top >= 0 &&
12
+      rect.left+rect.width/2 >= 0 &&
13
+      rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) + (element.offsetHeight * 0.75) &&
14
+      rect.right-rect.width/2 <= (window.innerWidth || document.documentElement.clientWidth))
15
+    {
16
+      return 1;
17
+    } /*else if (
18
+      rect.left+rect.width/2 >= 0 &&
19
+      rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
20
+      rect.right-rect.width/2 <= (window.innerWidth || document.documentElement.clientWidth))
21
+    {
22
+      return 2;
23
+    }*/
24
+    return false;
25
+  }
26
+
27
+  function getAnimatedElements() {
28
+    var animatedWrapper = document.querySelectorAll(".is-animated"),
29
+      elements = [];
30
+
31
+    for (var i = 0; i < animatedWrapper.length; i++)
32
+    {
33
+      var hasChildren = false;
34
+      if (animatedWrapper[i].classList.contains("rs-columns") || animatedWrapper[i].classList.contains("animate-children"))
35
+      {
36
+        for (var j = 0; j < animatedWrapper[i].children.length; j++)
37
+        {
38
+          elements.push(animatedWrapper[i].children[j]);
39
+        }
40
+      } else if (!animatedWrapper[i].classList.contains("rs-columns"))
41
+      {
42
+        for (var j = 0; j < animatedWrapper[i].children.length; j++)
43
+        {
44
+          if (animatedWrapper[i].children[j].classList.contains("rs-columns"))
45
+          {
46
+            for (var k = 0; k < animatedWrapper[i].children[j].children.length; k++)
47
+            {
48
+              elements.push(animatedWrapper[i].children[j].children[k]);
49
+              hasChildren = true;
50
+            }
51
+          }
52
+        }
53
+        if (!hasChildren)
54
+        {
55
+          elements.push(animatedWrapper[i]);
56
+        }
57
+      }
58
+    }
59
+    return elements;
60
+  }
61
+
62
+  var elements = getAnimatedElements();
63
+
64
+  function callbackFunc() {
65
+    var delay = 0;
66
+    for (var i = 0; i < elements.length; i++)
67
+    {
68
+      if (elements[i].classList.contains('-in-view') === false && (hasDelay = isElementInViewport(elements[i])))
69
+      {
70
+        if (hasDelay === 1)
71
+        {
72
+          elements[i].style.transitionDelay = delay + 'ms';
73
+          delay = delay + 125;
74
+        }
75
+        if (!Element.prototype.closest || isElementInViewport(elements[i]) !== 2 || (isElementInViewport(elements[i]) === 2 && !elements[i].classList.contains('-reverse') && !elements[i].closest('.is-animated').classList.contains('-reverse')))
76
+        {
77
+          elements[i].classList.add("-in-view");
78
+        }
79
+      }
80
+
81
+      /* Else-Bedinung entfernen, um .visible nicht wieder zu löschen, wenn das Element den Viewport verlässt. */
82
+      else if (Element.prototype.closest && elements[i].classList.contains('-in-view') === true && isElementInViewport(elements[i]) === 2 && (elements[i].classList.contains('-reverse') || elements[i].closest('.is-animated').classList.contains('-reverse')))
83
+      {
84
+        elements[i].classList.remove("-in-view");
85
+      }
86
+    }
87
+  }
88
+
89
+  window.addEventListener("load", callbackFunc);
90
+  window.addEventListener("scroll", callbackFunc);
91
+})();
... ...
@@ -22,7 +22,7 @@ class Plugin implements BundlePluginInterface
22 22
     /**
23 23
      * {@inheritdoc}
24 24
      */
25
-    public function getBundles(ParserInterface $parser)
25
+    public function getBundles(ParserInterface $parser): array
26 26
     {
27 27
         $arrLoadAfter = [ContaoCoreBundle::class];
28 28
 
... ...
@@ -20,14 +20,13 @@ class EsalesMediaContentHelperExtension extends Extension
20 20
     /**
21 21
      * {@inheritdoc}
22 22
      */
23
-    public function load(array $mergedConfig, ContainerBuilder $container)
23
+    public function load(array $configs, ContainerBuilder $container): void
24 24
     {
25 25
         $loader = new YamlFileLoader(
26 26
             $container,
27
-            new FileLocator(__DIR__.'/../Resources/config')
27
+            new FileLocator(__DIR__.'/../../config')
28 28
         );
29 29
 
30
-        $loader->load('listener.yml');
31 30
         $loader->load('services.yml');
32 31
     }
33 32
 }
... ...
@@ -14,4 +14,8 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
14 14
 
15 15
 class EsalesMediaContentHelperBundle extends Bundle
16 16
 {
17
+    public function getPath(): string
18
+    {
19
+        return \dirname(__DIR__);
20
+    }
17 21
 }
... ...
@@ -10,14 +10,16 @@
10 10
 
11 11
 namespace EsalesMedia\ContentHelperBundle\EventListener;
12 12
 
13
+use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
13 14
 use Contao\FilesModel;
14 15
 use Contao\Validator;
15 16
 
17
+#[AsHook("replaceInsertTags")]
16 18
 class InsertTagsListener
17 19
 {
18
-    public function onReplaceInsertTags($tag)
20
+    public function __invoke(string $insertTag, bool $useCache, string $cachedValue, array $flags, array $tags, array $cache, int $_rit, int $_cnt)
19 21
     {
20
-        $elements = explode('::', $tag,2);
22
+        $elements = explode('::', $insertTag,2);
21 23
         $insertTag = array_shift($elements);
22 24
 
23 25
         if (strtolower($insertTag) === 'svg_inline') {
... ...
@@ -10,20 +10,18 @@
10 10
 
11 11
 namespace EsalesMedia\ContentHelperBundle\EventListener;
12 12
 
13
-use Contao\CoreBundle\Framework\FrameworkAwareInterface;
14
-use Contao\CoreBundle\Framework\FrameworkAwareTrait;
13
+use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
15 14
 use Contao\LayoutModel;
16 15
 use Contao\PageModel;
17 16
 use Contao\PageRegular;
18 17
 
19
-class PageListener implements FrameworkAwareInterface
18
+#[AsHook("generatePage")]
19
+class PageListener
20 20
 {
21
-    use FrameworkAwareTrait;
22
-
23
-    public function onGeneratePage(PageModel $page, LayoutModel $layout, PageRegular $pageRegular)
21
+    public function __invoke(PageModel $pageModel, LayoutModel $layout, PageRegular $pageRegular): void
24 22
     {
25 23
         if ($layout->rs_columns_load_css_flex) {
26
-            $assetsDir = 'web/bundles/esalesmediacontenthelper';
24
+            $assetsDir = 'bundles/esalesmediacontenthelper';
27 25
             $GLOBALS['TL_CSS'][] = $assetsDir . '/css/columns-flex.scss||static';
28 26
         }
29 27
     }
... ...
@@ -10,15 +10,13 @@
10 10
 
11 11
 namespace EsalesMedia\ContentHelperBundle\EventListener;
12 12
 
13
-use Contao\CoreBundle\Framework\FrameworkAwareInterface;
14
-use Contao\CoreBundle\Framework\FrameworkAwareTrait;
13
+use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
15 14
 use Contao\Template;
16 15
 
17
-class TemplateListener implements FrameworkAwareInterface
16
+#[AsHook('parseTemplate')]
17
+class TemplateListener
18 18
 {
19
-  use FrameworkAwareTrait;
20
-
21
-  public function onParseTemplate(Template $template)
19
+  public function __invoke(Template $template): void
22 20
   {
23 21
     $assetsDir = 'bundles/esalesmediacontenthelper';
24 22
 
25 23
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-services:
2
-    _defaults:
3
-        public: true
4
-
5
-    _instanceof:
6
-        Contao\CoreBundle\Framework\FrameworkAwareInterface:
7
-            calls:
8
-                - ["setFramework", ["@contao.framework"]]
9
-
10
-    esalesmedia_content_helper.listener.template:
11
-        class: \EsalesMedia\ContentHelperBundle\EventListener\TemplateListener
12
-        public: true
13
-
14
-    esalesmedia_content_helper.listener.page:
15
-        class: \EsalesMedia\ContentHelperBundle\EventListener\PageListener
16
-        public: true
17
-
18
-    esalesmedia_content_helper.listener.insert_tags:
19
-        class: \EsalesMedia\ContentHelperBundle\EventListener\InsertTagsListener
20
-        public: true
21 0
deleted file mode 100644
... ...
@@ -1,9 +0,0 @@
1
-services:
2
-    _instanceof:
3
-        Contao\CoreBundle\Framework\FrameworkAwareInterface:
4
-            calls:
5
-                - ["setFramework", ["@contao.framework"]]
6
-
7
-        Symfony\Component\DependencyInjection\ContainerAwareInterface:
8
-            calls:
9
-                - ["setContainer", ["@service_container"]]
10 0
deleted file mode 100644
... ...
@@ -1,28 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/**
12
- * Content elements
13
- */
14
-$GLOBALS['TL_CTE']['rs_columns']['rs_columns_start'] = 'EsalesMedia\\ContentHelperBundle\\FrontendController\\ColumnsStart';
15
-$GLOBALS['TL_CTE']['rs_columns']['rs_column_start'] = 'EsalesMedia\\ContentHelperBundle\\FrontendController\\ColumnStart';
16
-
17
-/**
18
- * Frontend module
19
- */
20
-$GLOBALS['FE_MOD']['miscellaneous']['articlelist'] = 'EsalesMedia\\ContentHelperBundle\\FrontendModule\\ArticleListModule';
21
-
22
-
23
-/**
24
- * Hooks
25
- */
26
-$GLOBALS['TL_HOOKS']['parseTemplate'][] = array('esalesmedia_content_helper.listener.template','onParseTemplate');
27
-$GLOBALS['TL_HOOKS']['generatePage'][] = array('esalesmedia_content_helper.listener.page','onGeneratePage');
28
-$GLOBALS['TL_HOOKS']['replaceInsertTags'][] = array('esalesmedia_content_helper.listener.insert_tags','onReplaceInsertTags');
29 0
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/*
12
- * Modify palettes
13
- */
14
-foreach ($GLOBALS['TL_DCA']['tl_article']['palettes'] as $key => $palette)
15
-{
16
-    if ($key != '__selector__')
17
-    {
18
-        \Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('hideInArticleList','teaser',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_AFTER)->applyToPalette($key,'tl_article');
19
-    }
20
-}
21
-
22
-/*
23
- * Add fields
24
- */
25
-
26
-$GLOBALS['TL_DCA']['tl_article']['fields']['hideInArticleList'] = array
27
-(
28
-    'label'                   => &$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'],
29
-    'exclude'                 => true,
30
-    'inputType'               => 'checkbox',
31
-    'eval'                    => array('tl_class'=>'w50'),
32
-    'sql'                     => "char(1) NOT NULL default ''"
33
-);
34 0
deleted file mode 100644
... ...
@@ -1,151 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/*
12
- * Modify palettes
13
- */
14
-foreach ($GLOBALS['TL_DCA']['tl_content']['palettes'] as $key => $palette)
15
-{
16
-    if ($key != '__selector__')
17
-    {
18
-        \Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('es_textAlign', 'cssID')->addField('es_spacing', 'es_textAlign')->addField('es_padding', 'es_spacing')->applyToPalette($key, 'tl_content');
19
-        \Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addLegend('es_animate_legend','protected_legend',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_AFTER,true)->addField('es_animate','es_animate_legend',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)->applyToPalette($key,'tl_content');
20
-    }
21
-}
22
-\Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('es_col_text','headline',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_AFTER)->applyToPalette('text','tl_content');
23
-
24
-\Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addLegend('col_layout_legend','rs_columns_legend')->addField('es_rs_columns_valign','col_layout_legend',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)->applyToPalette('rs_columns_start','tl_content');
25
-\Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addLegend('col_layout_legend','protected_legend')->addField('es_rs_column_sort_large','col_layout_legend',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)->addField('es_rs_column_sort_medium','es_rs_column_sort_large')->addField('es_rs_column_sort_small','es_rs_column_sort_medium')->addField('es_rs_columns_valign','es_rs_column_sort_small')->applyToPalette('rs_column_start','tl_content');
26
-
27
-$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'es_animate';
28
-$GLOBALS['TL_DCA']['tl_content']['subpalettes']['es_animate'] = 'es_animate_children,es_animate_type,es_animate_fade';
29
-
30
-/*
31
- * Add fields
32
- */
33
-
34
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_col_text'] = array
35
-(
36
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_col_text'],
37
-    'exclude'                 => true,
38
-    'inputType'               => 'select',
39
-    'options'                 => array('2col'),
40
-    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_col_text'],
41
-    'eval'                    => array('tl_class'=>'clr w50','mandatory'=>false,'includeBlankOption'=>true),
42
-    'sql'                     => "varchar(32) NOT NULL default ''"
43
-);
44
-
45
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_spacing'] = array
46
-(
47
-  'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_spacing'],
48
-  'exclude'                 => true,
49
-  'inputType'               => 'select',
50
-  'options'                 => array('default','paragraph'),
51
-  'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_spacing'],
52
-  'eval'                    => array('tl_class'=>'clr w50','mandatory'=>false,'includeBlankOption'=>true),
53
-  'sql'                     => "varchar(32) NOT NULL default ''"
54
-);
55
-
56
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_padding'] = array
57
-(
58
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_padding'],
59
-    'exclude'                 => true,
60
-    'inputType'               => 'checkbox',
61
-    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_padding'],
62
-    'eval'                    => array('tl_class'=>'w50 m12'),
63
-    'sql'                     => "char(1) NOT NULL default ''"
64
-);
65
-
66
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_textAlign'] = array
67
-(
68
-  'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_textAlign'],
69
-  'exclude'                 => true,
70
-  'inputType'               => 'select',
71
-  'options'                 => array('left','center','right'),
72
-  'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign'],
73
-  'eval'                    => array('tl_class'=>'w50','mandatory'=>false,'includeBlankOption'=>true),
74
-  'sql'                     => "varchar(32) NOT NULL default ''"
75
-);
76
-
77
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_columns_valign'] = array
78
-(
79
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_columns_valign'],
80
-    'exclude'                 => true,
81
-    'inputType'               => 'select',
82
-    'options'                 => array('top','center','bottom','stretch'),
83
-    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign'],
84
-    'eval'                    => array('tl_class'=>'w50','mandatory'=>false,'includeBlankOption'=>true),
85
-    'sql'                     => "varchar(16) NOT NULL default ''"
86
-);
87
-
88
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_column_sort_small'] = array
89
-(
90
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_small'],
91
-    'exclude'                 => true,
92
-    'inputType'               => 'text',
93
-    'eval'                    => array('tl_class'=>'rs_columns_w33', 'rgxp'=>'natural','maxval'=>6),
94
-    'sql'                     => "varchar(255) NOT NULL default ''"
95
-);
96
-
97
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_column_sort_medium'] = array
98
-(
99
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_medium'],
100
-    'exclude'                 => true,
101
-    'inputType'               => 'text',
102
-    'eval'                    => array('tl_class'=>'rs_columns_w33', 'rgxp'=>'natural','maxval'=>6),
103
-    'sql'                     => "varchar(255) NOT NULL default ''"
104
-);
105
-
106
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_rs_column_sort_large'] = array
107
-(
108
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_large'],
109
-    'exclude'                 => true,
110
-    'inputType'               => 'text',
111
-    'eval'                    => array('tl_class'=>'rs_columns_w33', 'rgxp'=>'natural','maxval'=>6),
112
-    'sql'                     => "varchar(255) NOT NULL default ''"
113
-);
114
-
115
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate'] = array
116
-(
117
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate'],
118
-    'exclude'                 => true,
119
-    'inputType'               => 'checkbox',
120
-    'eval'                    => array('tl_class'=>'w50', 'submitOnChange'=>true),
121
-    'sql'                     => "char(1) NOT NULL default ''"
122
-);
123
-
124
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate_children'] = array
125
-(
126
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate_children'],
127
-    'exclude'                 => true,
128
-    'inputType'               => 'checkbox',
129
-    'eval'                    => array('tl_class'=>'w50'),
130
-    'sql'                     => "char(1) NOT NULL default ''"
131
-);
132
-
133
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate_type'] = array
134
-(
135
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate_type'],
136
-    'exclude'                 => true,
137
-    'inputType'               => 'select',
138
-    'options'                 => array('-move','-move -move-right','-move -move-top','-move -move-bottom'),
139
-    'reference'               => &$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type'],
140
-    'eval'                    => array('tl_class'=>'clr w50','mandatory'=>true,'includeBlankOption'=>true),
141
-    'sql'                     => "varchar(32) NOT NULL default ''"
142
-);
143
-
144
-$GLOBALS['TL_DCA']['tl_content']['fields']['es_animate_fade'] = array
145
-(
146
-    'label'                   => &$GLOBALS['TL_LANG']['tl_content']['es_animate_fade'],
147
-    'exclude'                 => true,
148
-    'inputType'               => 'checkbox',
149
-    'eval'                    => array('tl_class'=>'w50 m12'),
150
-    'sql'                     => "char(1) NOT NULL default ''"
151
-);
152 0
deleted file mode 100644
... ...
@@ -1,28 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/*
12
- * Modify palettes
13
- */
14
-
15
-\Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('rs_columns_load_css_flex','rs_columns_load_css')->applyToPalette('default','tl_layout');
16
-
17
-/*
18
- * Add fields
19
- */
20
-
21
-$GLOBALS['TL_DCA']['tl_layout']['fields']['rs_columns_load_css_flex'] = array
22
-(
23
-  'label'                   => &$GLOBALS['TL_LANG']['tl_layout']['rs_columns_load_css_flex'],
24
-  'exclude'                 => true,
25
-  'inputType'               => 'checkbox',
26
-  'eval'                    => array('tl_class'=>'w50'),
27
-  'sql'                     => "char(1) NOT NULL default ''",
28
-);
29 0
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/**
12
- * Fields
13
- */
14
-$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'][0] = 'In Artikelliste verstecken';
15
-$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'][1] = 'Der Artikel wird in der Artikelliste nicht angezeigt';
16 0
deleted file mode 100644
... ...
@@ -1,61 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/**
12
- * Fields
13
- */
14
-$GLOBALS['TL_LANG']['tl_content']['es_col_text'][0] = 'Mehrspaltiger Text';
15
-$GLOBALS['TL_LANG']['tl_content']['es_col_text'][1] = 'Der Text wird in Spalten ausgegeben.';
16
-$GLOBALS['TL_LANG']['tl_content']['es_spacing'][0] = 'Abstand nach dem Element';
17
-$GLOBALS['TL_LANG']['tl_content']['es_spacing'][1] = 'Fügt einen Abstand nach dem Element ein.';
18
-$GLOBALS['TL_LANG']['tl_content']['es_padding'][0] = 'Innenabstand';
19
-$GLOBALS['TL_LANG']['tl_content']['es_padding'][1] = 'Es wird Oben und Unten ein Innenabstand angewendet.';
20
-$GLOBALS['TL_LANG']['tl_content']['es_textAlign'][0] = 'Text-Ausrichtung';
21
-$GLOBALS['TL_LANG']['tl_content']['es_textAlign'][1] = 'Die Textausrichtung innerhalb des Elements. (Evtl. wird diese Einstellung durch spezifisches CSS überschrieben.)';
22
-$GLOBALS['TL_LANG']['tl_content']['es_rs_columns_valign'][0] = 'Vertikale Ausrichtung';
23
-$GLOBALS['TL_LANG']['tl_content']['es_rs_columns_valign'][1] = 'Vertikale Ausrichtung des Spalteninhalts.';
24
-$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_large'][0] = 'Desktop-Sortierung';
25
-$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_large'][1] = 'Anordnung der Spalte am Desktop.';
26
-$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_medium'][0] = 'Tablet-Sortierung';
27
-$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_medium'][1] = 'Anordnung der Spalte am Tablet.';
28
-$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_small'][0] = 'Mobile-Sortierung';
29
-$GLOBALS['TL_LANG']['tl_content']['es_rs_column_sort_small'][1] = 'Anordnung der Spalte am Mobilgerät.';
30
-$GLOBALS['TL_LANG']['tl_content']['es_animate'][0] = 'Element animieren';
31
-$GLOBALS['TL_LANG']['tl_content']['es_animate'][1] = 'Animiert das Element, sobald es im sichtbaren Bereich ist.';
32
-$GLOBALS['TL_LANG']['tl_content']['es_animate_children'][0] = 'Kindelemente einzeln animieren';
33
-$GLOBALS['TL_LANG']['tl_content']['es_animate_children'][1] = 'Es werden die Kindelemente (z.B. mehrere Boxen/Spalten) einzeln animiert, anstatt das Hauptelement.';
34
-$GLOBALS['TL_LANG']['tl_content']['es_animate_type'][0] = 'Animationstyp';
35
-$GLOBALS['TL_LANG']['tl_content']['es_animate_type'][1] = 'Legt fest, wie das Element animiert werden soll.';
36
-$GLOBALS['TL_LANG']['tl_content']['es_animate_fade'][0] = 'Beim Animieren einblenden';
37
-$GLOBALS['TL_LANG']['tl_content']['es_animate_fade'][1] = 'Das Element wird während der Animation erst sichtbar.';
38
-
39
-/**
40
- * Legends
41
- */
42
-$GLOBALS['TL_LANG']['tl_content']['col_layout_legend'] = 'Spaltenlayout';
43
-$GLOBALS['TL_LANG']['tl_content']['es_animate_legend'] = 'Animations-Einstellungen';
44
-
45
-/**
46
- * References
47
- */
48
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_col_text']['2col'] = '2-Spalten';
49
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_spacing']['default'] = 'Standard';
50
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_spacing']['paragraph'] = 'Absatz';
51
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['top'] = 'Oben';
52
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['center'] = 'Mitte';
53
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['bottom'] = 'Unten';
54
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_rs_columns_valign']['stretch'] = 'Gleiche Höhe';
55
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign']['left'] = 'Linksbündig';
56
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign']['center'] = 'Zentriert';
57
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_textAlign']['right'] = 'Rechtsbündig';
58
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move'] = 'Einfliegen von rechts';
59
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move -move-right'] = 'Einfliegen von links';
60
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move -move-top'] = 'Einfliegen von unten';
61
-$GLOBALS['TL_LANG']['tl_content']['REF']['es_animate_type']['-move -move-bottom'] = 'Einfliegen von oben';
62 0
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/**
12
- * Fields
13
- */
14
-$GLOBALS['TL_LANG']['tl_layout']['rs_columns_load_css_flex'][0] = 'Flexbox Spalten-Stylesheet laden';
15
-$GLOBALS['TL_LANG']['tl_layout']['rs_columns_load_css_flex'][1] = 'Ermöglicht die Verwendung der Spaltenumschlagelemente. Alternativ können Sie Ihr eigenes Stylesheet einbinden.';
16 0
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-<?php $this->extend('block_searchable'); ?>
2
-
3
-<?php $this->block('content'); ?>
4
-
5
-  <?php if (!$this->addBefore): ?>
6
-    <div class="text"><?= $this->text ?></div>
7
-  <?php endif; ?>
8
-
9
-  <?php if ($this->addImage): ?>
10
-    <?php $this->insert('image', $this->arrData); ?>
11
-  <?php endif; ?>
12
-
13
-  <?php if ($this->addBefore): ?>
14
-    <div class="text"><?= $this->text ?></div>
15
-  <?php endif; ?>
16
-
17
-<?php $this->endblock(); ?>
18 0
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-@mixin transform($transform...) {
2
-  -webkit-transform: $transform;
3
-  -moz-transform: $transform;
4
-  -ms-transform: $transform;
5
-  -o-transform: $transform;
6
-  transform: $transform;
7
-}
8
-
9
-@mixin transition($transition...) {
10
-  -webkit-transition: $transition;
11
-  -moz-transition: $transition;
12
-  -ms-transition: $transition;
13
-  -o-transition: $transition;
14
-  transition: $transition;
15
-}
16 0
deleted file mode 100644
... ...
@@ -1,70 +0,0 @@
1
-@import "helper";
2
-
3
-@mixin animation-start {
4
-  @include transition(opacity 0.6s linear, transform 0.6s ease-out);
5
-
6
-  .-fade& {
7
-    opacity: 1;
8
-  }
9
-  .-move& {
10
-    @include transform(translate(0, 0));
11
-  }
12
-}
13
-
14
-@mixin animation-presets {
15
-  .-fade& {
16
-    opacity: 0;
17
-  }
18
-  .-move& {
19
-    @include transform(translate(50px, 0));
20
-  }
21
-  .-move-right& {
22
-    @include transform(translate(-50px, 0));
23
-  }
24
-  .-move-top& {
25
-    @include transform(translate(0, 50px));
26
-  }
27
-  .-move-bottom& {
28
-    @include transform(translate(0, -50px));
29
-  }
30
-}
31
-
32
-.is-animated {
33
-  &:not(.rs-columns):not(.animate-children) {
34
-    > *:not(.rs-columns) {
35
-      .-in-view& {
36
-        @include animation-start;
37
-      }
38
-      :not(.-in-view)& {
39
-        @include animation-presets;
40
-      }
41
-    }
42
-  }
43
-
44
-  &:not(.rs-columns):not(.animate-children) {
45
-    > *.rs-columns {
46
-      > * {
47
-        &.-in-view {
48
-          @include animation-start;
49
-        }
50
-
51
-        &:not(.-in-view) {
52
-          @include animation-presets;
53
-        }
54
-      }
55
-    }
56
-  }
57
-
58
-  &.rs-columns,
59
-  &.animate-children {
60
-    > * {
61
-      &.-in-view {
62
-        @include animation-start;
63
-      }
64
-
65
-      &:not(.-in-view) {
66
-        @include animation-presets;
67
-      }
68
-    }
69
-  }
70
-}
71 0
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-$gutter-default: (floor((1 / 960) * 1000000) / 1000000 * 30) * 100%;
2
-.ce_text {
3
-
4
-  &.layout_2col {
5
-
6
-    .text {
7
-      -webkit-column-count: 2;
8
-      -moz-column-count: 2;
9
-      column-count: 2;
10
-      -webkit-column-gap: $gutter-default;
11
-      -moz-column-gap: $gutter-default;
12
-      column-gap: $gutter-default;
13
-
14
-      p, div, ul, ol, dl {
15
-        break-inside: avoid-column;
16
-        break-before: auto;
17
-      }
18
-
19
-      h1, h2, h3, h4, h5, h6 {
20
-        break-inside: avoid-column;
21
-        break-after: avoid-column;
22
-      }
23
-    }
24
-
25
-    @media screen and (max-width: 599px) {
26
-      .text {
27
-        -webkit-column-count: 1;
28
-        -moz-column-count: 1;
29
-        column-count: 1;
30
-      }
31
-    }
32
-  }
33
-}
34 0
deleted file mode 100644
... ...
@@ -1,97 +0,0 @@
1
-@mixin column-classes($gutter-width, $max-columns, $class-name) {
2
-  @for $cols from 1 through $max-columns {
3
-    @for $span from 1 through $cols {
4
-      &.-#{unquote($class-name)}-col-#{$cols}-#{$span} {
5
-        flex-basis: 100% / $cols * $span - ($gutter-width * 100%);
6
-        order: 6;
7
-      }
8
-    }
9
-  }
10
-
11
-  @for $cols from 1 through $max-columns {
12
-    &.-#{unquote($class-name)}-order-#{$cols} {
13
-      order: $cols;
14
-    }
15
-  }
16
-}
17
-
18
-$gutter-width: floor((1 / 960) * 1000000) / 1000000 * 30;
19
-
20
-.rs-columns {
21
-  display: flex;
22
-  align-items: flex-start;
23
-  flex-wrap: wrap;
24
-  margin-left: -#{$gutter-width * 100%};
25
-  margin-top: -#{$gutter-width * 100%};
26
-
27
-  &.-valign-center {
28
-    align-items: center;
29
-  }
30
-  &.-valign-bottom {
31
-    align-items: flex-end;
32
-  }
33
-  &.-valign-stretch {
34
-    align-items: stretch;
35
-  }
36
-}
37
-
38
-.rs-column {
39
-  flex: 0;
40
-  max-width: 100%;
41
-  min-width: 0;
42
-  margin-top: $gutter-width * 100%;
43
-  margin-left: $gutter-width * 100%;
44
-  order: 6;
45
-
46
-  /*> * + * {
47
-    margin-top: 30px;
48
-  }*/
49
-
50
-  @include column-classes($gutter-width, 6, large);
51
-
52
-  &.-valign-center {
53
-    align-self: center;
54
-  }
55
-  &.-valign-bottom {
56
-    align-self: flex-end;
57
-  }
58
-  &.-valign-stretch {
59
-    align-self: stretch;
60
-  }
61
-}
62
-
63
-// Tablet portrait format (viewport width 900px and below)
64
-@media screen and (max-width: 900px) {
65
-  $gutter-width: floor((1 / 900) * 1000000) / 1000000 * 30;
66
-
67
-  .rs-columns {
68
-    margin-left: -#{$gutter-width * 100%};
69
-    margin-top: -#{$gutter-width * 100%};
70
-  }
71
-
72
-  .rs-column {
73
-    margin-top: $gutter-width * 100%;
74
-    margin-left: $gutter-width * 100%;
75
-    order: 6;
76
-
77
-    @include column-classes($gutter-width, 6, medium);
78
-  }
79
-}
80
-
81
-// Mobile (viewport width 599px and below)
82
-@media screen and (max-width: 599px) {
83
-  $gutter-width: floor((1 / 599) * 1000000) / 1000000 * 30;
84
-
85
-  .rs-columns {
86
-    margin-left: -#{$gutter-width * 100%};
87
-    margin-top: -#{$gutter-width * 100%};
88
-  }
89
-
90
-  .rs-column {
91
-    margin-top: $gutter-width * 100%;
92
-    margin-left: $gutter-width * 100%;
93
-    order: 6;
94
-
95
-    @include column-classes($gutter-width, 6, small);
96
-  }
97
-}
98 0
deleted file mode 100644
... ...
@@ -1,91 +0,0 @@
1
-(function(){
2
-
3
-  function isElementInViewport(element) {
4
-    var rect = element.getBoundingClientRect();
5
-    if (
6
-      rect.bottom < 0)
7
-    {
8
-      return 2;
9
-    }
10
-    else if (
11
-      rect.top >= 0 &&
12
-      rect.left+rect.width/2 >= 0 &&
13
-      rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) + (element.offsetHeight * 0.75) &&
14
-      rect.right-rect.width/2 <= (window.innerWidth || document.documentElement.clientWidth))
15
-    {
16
-      return 1;
17
-    } /*else if (
18
-      rect.left+rect.width/2 >= 0 &&
19
-      rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
20
-      rect.right-rect.width/2 <= (window.innerWidth || document.documentElement.clientWidth))
21
-    {
22
-      return 2;
23
-    }*/
24
-    return false;
25
-  }
26
-
27
-  function getAnimatedElements() {
28
-    var animatedWrapper = document.querySelectorAll(".is-animated"),
29
-      elements = [];
30
-
31
-    for (var i = 0; i < animatedWrapper.length; i++)
32
-    {
33
-      var hasChildren = false;
34
-      if (animatedWrapper[i].classList.contains("rs-columns") || animatedWrapper[i].classList.contains("animate-children"))
35
-      {
36
-        for (var j = 0; j < animatedWrapper[i].children.length; j++)
37
-        {
38
-          elements.push(animatedWrapper[i].children[j]);
39
-        }
40
-      } else if (!animatedWrapper[i].classList.contains("rs-columns"))
41
-      {
42
-        for (var j = 0; j < animatedWrapper[i].children.length; j++)
43
-        {
44
-          if (animatedWrapper[i].children[j].classList.contains("rs-columns"))
45
-          {
46
-            for (var k = 0; k < animatedWrapper[i].children[j].children.length; k++)
47
-            {
48
-              elements.push(animatedWrapper[i].children[j].children[k]);
49
-              hasChildren = true;
50
-            }
51
-          }
52
-        }
53
-        if (!hasChildren)
54
-        {
55
-          elements.push(animatedWrapper[i]);
56
-        }
57
-      }
58
-    }
59
-    return elements;
60
-  }
61
-
62
-  var elements = getAnimatedElements();
63
-
64
-  function callbackFunc() {
65
-    var delay = 0;
66
-    for (var i = 0; i < elements.length; i++)
67
-    {
68
-      if (elements[i].classList.contains('-in-view') === false && (hasDelay = isElementInViewport(elements[i])))
69
-      {
70
-        if (hasDelay === 1)
71
-        {
72
-          elements[i].style.transitionDelay = delay + 'ms';
73
-          delay = delay + 125;
74
-        }
75
-        if (!Element.prototype.closest || isElementInViewport(elements[i]) !== 2 || (isElementInViewport(elements[i]) === 2 && !elements[i].classList.contains('-reverse') && !elements[i].closest('.is-animated').classList.contains('-reverse')))
76
-        {
77
-          elements[i].classList.add("-in-view");
78
-        }
79
-      }
80
-
81
-      /* Else-Bedinung entfernen, um .visible nicht wieder zu löschen, wenn das Element den Viewport verlässt. */
82
-      else if (Element.prototype.closest && elements[i].classList.contains('-in-view') === true && isElementInViewport(elements[i]) === 2 && (elements[i].classList.contains('-reverse') || elements[i].closest('.is-animated').classList.contains('-reverse')))
83
-      {
84
-        elements[i].classList.remove("-in-view");
85
-      }
86
-    }
87
-  }
88
-
89
-  window.addEventListener("load", callbackFunc);
90
-  window.addEventListener("scroll", callbackFunc);
91
-})();