diff --git a/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php b/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php new file mode 100644 index 00000000..5cb092ea --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php @@ -0,0 +1,56 @@ +registerArgument('icon', 'string', 'Icon name'); + $this->registerArgument('class', 'string', 'CSS classes'); + } + + /** + * @param array $arguments + * @param \Closure $renderChildrenClosure + * @param RenderingContextInterface $renderingContext + * @return mixed + */ + public static function renderStatic( + array $arguments, + \Closure $renderChildrenClosure, + RenderingContextInterface $renderingContext + ) + { + $imageService = self::getImageService(); + $sprite = $imageService->getImage('EXT:ep_theme/Resources/Public/images/icons_sprite.svg', null, false); + $imageUrl = $sprite->getPublicUrl(); + + return sprintf( + '', + $arguments['class'], + $imageUrl, + $arguments['icon'] + ); + } + + protected static function getImageService() + { + return GeneralUtility::makeInstance(ImageService::class); + } +} diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Main.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Main.typoscript index a6ebbf7c..27d719b3 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Main.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Main.typoscript @@ -144,6 +144,45 @@ page { settings < plugin.tx_eptheme.settings } + CSS_inlineStyle ( +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 300; + font-display: swap; + src: local(''), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-300.woff2') format('woff2'), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-300.woff') format('woff'); +} +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: local(''), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-regular.woff2') format('woff2'), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-regular.woff') format('woff'); +} +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: local(''), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-700.woff2') format('woff2'), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-700.woff') format('woff'); +} +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 900; + font-display: swap; + src: local(''), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-900.woff2') format('woff2'), + url('/typo3conf/ext/ep_theme/Resources/Public/fonts/lato-v17-latin-900.woff') format('woff'); +} + ) + headerData.998 = TEXT headerData.998.value ( diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript index 60d49d77..aa12dc5e 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript @@ -100,4 +100,5 @@ config { typolinkEnableLinksAcrossDomains = 1 sendCacheHeaders = 1 content_from_pid_allowOutsideDomain = 1 + inlineStyle2TempFile = 0 } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/config.json b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/config.json deleted file mode 100755 index d919c921..00000000 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "", - "css_prefix_text": "icon-", - "css_use_suffix": false, - "hinting": true, - "units_per_em": 1000, - "ascent": 850, - "glyphs": [ - { - "uid": "12f4ece88e46abd864e40b35e05b11cd", - "css": "ok", - "code": 59392, - "src": "fontawesome" - }, - { - "uid": "9f7e588c66cfd6891f6f507cf6f6596b", - "css": "phone", - "code": 59393, - "src": "fontawesome" - }, - { - "uid": "ccc2329632396dc096bb638d4b46fb98", - "css": "mail-alt", - "code": 61664, - "src": "fontawesome" - }, - { - "uid": "43ab845088317bd348dee1d975700c48", - "css": "ok-circled", - "code": 59394, - "src": "fontawesome" - } - ] -} \ No newline at end of file diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/fontello.woff b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/fontello.woff deleted file mode 100755 index b7992628..00000000 Binary files a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/fontello.woff and /dev/null differ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/fontello.woff2 b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/fontello.woff2 deleted file mode 100755 index d6e0fd40..00000000 Binary files a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/fonts/fontello.woff2 and /dev/null differ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_fonts.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_fonts.scss deleted file mode 100644 index 1495f919..00000000 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_fonts.scss +++ /dev/null @@ -1,82 +0,0 @@ -/* lato-300 - latin */ -@font-face { - font-family: 'Lato'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local(''), - url('../../fonts/lato-v17-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/lato-v17-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -/* lato-regular - latin */ -@font-face { - font-family: 'Lato'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local(''), - url('../../fonts/lato-v17-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/lato-v17-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -/* lato-700 - latin */ -@font-face { - font-family: 'Lato'; - font-style: normal; - font-weight: 700; - font-display: swap; - src: local(''), - url('../../fonts/lato-v17-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/lato-v17-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -/* lato-900 - latin */ -@font-face { - font-family: 'Lato'; - font-style: normal; - font-weight: 900; - font-display: swap; - src: local(''), - url('../../fonts/lato-v17-latin-900.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/lato-v17-latin-900.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -/* Fontello icons */ -@font-face { - font-family: 'fontello'; - font-weight: normal; - font-style: normal; - font-display: swap; - src: local(''), - url('../../fonts/fontello.woff2') format('woff2'), - url('../../fonts/fontello.woff') format('woff'); -} - -[class^="icon-"]:before, [class*=" icon-"]:before { - font-family: "fontello"; - font-style: normal; - font-weight: normal; - speak: never; - - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; - - font-variant: normal; - text-transform: none; - - line-height: 1em; - - margin-left: .2em; - - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-check:before { content: '\e800'; } -.icon-phone:before { content: '\e801'; } -.icon-check-circle:before { content: '\e802'; } -.icon-mail:before { content: '\f0e0'; } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main.scss index e1b8ebe3..8cdb1c0b 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main.scss @@ -6,7 +6,6 @@ body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); } - @import "base/fonts"; @import "base/typography"; @import "base/images"; diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html index c507ea1e..4200f9bc 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html @@ -24,9 +24,7 @@
- - - + {ep:icon(class: 'product-teaser__flag', icon: 'flag-{country.code -> f:format.case(mode: \'lower\')}')} {concept.name} @@ -61,14 +59,14 @@