From 3575c90c2775d48970373bcd9b0b39d66e175019 Mon Sep 17 00:00:00 2001 From: Spythere Date: Thu, 9 Feb 2023 18:13:37 +0100 Subject: [PATCH] design --- src/App.vue | 10 ++-- src/components/InputsSection.vue | 20 ++++---- src/components/StockListTab.vue | 73 ++++++++++++++++-------------- src/components/StockSection.vue | 11 ----- src/components/StockThumbnails.vue | 1 + src/styles/global.scss | 5 +- 6 files changed, 55 insertions(+), 65 deletions(-) diff --git a/src/App.vue b/src/App.vue index 47be417..0d63739 100644 --- a/src/App.vue +++ b/src/App.vue @@ -86,6 +86,7 @@ export default defineComponent({ display: flex; flex-direction: column; + align-items: center; } /* APP */ @@ -94,10 +95,7 @@ export default defineComponent({ color: $textColor; font-size: 1em; - padding: 1em; - - display: flex; - justify-content: center; + padding: 1em 0.5em; } /* HEADER SECTION */ @@ -145,14 +143,14 @@ main { display: grid; gap: 1em 3em; - width: 100vw; + width: 100%; max-width: 1300px; min-height: 75vh; grid-template-columns: 1fr 2fr; grid-template-rows: auto 360px minmax(400px, 1fr); - padding: 0 1em; + // padding: 0 1em; margin-bottom: 2em; } diff --git a/src/components/InputsSection.vue b/src/components/InputsSection.vue index 0192489..d1cda42 100644 --- a/src/components/InputsSection.vue +++ b/src/components/InputsSection.vue @@ -175,10 +175,9 @@ export default defineComponent({ }, addOrSwitchVehicle() { - if(!this.store.chosenVehicle) return; + if (!this.store.chosenVehicle) return; - if (this.store.chosenStockListIndex == -1) - this.addVehicle(this.store.chosenVehicle, this.store.chosenCargo); + if (this.store.chosenStockListIndex == -1) this.addVehicle(this.store.chosenVehicle, this.store.chosenCargo); else this.switchVehicles(); }, @@ -224,7 +223,7 @@ export default defineComponent({ .inputs-section { display: flex; - justify-content: space-between; + justify-content: center; grid-row: 2; grid-column: 1; @@ -264,11 +263,12 @@ button.btn--choice { } .input_actions { - display: flex; - flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 0.5em; - button { - margin: 0.5em 0.5em 0 0; + button:nth-child(3) { + grid-column: 1 / 3; } } @@ -285,10 +285,6 @@ button.btn--choice { text-align: center; } - .input_actions { - justify-content: center; - } - .vehicle-types { justify-content: center; } diff --git a/src/components/StockListTab.vue b/src/components/StockListTab.vue index 88539b3..e4c958b 100644 --- a/src/components/StockListTab.vue +++ b/src/components/StockListTab.vue @@ -1,23 +1,8 @@