From ddaac97e546745c3f771103cc6623edc2cfc74e8 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 18 Jul 2022 21:09:25 +0200 Subject: [PATCH] =?UTF-8?q?OrderN:=20wygl=C4=85d=20i=20optymalizacja=20gen?= =?UTF-8?q?erowania=20tekstu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 - src/components/Order.vue | 8 +- src/components/OrderN.vue | 183 ++++++++++++++++++++------------------ src/store/store.ts | 5 +- src/styles/global.scss | 42 +++++++-- src/views/Home.vue | 76 ++++++++++++---- 6 files changed, 194 insertions(+), 124 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2c42aa8..db7119f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,10 +14,6 @@ min-height: 100vh; } -#app_wrapper { - padding: 0.5em; -} - @media screen and (max-width: 500px) { #app { font-size: calc(1vw + 0.5rem); diff --git a/src/components/Order.vue b/src/components/Order.vue index cd5a096..a0c169b 100644 --- a/src/components/Order.vue +++ b/src/components/Order.vue @@ -1,6 +1,6 @@ diff --git a/src/store/store.ts b/src/store/store.ts index a7c631c..1ceb226 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -16,9 +16,9 @@ export const useStore = defineStore('store', { orderN: { header: { - orderNo: '', + orderNo: '1', trainNo: '', - date: '', + date: new Date().toLocaleDateString('pl-PL', { day: '2-digit', month: 'long' }), }, row1: { @@ -115,3 +115,4 @@ export const useStore = defineStore('store', { }, }); + diff --git a/src/styles/global.scss b/src/styles/global.scss index 6526306..4fbade6 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -1,9 +1,35 @@ -$bgCol: #012E40; -$accentCol: #F28705; +$bgCol: #313638; +$accentCol: #0defff; -body, html { - padding: 0; - margin: 0; - min-height: 100vh; - -} \ No newline at end of file +body, +html { + padding: 0; + margin: 0; + min-height: 100vh; +} + +button.g-button { + outline: 2px solid white; + border: none; + background: none; + color: white; + + text-align: center; + + padding: 0.5em; + + font-size: 1em; + + cursor: pointer; + transition: all 150ms ease-in; + font-weight: bold; + + &:hover { + color: $accentCol; + } + + &:focus-visible { + outline: 2px solid $accentCol; + color: $accentCol; + } +} diff --git a/src/views/Home.vue b/src/views/Home.vue index ae973ba..373f78a 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,12 +1,21 @@ @@ -37,26 +46,57 @@ export default defineComponent({ justify-content: center; align-items: center; + flex-wrap: wrap; + + min-height: 100vh; + overflow-x: auto; + + .home_container { + display: flex; + flex-wrap: wrap; + align-items: flex-start; + justify-content: center; + } + + .order_container { + font-size: 0.9rem; + margin-right: 0.5em; + } } -.container { +.message_container { + padding: 0 1em; + width: 500px; + + h3 { + margin: 0; + margin-bottom: 1em; + text-align: center; + } + + button { + margin: 0 0.5em; + font-size: 0.85em; + } +} + +.message_actions { display: flex; - align-items: start; + justify-content: center; + margin-top: 1em; } -.generated-message { - position: sticky; - top: 0; - - padding: 1em 0.5em; +.message_body { + min-height: 250px; text-align: justify; - margin-left: 1em; - width: 450px; - height: auto; - border: 1px solid white; - // user-select: none; + background-color: #fff; + border-radius: 0.5em; + color: black; + padding: 0.5em; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } -