From 53e1371cde61876ff9258bfd9700a1d6e2825f87 Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 9 Oct 2022 16:47:36 +0200 Subject: [PATCH 1/9] css: make TitleBox ready for smartphone --- client/src/assets/css/components.scss | 1 + client/src/assets/css/media.scss | 3 +++ client/src/components/TitleBox.vue | 29 +++++++++++++++++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 client/src/assets/css/media.scss diff --git a/client/src/assets/css/components.scss b/client/src/assets/css/components.scss index 5350819..2ada391 100644 --- a/client/src/assets/css/components.scss +++ b/client/src/assets/css/components.scss @@ -1,4 +1,5 @@ @import './colors.scss'; +@import './media.scss'; $font-primary: 'Wendy One'; $font-secondary: 'Dosis'; diff --git a/client/src/assets/css/media.scss b/client/src/assets/css/media.scss new file mode 100644 index 0000000..c0f941c --- /dev/null +++ b/client/src/assets/css/media.scss @@ -0,0 +1,3 @@ +$phone-width: 560px; +$phone-max-width: 767px; +$tablet-width: 768px; diff --git a/client/src/components/TitleBox.vue b/client/src/components/TitleBox.vue index 0ff5738..63b43d9 100644 --- a/client/src/components/TitleBox.vue +++ b/client/src/components/TitleBox.vue @@ -19,7 +19,11 @@ padding: 80px 0; display: flex; justify-content: center; - } + + @media (max-width: $phone-max-width) { + padding: 40px 0; + } +} &__titleborderbox1, &__titleborderbox2, @@ -36,6 +40,11 @@ justify-content: center; align-items: center; z-index: 3; + + @media (max-width: $phone-max-width) { + width: 260px; + height: 140px; + } } &__titleborderbox2 { @@ -44,7 +53,13 @@ width: 720px; height: 120px; z-index: 2; - } + + @media (max-width: $phone-max-width) { + top: 75px; + width: 300px; + height: 80px; + } +} &__titleborderbox3 { position: absolute; @@ -52,6 +67,11 @@ width: 760px; height: 40px; z-index: 1; + + @media (max-width: $phone-max-width) { + top: 95px; + width: 340px; + } } &__title { @@ -59,6 +79,11 @@ font-family: $font-primary; color: $box-primary-text-color; text-align: center; + + @media (max-width: $phone-max-width) { + font-size: 32px; + } } + } From e2d504c8394df2a121fbec7af672d84080e67cda Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 9 Oct 2022 21:29:09 +0200 Subject: [PATCH 2/9] css: make index page ready for smartphone --- client/src/components/TitleBox.vue | 10 +++---- client/src/pages/index.vue | 42 ++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/client/src/components/TitleBox.vue b/client/src/components/TitleBox.vue index 63b43d9..14df46f 100644 --- a/client/src/components/TitleBox.vue +++ b/client/src/components/TitleBox.vue @@ -21,9 +21,9 @@ justify-content: center; @media (max-width: $phone-max-width) { - padding: 40px 0; + padding: 40px 0; } -} + } &__titleborderbox1, &__titleborderbox2, @@ -57,9 +57,9 @@ @media (max-width: $phone-max-width) { top: 75px; width: 300px; - height: 80px; + height: 80px; } -} + } &__titleborderbox3 { position: absolute; @@ -81,7 +81,7 @@ text-align: center; @media (max-width: $phone-max-width) { - font-size: 32px; + font-size: 32px; } } diff --git a/client/src/pages/index.vue b/client/src/pages/index.vue index 9741c07..7366c43 100644 --- a/client/src/pages/index.vue +++ b/client/src/pages/index.vue @@ -6,7 +6,9 @@ -
+
+ {{ $t('or') }} +
@@ -28,6 +30,7 @@ import useI18n from '@/composables/useI18n' const { $t } = useI18n({ 'create-team': { en: 'Create Team ...', de: 'Team erstellen ...' }, + or: { en: 'or', de: 'oder' }, }) const config = useRuntimeConfig() @@ -57,18 +60,53 @@ body { display: flex; width: 100%; height: 120px; + + @media (max-width: $phone-max-width) { + flex-direction: column; + margin: 32px 0 0 0; + } } &__login, &__create-team { width: 320px; align-self: center; + + @media (max-width: $phone-max-width) { + width: auto; + } } &__separator { width: 1px; margin: 0 48px; border-left: $box-primary-border; + + @media (max-width: $phone-max-width) { + position: relative; + width: 300px; + height: 1px; + margin: 48px 0; + border-left: none; + border-bottom: $box-primary-border; + align-self: center; + } + + &-text { + display: none; + + @media (max-width: $phone-max-width) { + display: block; + position: absolute; + top: -10px; + left: 120px; + width: 60px; + background-color: $background-primary-color; + font-size: 18px; + color: $text-primary-color; + text-align: center; + } + } } &__space { @@ -81,7 +119,7 @@ body { bottom: 0; color: #606060; cursor: pointer; - + &:hover { color: #c0c0c0; } From 118dc897ce76a033ff838e132f7071e1f3ccd04d Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 9 Oct 2022 21:36:51 +0200 Subject: [PATCH 3/9] css: disable create team button in smartphone mode --- client/src/pages/index.vue | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/client/src/pages/index.vue b/client/src/pages/index.vue index 7366c43..a0d2a31 100644 --- a/client/src/pages/index.vue +++ b/client/src/pages/index.vue @@ -6,9 +6,7 @@ -
- {{ $t('or') }} -
+
@@ -30,7 +28,6 @@ import useI18n from '@/composables/useI18n' const { $t } = useI18n({ 'create-team': { en: 'Create Team ...', de: 'Team erstellen ...' }, - or: { en: 'or', de: 'oder' }, }) const config = useRuntimeConfig() @@ -62,7 +59,6 @@ body { height: 120px; @media (max-width: $phone-max-width) { - flex-direction: column; margin: 32px 0 0 0; } } @@ -77,35 +73,19 @@ body { } } + &__create-team { + @media (max-width: $phone-max-width) { + display: none; + } + } + &__separator { width: 1px; margin: 0 48px; border-left: $box-primary-border; @media (max-width: $phone-max-width) { - position: relative; - width: 300px; - height: 1px; - margin: 48px 0; - border-left: none; - border-bottom: $box-primary-border; - align-self: center; - } - - &-text { display: none; - - @media (max-width: $phone-max-width) { - display: block; - position: absolute; - top: -10px; - left: 120px; - width: 60px; - background-color: $background-primary-color; - font-size: 18px; - color: $text-primary-color; - text-align: center; - } } } From 75f476c55fc86028c4b27c45b71bb770ca7b78dd Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 9 Oct 2022 23:02:31 +0200 Subject: [PATCH 4/9] css: adapt TopBar and Lobby to smartphone --- client/src/components/Lobby.vue | 10 +++++++++- client/src/components/TopBar.vue | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/client/src/components/Lobby.vue b/client/src/components/Lobby.vue index 54b1543..2ffff95 100644 --- a/client/src/components/Lobby.vue +++ b/client/src/components/Lobby.vue @@ -29,16 +29,24 @@ const { $t } = useI18n({ &__message { flex-grow: 1; - margin: 60px 0 0 200px; + margin: 60px 48px 0 200px; font-family: $font-secondary; font-size: 24px; text-align: center; color: $text-primary-color; + + @media (max-width: $phone-max-width) { + margin: 60px 48px; + } } &__players-list { width: 200px; margin: 16px 16px 0 0; + + @media (max-width: $phone-width) { + display: none; + } } } \ No newline at end of file diff --git a/client/src/components/TopBar.vue b/client/src/components/TopBar.vue index 064a33b..2246570 100644 --- a/client/src/components/TopBar.vue +++ b/client/src/components/TopBar.vue @@ -76,7 +76,13 @@ const actionLogout = async () => { padding: 0 16px; text-align: center; color: $text-primary-color; + } + &__username { + @media (max-width: $phone-width) { + display: none; + } +} &__actionbar { flex-grow: 1; @@ -86,6 +92,12 @@ const actionLogout = async () => { color: $text-primary-color; font-size: 24px; text-align: center; + + @media (max-width: $phone-width) { + margin-left: 24px; + text-align: left; + font-size: 20px; + } } } @@ -94,6 +106,10 @@ const actionLogout = async () => { height: calc(64px - 2 * 16px); margin: 16px 0; background-color: $topbar-separator-color; + + @media (max-width: $phone-width) { + display: none; + } } &__logout-button { @@ -104,6 +120,10 @@ const actionLogout = async () => { &:hover { color: $text-primary-hover-color; } + + @media (max-width: $phone-width) { + padding-right: 0; + } } } \ No newline at end of file From ce31b88acfa85a14d48e8f974d2d2c2f530e6396 Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 9 Oct 2022 23:25:18 +0200 Subject: [PATCH 5/9] css: adapt CollectQuotes, QuoteCard, QuoteCardNew to smartphone --- client/src/components/CollectQuotes.vue | 6 ++++++ client/src/components/QuoteCard.vue | 18 ++++++++++++++++++ client/src/components/QuoteCardNew.vue | 8 +++++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/client/src/components/CollectQuotes.vue b/client/src/components/CollectQuotes.vue index a447c95..fa134c5 100644 --- a/client/src/components/CollectQuotes.vue +++ b/client/src/components/CollectQuotes.vue @@ -38,9 +38,15 @@ const editEnd = () => {