From 50e9a06e4959b8e14d9eab82aa2974d16269667a Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 28 Jul 2021 12:59:03 +0200 Subject: [PATCH] adding a responsive breakpoints debug flag --- .../public/module/bootstrap/bootstrap.scss | 1 + .../module/bootstrap/custom/_debug.scss | 19 +++++++++++++++++++ .../Resources/views/Layout/_debug.html.twig | 1 + .../Resources/views/layout.html.twig | 3 +++ .../Templating/Entity/PersonRender.php | 2 +- 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss create mode 100644 src/Bundle/ChillMainBundle/Resources/views/Layout/_debug.html.twig diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss index 30182b1f2..19da697bd 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/bootstrap.scss @@ -59,3 +59,4 @@ // CHILL custom @import "custom"; +@import "custom/_debug"; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss new file mode 100644 index 000000000..61d66e53d --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_debug.scss @@ -0,0 +1,19 @@ +body { + position: relative; + div.responsive { + position: fixed; + top: 0; + left: 50%; + background-color: #4a4d50; + color: white; + padding: 0.5em; + z-index: 10000; + + @media (max-width: 576px) { &::after { content: 'XS'; }} + @media (min-width: 576px) { &::after { content: 'SM'; }} + @media (min-width: 768px) { &::after { content: 'MD'; }} + @media (min-width: 992px) { &::after { content: 'LG'; }} + @media (min-width: 1200px) { &::after { content: 'XL'; }} + @media (min-width: 1400px) { &::after { content: 'XXL'; }} + } +} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Layout/_debug.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Layout/_debug.html.twig new file mode 100644 index 000000000..b0d7729cd --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Layout/_debug.html.twig @@ -0,0 +1 @@ +
diff --git a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig index e495eae96..23be470e0 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig @@ -38,6 +38,9 @@ + {# + {{ include('@ChillMain/Layout/_debug.html.twig') }} + #} {{ include('@ChillMain/Layout/_header.html.twig') }} {% block top_banner %}{# diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 1eea36cdf..320d78d7a 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -59,7 +59,7 @@ class PersonRender extends AbstractChillEntityRender 'addInfo' => $options['addInfo'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, ]; - dump($params); + return $this->getDefaultOpeningBox('person') . $this->engine->render('@ChillPerson/Entity/person.html.twig', [