From 81edd0f92b46656d8893966151c62e9f562b6185 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Tue, 3 Dec 2024 23:09:01 +0100 Subject: [PATCH 01/13] add styling for component list --- .../simplycode-component-list.css | 50 +++++++++ .../1-styling/componentCss/style.css | 16 --- www/api/data/generated.html | 105 ++++++++++++------ .../pageTemplates/Base components.html | 12 +- .../pageTemplates/List components.html | 12 +- .../data/pages/pages/pageTemplates/Pages.html | 12 +- www/index.html | 105 ++++++++++++------ 7 files changed, 210 insertions(+), 102 deletions(-) create mode 100644 www/api/data/components/1-styling/componentCss/simplycode-component-list.css diff --git a/www/api/data/components/1-styling/componentCss/simplycode-component-list.css b/www/api/data/components/1-styling/componentCss/simplycode-component-list.css new file mode 100644 index 0000000..fec956d --- /dev/null +++ b/www/api/data/components/1-styling/componentCss/simplycode-component-list.css @@ -0,0 +1,50 @@ +:root { + --simplycode-component-list-spacing-row: calc(0.5 * var(--ds-spacing)); + --simplycode-component-list-spacing-column: calc(0.5 * var(--ds-spacing)); + --simplycode-component-list-min-colwidth: 10rem; + --simplycode-component-list-item-font-size: calc(0.9 * var(--ds-font-size)); + --simplycode-component-list-item-background: var(--ds-grey-90); + --simplycode-component-list-item-background-active: var(--ds-grey-80); + --simplycode-component-list-item-color: inherit; + --simplycode-component-list-item-color-active: inherit; + --simplycode-component-list-item-min-height: 4rem; +} + +.simplycode-component-list { + display: grid; + grid-column-gap: var(--simplycode-component-list-spacing-column); + grid-row-gap: var(--simplycode-component-list-spacing-row); + grid-template-columns: repeat(auto-fit, minmax(var(--simplycode-component-list-min-colwidth), 1fr)); + + font-size: var(--simplycode-component-list-item-font-size); + line-height: 1.6em; + margin-bottom: var(--simplycode-component-list-spacing-column); +} +.simplycode-component-list-item { + background-color: var(--simplycode-component-list-item-background); + padding: calc(0.5 * var(--simplycode-component-list-spacing-column)); + display: flex; + flex-direction: column; + flex: 1 1 0; + min-height: var(--simplycode-component-list-item-min-height); +} + +.simplycode-component-list-item, +a.simplycode-component-list-item, +a.simplycode-component-list-item * { + text-decoration: none; + color: var(--simplycode-component-list-item-color); +} +.simplycode-component-list-item:hover, +a.simplycode-component-list-item:hover, +a.simplycode-component-list-item:active { + background-color: var(--simplycode-component-list-item-background-active); + color: var(--simplycode-component-list-item-color-active); +} + +.simplycode-component-list-item > :first-child { + margin-top: 0; +} +.simplycode-component-list-item > :last-child { + margin-bottom: 0; +} \ No newline at end of file diff --git a/www/api/data/components/1-styling/componentCss/style.css b/www/api/data/components/1-styling/componentCss/style.css index c6265b7..05fa0df 100644 --- a/www/api/data/components/1-styling/componentCss/style.css +++ b/www/api/data/components/1-styling/componentCss/style.css @@ -238,22 +238,6 @@ header .simplycode-controls { margin-top: -1px; } -ul.simplycode-components-list { - list-style: none; - padding: 0; - margin: 0; - display: grid; - grid-template-columns: 1fr 1fr 1fr; - gap: 10px; - margin-bottom: 1em; -} -ul.simplycode-components-list li { - border: 1px solid #555; - background-color: #2a2a2a; - padding: 10px; - border-radius: 2px; -} - /* Components: Toast */ :root { diff --git a/www/api/data/generated.html b/www/api/data/generated.html index cf8ae5f..39b8ce4 100644 --- a/www/api/data/generated.html +++ b/www/api/data/generated.html @@ -515,6 +515,59 @@ border: 0; padding: 5px; } + /* simplycode-box */ + + /* simplycode-component-list */ + :root { + --simplycode-component-list-spacing-row: calc(0.5 * var(--ds-spacing)); + --simplycode-component-list-spacing-column: calc(0.5 * var(--ds-spacing)); + --simplycode-component-list-min-colwidth: 10rem; + --simplycode-component-list-item-font-size: calc(0.9 * var(--ds-font-size)); + --simplycode-component-list-item-background: var(--ds-grey-90); + --simplycode-component-list-item-background-active: var(--ds-grey-80); + --simplycode-component-list-item-color: inherit; + --simplycode-component-list-item-color-active: inherit; + --simplycode-component-list-item-min-height: 4rem; + } + + .simplycode-component-list { + display: grid; + grid-column-gap: var(--simplycode-component-list-spacing-column); + grid-row-gap: var(--simplycode-component-list-spacing-row); + grid-template-columns: repeat(auto-fit, minmax(var(--simplycode-component-list-min-colwidth), 1fr)); + + font-size: var(--simplycode-component-list-item-font-size); + line-height: 1.6em; + margin-bottom: var(--simplycode-component-list-spacing-column); + } + .simplycode-component-list-item { + background-color: var(--simplycode-component-list-item-background); + padding: calc(0.5 * var(--simplycode-component-list-spacing-column)); + display: flex; + flex-direction: column; + flex: 1 1 0; + min-height: var(--simplycode-component-list-item-min-height); + } + + .simplycode-component-list-item, + a.simplycode-component-list-item, + a.simplycode-component-list-item * { + text-decoration: none; + color: var(--simplycode-component-list-item-color); + } + .simplycode-component-list-item:hover, + a.simplycode-component-list-item:hover, + a.simplycode-component-list-item:active { + background-color: var(--simplycode-component-list-item-background-active); + color: var(--simplycode-component-list-item-color-active); + } + + .simplycode-component-list-item > :first-child { + margin-top: 0; + } + .simplycode-component-list-item > :last-child { + margin-bottom: 0; + } /* simplycode-ds-mapping */ /* simplycode-ds-core-colors */ :root { @@ -783,22 +836,6 @@ margin-top: -1px; } - ul.simplycode-components-list { - list-style: none; - padding: 0; - margin: 0; - display: grid; - grid-template-columns: 1fr 1fr 1fr; - gap: 10px; - margin-bottom: 1em; - } - ul.simplycode-components-list li { - border: 1px solid #555; - background-color: #2a2a2a; - padding: 10px; - border-radius: 2px; - } - /* Components: Toast */ :root { @@ -4463,14 +4500,14 @@

Edit base component: