From 5aa51b980ae3ae60675db19afeae87908be778c7 Mon Sep 17 00:00:00 2001 From: BaBrixx Date: Wed, 8 Nov 2023 15:31:16 +0100 Subject: [PATCH] Did some color styling to the navbar --- src/lib/GlobalCssProperties.json | 14 +++- .../styling/ZodSchemas/CSSVariables.ts | 1 + ...opDownBtn.svelte => DropDownButton.svelte} | 4 +- .../components/topBar/DropDownCheckBox.svelte | 4 +- src/lib/components/topBar/TopBar.svelte | 64 +++++++++---------- .../{TopBarBtn.svelte => TopBarButton.svelte} | 22 +++---- src/routes/+page.svelte | 6 +- 7 files changed, 63 insertions(+), 52 deletions(-) rename src/lib/components/topBar/{DropDownBtn.svelte => DropDownButton.svelte} (92%) rename src/lib/components/topBar/{TopBarBtn.svelte => TopBarButton.svelte} (77%) diff --git a/src/lib/GlobalCssProperties.json b/src/lib/GlobalCssProperties.json index 4dd30eed..2e3d1012 100644 --- a/src/lib/GlobalCssProperties.json +++ b/src/lib/GlobalCssProperties.json @@ -2,7 +2,7 @@ "default": { "mediaFeature": "default", "color": { - "--navigationbar-text-color": ["display-p3", 1, 1, 1, 0], + "--navigationbar-text-color": ["display-p3", 1, 1, 1], "--console-scrollbar-thumb-color": [ "display-p3", 0.22745098039, @@ -91,6 +91,12 @@ 0.3362745098, 0.39901960784, 0.43823529411 + ], + "--navigationbar-button-hover-color": [ + "display-p3", + 0.3362745098, + 0.39901960784, + 0.43823529411 ] }, "fontSize": { @@ -177,6 +183,12 @@ 0.13490196078, 0.14666666666, 0.17019607843 + ], + "--navigationbar-button-hover-color": [ + "display-p3", + 0.13490196078, + 0.14666666666, + 0.17019607843 ] } } diff --git a/src/lib/classes/styling/ZodSchemas/CSSVariables.ts b/src/lib/classes/styling/ZodSchemas/CSSVariables.ts index 3faedb2c..896b1953 100644 --- a/src/lib/classes/styling/ZodSchemas/CSSVariables.ts +++ b/src/lib/classes/styling/ZodSchemas/CSSVariables.ts @@ -29,6 +29,7 @@ export const ColorVariables = z "--queries-input-background-color": ColorAttribute, "--canvas-action-color": ColorAttribute, "--console-tab-hover-color": ColorAttribute, + "--navigationbar-button-hover-color": ColorAttribute, }) .strict(); diff --git a/src/lib/components/topBar/DropDownBtn.svelte b/src/lib/components/topBar/DropDownButton.svelte similarity index 92% rename from src/lib/components/topBar/DropDownBtn.svelte rename to src/lib/components/topBar/DropDownButton.svelte index 7cf28320..e31dd168 100644 --- a/src/lib/components/topBar/DropDownBtn.svelte +++ b/src/lib/components/topBar/DropDownButton.svelte @@ -8,13 +8,13 @@ export let color: string = "black"; //Set icon attributes - const iconCtx = { + const iconContext = { strokeWidth: "1.5", size: "15", variation: "filled", color: color, }; - setContext("iconCtx", iconCtx); + setContext("iconContext", iconContext); diff --git a/src/lib/components/topBar/DropDownCheckBox.svelte b/src/lib/components/topBar/DropDownCheckBox.svelte index a8f231e6..ad133e2c 100644 --- a/src/lib/components/topBar/DropDownCheckBox.svelte +++ b/src/lib/components/topBar/DropDownCheckBox.svelte @@ -1,6 +1,6 @@
- - + { console.log("New Project"); }} /> - { console.log("Open Project"); }} /> - { console.log("Recent Projects"); }} /> - { console.log("Save Project"); }} /> - { @@ -67,67 +67,67 @@ }} /> - { console.log("New Test Plan"); }} /> - { console.log("Export as Png"); }} /> - { console.log("Export without border as Png"); }} /> - +
- - + { console.log("Move All Nodes Left"); }} /> - { console.log("Move All Nodes Right"); }} /> - { console.log("Move All Nodes Up"); }} /> - { console.log("Move All Nodes Down"); }} /> - +
- + { @@ -155,25 +155,25 @@ console.log("unchecked Autoscaling"); }} /> - { console.log("Scaling"); }} /> - { console.log("Split canvas"); }} /> - +
- + { @@ -193,41 +193,41 @@ console.log("unchecked Periodic query execution"); }} /> - { console.log("Engine Options"); }} /> - +
- - + { console.log("Modelling Help"); }} /> - { console.log("Testing Help"); }} /> - { console.log("About"); }} /> - +
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2e3c4b6e..ecaca41c 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -140,11 +140,9 @@ } #main-nav { - color: var(--navigationbar-text-color); background-color: var(--main-navigationbar-color); - height: 2.5em; - min-height: 2.5em; - border-bottom: 0.3em solid black; + height: 2em; + border-bottom: 0.2em solid black; } main {