... | ... |
@@ -11,3 +11,4 @@ |
11 | 11 |
$GLOBALS['TL_LANG']['MOD']['eSM_team'] = array('Team','Verwaltung der Teamseite'); |
12 | 12 |
$GLOBALS['TL_LANG']['FMD']['teamlist'] = array('Teamübersicht','Teammitglieder auflisten'); |
13 | 13 |
$GLOBALS['TL_LANG']['FMD']['team'] = 'Team'; |
14 |
+$GLOBALS['TL_LANG']['CTE']['featured'] = 'Featured-Block'; |
... | ... |
@@ -1735,4 +1735,116 @@ $shadow-color: #fff; |
1735 | 1735 |
} |
1736 | 1736 |
} |
1737 | 1737 |
|
1738 |
-} |
|
1739 | 1738 |
\ No newline at end of file |
1739 |
+} |
|
1740 |
+ |
|
1741 |
+ |
|
1742 |
+/****************** |
|
1743 |
+ * Featured Block |
|
1744 |
+ ******************/ |
|
1745 |
+.feature-wrapper { |
|
1746 |
+ |
|
1747 |
+ &.-valign-center { |
|
1748 |
+ min-height: 100vh; |
|
1749 |
+ display: flex; |
|
1750 |
+ flex-direction: column; |
|
1751 |
+ justify-content: flex-start; |
|
1752 |
+ |
|
1753 |
+ .feature-wrapper-boundary { |
|
1754 |
+ width: 100%; |
|
1755 |
+ } |
|
1756 |
+ |
|
1757 |
+ /*> .background-wrapper-helper { |
|
1758 |
+ display: flex; |
|
1759 |
+ align-items: center; |
|
1760 |
+ height: 100%; |
|
1761 |
+ width: 100%; |
|
1762 |
+ |
|
1763 |
+ > .background-wrapper-inner { |
|
1764 |
+ flex: 0 0 auto; |
|
1765 |
+ width: 100%; |
|
1766 |
+ } |
|
1767 |
+ }*/ |
|
1768 |
+ } |
|
1769 |
+ |
|
1770 |
+ .feature-wrapper-boundary { |
|
1771 |
+ @include centered() |
|
1772 |
+ } |
|
1773 |
+ |
|
1774 |
+ .feature-wrapper-cols { |
|
1775 |
+ display: flex; |
|
1776 |
+ align-items: stretch; |
|
1777 |
+ |
|
1778 |
+ .media-col, |
|
1779 |
+ .content-col { |
|
1780 |
+ flex: 0 1 50%; |
|
1781 |
+ } |
|
1782 |
+ } |
|
1783 |
+ |
|
1784 |
+ .media-col-content { |
|
1785 |
+ display: flex; |
|
1786 |
+ flex-direction: column; |
|
1787 |
+ |
|
1788 |
+ > * { |
|
1789 |
+ width: 100%; |
|
1790 |
+ flex: 0 0 auto; |
|
1791 |
+ } |
|
1792 |
+ |
|
1793 |
+ .feature-video, |
|
1794 |
+ .feature-image { |
|
1795 |
+ picture, |
|
1796 |
+ img, |
|
1797 |
+ video { |
|
1798 |
+ /*position: absolute; |
|
1799 |
+ left: 0; |
|
1800 |
+ top: 0; |
|
1801 |
+ right: 0; |
|
1802 |
+ bottom: 0;*/ |
|
1803 |
+ min-height: 50vh; |
|
1804 |
+ max-height: 66.666vh; |
|
1805 |
+ } |
|
1806 |
+ } |
|
1807 |
+ |
|
1808 |
+ .feature-image { |
|
1809 |
+ flex: 1 1 auto; |
|
1810 |
+ } |
|
1811 |
+ |
|
1812 |
+ .feature-video { |
|
1813 |
+ object-fit: cover; |
|
1814 |
+ font-family: 'object-fit: cover'; |
|
1815 |
+ } |
|
1816 |
+ |
|
1817 |
+ .feature-link { |
|
1818 |
+ a { |
|
1819 |
+ font-size: 1.25em; |
|
1820 |
+ text-transform: uppercase; |
|
1821 |
+ font-weight: 700; |
|
1822 |
+ font-family: $font-family-alternate; |
|
1823 |
+ letter-spacing: 0.05em; |
|
1824 |
+ |
|
1825 |
+ &:before { |
|
1826 |
+ content: ''; |
|
1827 |
+ width: .5em; |
|
1828 |
+ height: 1em; |
|
1829 |
+ display: inline-block; |
|
1830 |
+ position: relative; |
|
1831 |
+ background: $color-link; |
|
1832 |
+ background: currentColor; |
|
1833 |
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 62 123' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' xmlns:serif='http://www.serif.com/' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3E%3Cpath d='M60.32,65.45c1.409,-2.509 1.409,-5.581 0,-8.09l-36.13,-54.92c-1.41,-2.31 -5.08,-3.18 -7.05,-1.74l-15,7c-2.22,1.39 -2.78,5.14 -1.37,7.46l30.23,46.24l-29.95,45.67c-1.69,2.6 -0.84,6.36 0.85,7.52l15.24,7.22c2.25,1.45 5.64,0.29 7.05,-1.73l36.13,-54.63Z' style='fill:%23#{str-replace($color-bg-secondary,'#','')};fill-rule:nonzero;'/%3E%3C/svg%3E"); |
|
1834 |
+ mask-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 62 123' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' xmlns:serif='http://www.serif.com/' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3E%3Cpath d='M60.32,65.45c1.409,-2.509 1.409,-5.581 0,-8.09l-36.13,-54.92c-1.41,-2.31 -5.08,-3.18 -7.05,-1.74l-15,7c-2.22,1.39 -2.78,5.14 -1.37,7.46l30.23,46.24l-29.95,45.67c-1.69,2.6 -0.84,6.36 0.85,7.52l15.24,7.22c2.25,1.45 5.64,0.29 7.05,-1.73l36.13,-54.63Z' style='fill:%23#{str-replace($color-bg-secondary,'#','')};fill-rule:nonzero;'/%3E%3C/svg%3E"); |
|
1835 |
+ -webkit-mask-repeat: no-repeat; |
|
1836 |
+ mask-repeat: no-repeat; |
|
1837 |
+ vertical-align: middle; |
|
1838 |
+ margin-right: 10px; |
|
1839 |
+ @include transition(all 0.2s ease); |
|
1840 |
+ } |
|
1841 |
+ |
|
1842 |
+ &:hover { |
|
1843 |
+ &:before { |
|
1844 |
+ background: mix($color-link,#000,80%); |
|
1845 |
+ @include transform(translateX(5px)); |
|
1846 |
+ } |
|
1847 |
+ } |
|
1848 |
+ } |
|
1849 |
+ } |
|
1850 |
+ } |
|
1851 |
+} |
... | ... |
@@ -32,12 +32,20 @@ if (($file = \FilesModel::findByUuid($this->backgroundImage)) !== null) |
32 | 32 |
'options' => [ |
33 | 33 |
'attr' => [ |
34 | 34 |
'class' => 'feature-image', |
35 |
+ ], |
|
36 |
+ 'picture_attr' => [ |
|
35 | 37 |
'style' => "object-fit: $this->backgroundSize;" . |
36 |
- "object-position: $this->backgroundPosition;" . |
|
38 |
+ ($this->backgroundPosition ? "object-position: $this->backgroundPosition;" : "") . |
|
39 |
+ "font-family: 'object-fit: $this->backgroundSize';" |
|
40 |
+ ], |
|
41 |
+ 'img_attr' => [ |
|
42 |
+ 'style' => "object-fit: $this->backgroundSize;" . |
|
43 |
+ ($this->backgroundPosition ? "object-position: $this->backgroundPosition;" : "") . |
|
37 | 44 |
"font-family: 'object-fit: $this->backgroundSize';" |
38 | 45 |
] |
39 | 46 |
] |
40 |
- ] |
|
47 |
+ ], |
|
48 |
+ '@ContaoCore/Image/Studio/figure.html.twig' |
|
41 | 49 |
); |
42 | 50 |
} else |
43 | 51 |
{ |
... | ... |
@@ -49,20 +57,29 @@ if (($file = \FilesModel::findByUuid($this->backgroundImage)) !== null) |
49 | 57 |
|
50 | 58 |
<?php $this->block('content'); ?> |
51 | 59 |
<div class="<?php echo implode(' ', $cssClasses) ?> block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>> |
60 |
+ <div class="feature-wrapper-boundary"> |
|
61 |
+ <div class="feature-wrapper-cols"> |
|
62 |
+ <div class="media-col"> |
|
63 |
+ <?php if ($blnIsVideo && $file !== null): ?> |
|
64 |
+ <div class="media-col-content"> |
|
65 |
+ <div class="feature-video"> |
|
66 |
+ <video autoplay muted loop playsinline> |
|
67 |
+ <source src="<?php echo TL_FILES_URL . $file->path ?>" type="video/<?php echo $file->extension ?>"> |
|
68 |
+ </video> |
|
69 |
+ </div> |
|
70 |
+ </div> |
|
71 |
+ <?php elseif ($figure !== null): ?> |
|
72 |
+ <div class="media-col-content"> |
|
73 |
+ <?= $figure ?> |
|
74 |
+ <?php if ($this->featureLink && $this->linkUrl): ?> |
|
75 |
+ <div class="feature-link"> |
|
76 |
+ <a href="<?= $this->linkUrl ?>"<?php if ($this->linkTitle): ?> title="<?= $this->linkTitle ?>"<?php endif; ?><?php if ($this->newWindow): ?> target="_blank"<?php endif; ?>><?= $this->linkLabel ?></a> |
|
77 |
+ </div> |
|
78 |
+ <?php endif; ?> |
|
79 |
+ </div> |
|
80 |
+ <?php endif ?> |
|
81 |
+ </div> |
|
52 | 82 |
|
53 |
- <div class="photo-wall"> |
|
54 |
- <?php if ($blnIsVideo && $file !== null): ?> |
|
55 |
- <div class="photo-wall-content"> |
|
56 |
- <video class="no-mejs" autoplay loop> |
|
57 |
- <source src="<?php echo TL_FILES_URL . $file->path ?>" type="video/<?php echo $file->extension ?>"> |
|
58 |
- </video> |
|
59 |
- </div> |
|
60 |
- <?php elseif ($figure !== null): ?> |
|
61 |
- <div class="photo-wall-content"> |
|
62 |
- <?= $figure ?> |
|
63 |
- </div> |
|
64 |
- <?php endif ?> |
|
65 |
- </div> |
|
66 |
- |
|
67 |
- <div class="text-wall"><div class="text-wall-content<?php if ($this->padding): ?> <?= $this->padding ?><?php endif; ?>"> |
|
83 |
+ <div class="content-col"> |
|
84 |
+ <div class="content-col-inside<?php if ($this->padding): ?> <?= $this->padding ?><?php endif; ?>"> |
|
68 | 85 |
<?php $this->endblock(); ?> |
... | ... |
@@ -3,6 +3,7 @@ |
3 | 3 |
return array( |
4 | 4 |
'label' => array('Zentrierter Featured-Block Anfang →', 'Erzeugt einen zentrierten Feature-Block (z.B. Weinlinie)'), |
5 | 5 |
'types' => array('content','module'), |
6 |
+ 'contentCategory' => 'featured', |
|
6 | 7 |
'standardFields' => array('cssID', 'space'), |
7 | 8 |
'wrapper' => array( |
8 | 9 |
'type' => 'start', |
... | ... |
@@ -87,7 +88,7 @@ return array( |
87 | 88 |
'linkLabel' => array( |
88 | 89 |
'label' => array('Link-Text', ''), |
89 | 90 |
'inputType' => 'text', |
90 |
- 'eval' => array('tl_class' => 'w50'), |
|
91 |
+ 'eval' => array('tl_class' => 'w50', 'mandatory'=>true), |
|
91 | 92 |
'dependsOn' => array( |
92 | 93 |
'field' => 'featureLink' |
93 | 94 |
) |
... | ... |
@@ -95,7 +96,7 @@ return array( |
95 | 96 |
'linkUrl' => array( |
96 | 97 |
'label' => array('Link-URL', 'Beispiele: {{link_url::seitenalias}} (Alias, ID oder anderer Inserttag), http://example.com'), |
97 | 98 |
'inputType' => 'url', |
98 |
- 'eval' => array('tl_class' => 'w50'), |
|
99 |
+ 'eval' => array('tl_class' => 'w50', 'mandatory'=>true), |
|
99 | 100 |
'dependsOn' => array( |
100 | 101 |
'field' => 'featureLink' |
101 | 102 |
) |
... | ... |
@@ -167,4 +168,4 @@ return array( |
167 | 168 |
'inputType' => 'standardField' |
168 | 169 |
), |
169 | 170 |
), |
170 |
-); |
|
171 | 171 |
\ No newline at end of file |
172 |
+); |
0 | 10 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,11 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+return array( |
|
4 |
+ 'label' => array('Zentrierter Featured-Block Ende ←', 'Erzeugt einen zentrierten Feature-Block (z.B. Weinlinie)'), |
|
5 |
+ 'types' => array('content', 'module'), |
|
6 |
+ 'contentCategory' => 'featured', |
|
7 |
+ 'wrapper' => array( |
|
8 |
+ 'type' => 'stop', |
|
9 |
+ ), |
|
10 |
+ 'fields' => array(), |
|
11 |
+); |