From 4f3712536ae29a3aa658bd8b2515af6d617145ce Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 15 Apr 2024 18:13:03 +0200 Subject: [PATCH] add structure to random --- assets/css/src/grid.css | 9 +++++++ assets/css/src/html.css | 7 +++++- assets/css/style.css | 1 + assets/dist/style.css | 2 +- site/blueprints/pages/grid.yml | 12 +++++++++ site/snippets/header.php | 2 +- site/snippets/panels.php | 45 ++++++++++++++++++++++++++++------ site/templates/grid.php | 31 +++++++++++++++++++++++ 8 files changed, 98 insertions(+), 11 deletions(-) create mode 100644 assets/css/src/grid.css create mode 100644 site/templates/grid.php diff --git a/assets/css/src/grid.css b/assets/css/src/grid.css new file mode 100644 index 0000000..97db30b --- /dev/null +++ b/assets/css/src/grid.css @@ -0,0 +1,9 @@ +body.full-width #desktop-nav { + height: auto; +} +body.full-width #desktop-nav .empty { + height: calc(var(--unit--vertical) / 2); +} +body.full-width .content { + position: sticky; +} diff --git a/assets/css/src/html.css b/assets/css/src/html.css index aeec0f6..026eacd 100644 --- a/assets/css/src/html.css +++ b/assets/css/src/html.css @@ -61,9 +61,14 @@ html { } @media screen and (min-width: 640px) { - :root { + body { --padding-body: calc(15 * var(--unit--horizontal)); } + + body.full-width { + --padding-body: calc(var(--unit--horizontal) * 7); + } + body, #logo { max-width: calc(22 * var(--unit--horizontal)); diff --git a/assets/css/style.css b/assets/css/style.css index afa4a01..ec56b9c 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -7,6 +7,7 @@ @import url("src/article.css"); @import url("src/virtual.css"); @import url("src/home.css"); +@import url("src/grid.css"); @import url("src/footer.css"); @import url("src/print.css"); :root { diff --git a/assets/dist/style.css b/assets/dist/style.css index ee8585d..f0d91e5 100644 --- a/assets/dist/style.css +++ b/assets/dist/style.css @@ -118,7 +118,7 @@ html { .hidden { display: none; } -.grid { +.background-grid { background-size: var(--unit--horizontal) var(--unit--vertical); background-image: linear-gradient( 90deg, diff --git a/site/blueprints/pages/grid.yml b/site/blueprints/pages/grid.yml index f5bdef5..77e3429 100644 --- a/site/blueprints/pages/grid.yml +++ b/site/blueprints/pages/grid.yml @@ -15,7 +15,19 @@ tabs: label: Corps type: fields fields: + fullWidth: + label: Pleine largeur + type: toggle body: label: Corps type: layout + layouts: + - 1/1 + - 1/2, 1/2 + - 1/3, 1/3, 1/3 + fieldsets: + - text + - image + - line + - quote metaTab: tabs/meta diff --git a/site/snippets/header.php b/site/snippets/header.php index e11d996..9b8fadf 100644 --- a/site/snippets/header.php +++ b/site/snippets/header.php @@ -16,7 +16,7 @@ $entryTopPos = $entryTopPos ?? 20; - +