From 75cf8ef3aa9a3b07a2fc3b287295d3847520c379 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sun, 8 Aug 2021 11:42:56 +0300 Subject: [PATCH] Added a modal window --- src/components/Modal.vue | 94 ++++++++++++++++++++ src/components/TheCategoryBar.vue | 24 +++-- src/scss/_variables.scss | 13 +-- src/scss/style.scss | 15 +++- src/views/Home/Task.vue | 140 ++++++++++++++++++++---------- src/views/Home/TheTaskList.vue | 1 + 6 files changed, 222 insertions(+), 65 deletions(-) create mode 100644 src/components/Modal.vue diff --git a/src/components/Modal.vue b/src/components/Modal.vue new file mode 100644 index 0000000..e83b7ce --- /dev/null +++ b/src/components/Modal.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/components/TheCategoryBar.vue b/src/components/TheCategoryBar.vue index 26fdd77..1420e1b 100644 --- a/src/components/TheCategoryBar.vue +++ b/src/components/TheCategoryBar.vue @@ -5,15 +5,16 @@ v-model="newCategory" placeholder="New category" @keypress.enter="addCategory" - @mouseenter="newCategory=''" + @mouseenter="newCategory = ''" @mouseleave="blurInput" />
{{ category }} @@ -75,7 +76,7 @@ export default { top: 0; left: 0; width: 100%; - border-bottom: 1px solid $light; + //border-bottom: 1px solid $light; height: 48px; background: $dark; display: flex; @@ -89,20 +90,21 @@ export default { padding: 4px 12px; width: 32px; box-sizing: border-box; - transition: width .6s; + transition: width 0.6s; &:hover { - width: 220px + width: 220px; } } .categories { display: flex; margin-left: 32px; + overflow-x: scroll; .category { margin-right: 16px; - border: 3px solid transparent; + border: 3px solid $dark; &.selected { border: 3px double $dark; @@ -110,4 +112,10 @@ export default { } } } + +@media screen and (max-width: $max-width) { + .category-bar { + padding: 0 0 0 8px; + } +} diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index 76e1a2c..9be2836 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -1,12 +1,7 @@ -$dark-blue: #05263B; -$misty-blue: #AEB8C4; -$blue-grotto: #163B50; -$slate: #9CA6B8; - -$dark: $blue-grotto; -$darker: $dark-blue; -$light: $slate; -$lighter: $misty-blue; +$dark: #1f1f1f; +$darker: #121212; +$light: rgb(219, 219, 219); +$lighter: white; $max-width: 1024px; \ No newline at end of file diff --git a/src/scss/style.scss b/src/scss/style.scss index f6616cf..2a2d857 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -4,6 +4,7 @@ font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + font-size: 16px; color: $light; background: $darker; @@ -13,12 +14,24 @@ input, button { border: none; border-radius: 16px; + + &::placeholder { + color: $dark; + opacity: 1; + } } .category { border-radius: 16px; - padding: 4px 12px; + padding: 6px 12px; cursor: pointer; + display: flex; + align-items: center; + justify-content: space-between; color: $darker; + + span { + margin-left: 4px; + } } } \ No newline at end of file diff --git a/src/views/Home/Task.vue b/src/views/Home/Task.vue index 0b6803d..a5ae78e 100644 --- a/src/views/Home/Task.vue +++ b/src/views/Home/Task.vue @@ -1,59 +1,69 @@