From 5cf94a5ed6554e44ecb90a862ec0ad6f6a6f33ed Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 27 Oct 2021 09:41:44 +0200 Subject: [PATCH] implementation of blur effect for list of thirdparties --- .../Resources/public/module/blur/blur.scss | 13 ++++++++ .../Resources/public/module/blur/index.js | 2 ++ .../Resources/views/layout.html.twig | 18 +---------- .../views/Entity/thirdparty.html.twig | 31 +++++++++++++++++++ .../views/ThirdParty/index.html.twig | 2 +- .../Templating/Entity/ThirdPartyRender.php | 1 + 6 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss b/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss new file mode 100644 index 000000000..b2d0feb14 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss @@ -0,0 +1,13 @@ +.confidential{ + display: flex; + align-items: center; +} +.toggle{ + margin-left: 10px; + cursor: pointer; +} +.blur { + -webkit-filter: blur(5px); + -moz-filter: blur(5px); + filter: blur(5px); +} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js index 691059f36..6e3b75f2b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js @@ -1,3 +1,5 @@ +require('./blur.scss'); + var toggleBlur = function(e){ var btn = e.target; diff --git a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig index 5f819f7f7..05feb1c0b 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig @@ -12,23 +12,7 @@ {{ encore_entry_link_tags('mod_forkawesome') }} {{ encore_entry_link_tags('mod_ckeditor5') }} {{ encore_entry_link_tags('chill') }} - {% block css%} - - {% endblock %} + {% block css %}{% endblock %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index af71b9643..3ec0d27f2 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -7,6 +7,7 @@ * addEntity bool * addId bool * addInfo bool + * isConfidential bool * hLevel integer * customButtons [ 'before' Twig\Markup, (injected with macro) @@ -84,6 +85,34 @@ {{ ('thirdparty.' ~ thirdparty.kind)|trans }}
+ {% if options['isConfidential'] %} +
+
+ +
+
+ {% else %} + {%- endif -%} +