From 97dcf59203382dd2caafe65354cd449d3c2467e5 Mon Sep 17 00:00:00 2001 From: Niklas Droste Date: Wed, 18 Mar 2020 19:09:19 +0100 Subject: [PATCH] Feature: Possibility to add custom css --- Configuration/Settings.yaml | 5 +++++ .../Private/Fusion/Renderers/Renderer.CookieSettings.fusion | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml index ffb7093..3c97dd3 100644 --- a/Configuration/Settings.yaml +++ b/Configuration/Settings.yaml @@ -8,3 +8,8 @@ Neos: routes: KaufmannDigital.GDPR.CookieConsent: position: 'before Neos.Neos' + +KaufmannDigital: + GDPR: + CookieConsent: + customCSSFilepath: null diff --git a/Resources/Private/Fusion/Renderers/Renderer.CookieSettings.fusion b/Resources/Private/Fusion/Renderers/Renderer.CookieSettings.fusion index 8641300..7e67bf9 100644 --- a/Resources/Private/Fusion/Renderers/Renderer.CookieSettings.fusion +++ b/Resources/Private/Fusion/Renderers/Renderer.CookieSettings.fusion @@ -105,7 +105,11 @@ prototype(KaufmannDigital.GDPR.CookieConsent:Content.CookieSettings.Renderer) < css = Neos.Fusion:Tag { tagName = 'style' - content = ${File.readFile('resource://KaufmannDigital.GDPR.CookieConsent/Public/Styles/Main.css')} + content = Neos.Fusion:Array { + packageFile = ${File.readFile('resource://KaufmannDigital.GDPR.CookieConsent/Public/Styles/Main.css')} + customFile = ${File.readFile(Configuration.setting('KaufmannDigital.GDPR.CookieConsent.customCSSFilepath'))} + customFile.@if.condition = ${String.length(Configuration.setting('KaufmannDigital.GDPR.CookieConsent.customCSSFilepath'))} + } } jsVariables = Neos.Fusion:Tag {