From 3e13ba0eec5b871a3d558d08e8d89669b9870858 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Sun, 13 Nov 2022 18:44:08 +0100
Subject: [PATCH] creeate debug grid

---
 .../sass/_theme/design-system/breadcrumb.sass |  1 +
 layouts/_default/baseof.html                  |  3 ++
 layouts/partials/footer/debug.html            | 50 +++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 layouts/partials/footer/debug.html

diff --git a/assets/sass/_theme/design-system/breadcrumb.sass b/assets/sass/_theme/design-system/breadcrumb.sass
index 346e51cb..dcc743a0 100644
--- a/assets/sass/_theme/design-system/breadcrumb.sass
+++ b/assets/sass/_theme/design-system/breadcrumb.sass
@@ -4,6 +4,7 @@
     flex-wrap: nowrap
     overflow: auto
     display: flex
+    // padding-bottom: $spacing0
     li
         flex-shrink: 0
         white-space: nowrap
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index aec9a4ab..a9abb019 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -24,5 +24,8 @@
     {{- partial "footer/cookie-banner.html" . -}}
     {{- partial "footer/js.html" . -}}
     {{- partial "footer/script.html" . -}}
+    {{- if not hugo.IsProduction -}}
+      {{- partial "footer/debug.html" . -}}
+    {{- end -}}
   </body>
 </html>
diff --git a/layouts/partials/footer/debug.html b/layouts/partials/footer/debug.html
new file mode 100644
index 00000000..3cb7e414
--- /dev/null
+++ b/layouts/partials/footer/debug.html
@@ -0,0 +1,50 @@
+<div class="d-grid">
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+  <div></div>
+</div>
+
+<style>
+  :root {
+    --d-grid-margin: 64px;
+  }
+  .d-grid {
+    bottom: 0;
+    display: none;
+    grid-template-columns: repeat(12, 1fr);
+    pointer-events: none;
+    position: fixed;
+    margin: auto;
+    width: 1920px;
+    max-width: 100%;
+    top: 0;
+    z-index: 9999;
+    padding: 0 var(--d-grid-margin);
+    grid-gap: var(--d-grid-margin);
+  }
+  .d-grid.is-visible {
+    display: grid;
+  }
+  .d-grid > div {
+    background: rgba(0,0,0,0.3);
+    border-left: 1px solid #000;
+    border-right: 1px solid #000;
+  }
+</style>
+
+<script>
+  window.addEventListener('keydown', e => {
+    if (e.ctrlKey && e.key === 'g') {
+      document.querySelector('.d-grid').classList.toggle('is-visible');
+    }
+  });
+</script>
\ No newline at end of file
-- 
GitLab