From aab961011d2b9bfdc094d491c4a6ac65beb61c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Thu, 1 Feb 2024 12:40:55 +0100 Subject: [PATCH] margins & squares --- src/lib/BackgroundCorners.svelte | 48 ++++++++ src/lib/BackgroundGrid.svelte | 170 +++++++++++++++++++++++----- src/lib/TestCard.svelte | 186 +++++++++++++++++-------------- src/routes/+layout.ts | 1 + 4 files changed, 294 insertions(+), 111 deletions(-) create mode 100644 src/lib/BackgroundCorners.svelte create mode 100644 src/routes/+layout.ts diff --git a/src/lib/BackgroundCorners.svelte b/src/lib/BackgroundCorners.svelte new file mode 100644 index 0000000..3bcfe17 --- /dev/null +++ b/src/lib/BackgroundCorners.svelte @@ -0,0 +1,48 @@ + + +
+ {#each [...Array(realCount).keys()] as x} +
+ {#each [...Array(realCount).keys()] as y} +
+ {/each} +
+ {/each} +
+ + \ No newline at end of file diff --git a/src/lib/BackgroundGrid.svelte b/src/lib/BackgroundGrid.svelte index fb5d3b0..00718d4 100644 --- a/src/lib/BackgroundGrid.svelte +++ b/src/lib/BackgroundGrid.svelte @@ -1,39 +1,153 @@ -
- {#each Array.from({length: realCount}) as _} -
- {#each Array.from({length: realCount}) as _} -
- {/each} -
- {/each} +
+
+ {#each [...Array(verticalCount).keys()] as x} +
+ {#each [...Array(horizontalCount).keys()] as y} +
+ {/each} +
+ {/each} +
\ No newline at end of file + .block { + width: 100%; + height: 100%; + background-color: var(--grid-color-light); + + &.edge { + background-color: white; + } + + &.corner { + background-color: var(--corner-color); + } + } + + .row:nth-child(even) .block:nth-child(odd), + .row:nth-child(odd) .block:nth-child(even) { + background-color: var(--grid-color-dark); + + &.edge { + background-color: black; + } + + &.corner { + background-color: var(--corner-color); + } + } + diff --git a/src/lib/TestCard.svelte b/src/lib/TestCard.svelte index e3a7be2..770b110 100644 --- a/src/lib/TestCard.svelte +++ b/src/lib/TestCard.svelte @@ -1,107 +1,127 @@
-
- -
- +
+ +
-
-
-
-
-
-
-
-
-
-
+
+ + +
+
+
+
+
+
+
+
+
\ No newline at end of file + .square { + width: 10vw; + } + + @media (max-width: 600px) { + .sharpness-pattern span { + font-size: 5vw; + } + + .circle, + .square { + width: 20vw; + } + } + diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts new file mode 100644 index 0000000..a3d1578 --- /dev/null +++ b/src/routes/+layout.ts @@ -0,0 +1 @@ +export const ssr = false;