diff --git a/website/client/assets/scss/categories.scss b/website/client/assets/scss/categories.scss new file mode 100644 index 0000000000..7317e9ee5e --- /dev/null +++ b/website/client/assets/scss/categories.scss @@ -0,0 +1,39 @@ +.category-box { + padding: 1em; + max-width: 400px; + position: absolute; + top: -480px; + padding: 2em; + border-radius: 2px; + background-color: $white; + box-shadow: 0 2px 2px 0 rgba($black, 0.15), 0 1px 4px 0 rgba($black, 0.1); +} + +.category-label { + min-width: 100px; + border-radius: 100px; + background-color: $gray-600; + padding: .5em; + display: inline-block; + margin-right: .5em; + font-size: 12px; + font-weight: 500; + line-height: 1.33; + text-align: center; + color: $gray-300; +} + +.category-select { + border-radius: 2px; + background-color: $white; + box-shadow: 0 2px 2px 0 rgba($black, 0.16), 0 1px 4px 0 rgba($black, 0.12); + padding: 1em; +} + +.category-select:hover { + cursor: pointer; +} + +.category-wrap { + margin-top: .5em; +} diff --git a/website/client/assets/scss/icon.scss b/website/client/assets/scss/icon.scss index 0686d9e2e5..21a7e7686d 100644 --- a/website/client/assets/scss/icon.scss +++ b/website/client/assets/scss/icon.scss @@ -1,13 +1,15 @@ .svg-icon { - display: inline-block; - width: 1em; - height: 1em; + display: block; stroke-width: 0; stroke: currentColor; fill: currentColor; transition: none !important; -} -.svg-icon * { - transition: none !important; + svg { + display: block; + } + + * { + transition: none !important; + } } \ No newline at end of file diff --git a/website/client/assets/scss/index.scss b/website/client/assets/scss/index.scss index e1b9ce5731..acd5b2a8ec 100644 --- a/website/client/assets/scss/index.scss +++ b/website/client/assets/scss/index.scss @@ -21,4 +21,6 @@ @import './item'; @import './stats'; @import './icon'; +@import './task'; +@import './categories'; @import './dragdrop'; diff --git a/website/client/assets/scss/page.scss b/website/client/assets/scss/page.scss index 65ca00f521..a888e6c537 100644 --- a/website/client/assets/scss/page.scss +++ b/website/client/assets/scss/page.scss @@ -3,7 +3,7 @@ html { } html, body { - height: 100%; + height: calc(100% - 56px); // 56px is the menu background: $gray-700; } diff --git a/website/client/assets/scss/task.scss b/website/client/assets/scss/task.scss new file mode 100644 index 0000000000..ee64dc34e8 --- /dev/null +++ b/website/client/assets/scss/task.scss @@ -0,0 +1,86 @@ + .task { + // for editing rewards or when a task is created + &-purple { + background: $purple-300; + } + + &-worst { + background: $maroon-100; + &-control { + background: darken($maroon-100, 12%); + } + } + + &-worse { + background: $red-100; + &-control { + background: darken($red-100, 12%); + } + } + + &-bad { + background: $orange-100; + &-control { + background: darken($orange-100, 12%); + } + } + + &-neutral { + background: $yellow-50; + &-control { + background: darken($yellow-50, 12%); + } + } + + &-good { + background: $green-10; + &-control { + background: darken($green-10, 12%); + } + } + + &-better { + background: $blue-50; + &-control { + background: darken($blue-50, 12%); + } + } + + &-best { + background: $teal-50; + &-control { + background: darken($teal-50, 12%); + } + } + + &-reward { + background: rgba($yellow-500, 0.26); + } + + &-daily-todo-disabled { + background: $gray-500; + + &-control { + background: $gray-400; + color: $gray-200; + } + } + + &-daily-todo-content-disabled { + background: $gray-600; + + * { + color: $gray-300 !important; + } + } + + &-habit-disabled { + background: $gray-700; + color: rgba(0, 0, 0, 0.12); + + &-control { + color: rgba(0, 0, 0, 0.12) !important; + border: 1px solid rgba(0, 0, 0, 0.12); + } + } +} \ No newline at end of file diff --git a/website/client/assets/svg/calendar.svg b/website/client/assets/svg/calendar.svg new file mode 100644 index 0000000000..ba08c072e8 --- /dev/null +++ b/website/client/assets/svg/calendar.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/challenge.svg b/website/client/assets/svg/challenge.svg new file mode 100644 index 0000000000..1610d4bb2e --- /dev/null +++ b/website/client/assets/svg/challenge.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/check.svg b/website/client/assets/svg/check.svg new file mode 100644 index 0000000000..2ae3d23949 --- /dev/null +++ b/website/client/assets/svg/check.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/website/client/assets/svg/daily.svg b/website/client/assets/svg/daily.svg new file mode 100644 index 0000000000..f1e28a1858 --- /dev/null +++ b/website/client/assets/svg/daily.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/habit.svg b/website/client/assets/svg/habit.svg new file mode 100644 index 0000000000..3a433ff31d --- /dev/null +++ b/website/client/assets/svg/habit.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/negative.svg b/website/client/assets/svg/negative.svg new file mode 100644 index 0000000000..ca3e1d2e65 --- /dev/null +++ b/website/client/assets/svg/negative.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/website/client/assets/svg/positive.svg b/website/client/assets/svg/positive.svg new file mode 100644 index 0000000000..2488512400 --- /dev/null +++ b/website/client/assets/svg/positive.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/reward.svg b/website/client/assets/svg/reward.svg new file mode 100644 index 0000000000..52232a2259 --- /dev/null +++ b/website/client/assets/svg/reward.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/streak.svg b/website/client/assets/svg/streak.svg new file mode 100644 index 0000000000..e1314778b2 --- /dev/null +++ b/website/client/assets/svg/streak.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/assets/svg/tags.svg b/website/client/assets/svg/tags.svg new file mode 100644 index 0000000000..c4becad0b6 --- /dev/null +++ b/website/client/assets/svg/tags.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/website/client/assets/svg/todo.svg b/website/client/assets/svg/todo.svg new file mode 100644 index 0000000000..f7a89b4be6 --- /dev/null +++ b/website/client/assets/svg/todo.svg @@ -0,0 +1,3 @@ + diff --git a/website/client/components/guilds/groupFormModal.vue b/website/client/components/guilds/groupFormModal.vue index 48f4871f36..5d434f0e3b 100644 --- a/website/client/components/guilds/groupFormModal.vue +++ b/website/client/components/guilds/groupFormModal.vue @@ -101,31 +101,6 @@ margin-top: 1em; } - .category-box { - padding: 1em; - max-width: 400px; - position: absolute; - top: -480px; - padding: 2em; - border-radius: 2px; - background-color: $white; - box-shadow: 0 2px 2px 0 rgba($black, 0.15), 0 1px 4px 0 rgba($black, 0.1); - } - - .category-label { - min-width: 100px; - border-radius: 100px; - background-color: $gray-600; - padding: .5em; - display: inline-block; - margin-right: .5em; - font-size: 12px; - font-weight: 500; - line-height: 1.33; - text-align: center; - color: $gray-300; - } - .item-with-icon { display: inline-block; @@ -146,21 +121,6 @@ margin-top: 1em; } - .category-select { - border-radius: 2px; - background-color: $white; - box-shadow: 0 2px 2px 0 rgba($black, 0.16), 0 1px 4px 0 rgba($black, 0.12); - padding: 1em; - } - - .category-select:hover { - cursor: pointer; - } - - .category-wrap { - margin-top: .5em; - } - .icon { margin-left: .5em; display: inline-block; diff --git a/website/client/components/guilds/publicGuildItem.vue b/website/client/components/guilds/publicGuildItem.vue index 815fe2948f..40cf650d99 100644 --- a/website/client/components/guilds/publicGuildItem.vue +++ b/website/client/components/guilds/publicGuildItem.vue @@ -35,20 +35,6 @@ box-shadow: 0 2px 2px 0 rgba($black, 0.15), 0 1px 4px 0 rgba($black, 0.1); margin-bottom: 1rem; - .category-label { - min-width: 100px; - border-radius: 100px; - background-color: $gray-600; - padding: .5em; - display: inline-block; - margin-right: .5em; - font-size: 12px; - font-weight: 500; - line-height: 1.33; - text-align: center; - color: $gray-300; - } - .recommend-text { font-size: 12px; font-style: italic; diff --git a/website/client/components/task.vue b/website/client/components/task.vue deleted file mode 100644 index 7256b4ba03..0000000000 --- a/website/client/components/task.vue +++ /dev/null @@ -1,33 +0,0 @@ - -li - ul - li - strong {{task.text}} - li(v-if="task.type === 'habit'") up: {{task.up}}, down: {{task.down}} - li value: {{task.value}} - template(v-if="task.type === 'daily' || task.type === 'todo'") - li completed: {{task.completed}} - li - span checklist - ul - li(v-for="checklist in task.checklist") {{checklist.text}} - template(v-if="task.type === 'daily'") - li streak: {{task.streak}} - li repeat: {{task.repeat}} - li(v-if="task.type === 'todo'") due date: {{task.date}} - li attribute {{task.attribute}} - li difficulty {{task.priority}} - li tags {{getTagsFor(task)}} - - - \ No newline at end of file diff --git a/website/client/components/tasks/column.vue b/website/client/components/tasks/column.vue new file mode 100644 index 0000000000..c4360c47de --- /dev/null +++ b/website/client/components/tasks/column.vue @@ -0,0 +1,194 @@ + +.tasks-column + .d-flex + h2.tasks-column-title(v-once) {{ $t(types[type].label) }} + .filters.d-flex.justify-content-end + .filter.small-text( + v-for="filter in types[type].filters", + :class="{active: activeFilter.label === filter.label}", + @click="activeFilter = filter", + ) {{ $t(filter.label) }} + .tasks-list + task(v-for="task in tasks[`${type}s`]", :key="task.id", :task="task", v-if="activeFilter.filter(task)") + .bottom-gradient + .column-background(v-if="isUser === true", :class="{'initial-description': tasks[`${type}s`].length === 0}") + .svg-icon(v-html="icons[type]", :class="`icon-${type}`", v-once) + h3(v-once) {{$t('theseAreYourTasks', {taskType: `${type}s`})}} + .small-text {{$t(`${type}sDesc`)}} + + + + + diff --git a/website/client/components/tasks/task.vue b/website/client/components/tasks/task.vue new file mode 100644 index 0000000000..84e5c58efb --- /dev/null +++ b/website/client/components/tasks/task.vue @@ -0,0 +1,293 @@ + +.task.d-flex + // Habits left side control + .left-control.d-flex.align-items-center.justify-content-center(v-if="task.type === 'habit'", :class="controlClass.up") + .task-control.habit-control(:class="controlClass.up + '-control'") + .svg-icon.positive(v-html="icons.positive") + // Dailies and todos left side control + .left-control.d-flex.align-items-center.justify-content-center(v-if="task.type === 'daily' || task.type === 'todo'", :class="controlClass") + .task-control.daily-todo-control(:class="controlClass + '-control'") + .svg-icon.check(v-html="icons.check", v-if="task.completed") + // Task title, description and icons + .task-content(:class="contentClass") + h3.task-title(:class="{ 'has-notes': task.notes }") {{task.text}} + .task-notes.small-text {{task.notes}} + .icons.small-text.d-flex.align-items-center + .d-flex.align-items-center(v-if="task.type === 'todo' && task.date", :class="{'due-overdue': isDueOverdue}") + .svg-icon.calendar(v-html="icons.calendar") + span {{dueIn}} + .icons-right.d-flex.justify-content-end + .d-flex.align-items-center(v-if="showStreak") + .svg-icon.streak(v-html="icons.streak") + span(v-if="task.type === 'daily'") {{task.streak}} + span(v-if="task.type === 'habit'") + span.m-0(v-if="task.up") +{{task.counterUp}} + span.m-0(v-if="task.up && task.down") | + span.m-0(v-if="task.down") -{{task.counterDown}} + .d-flex.align-items-center(v-if="task.challenge && task.challenge.id") + .svg-icon.challenge(v-html="icons.challenge") + b-popover.tags-popover.no-span-margin( + :triggers="['hover']", + :placement="'bottom'", + :popover-style="{'max-width': '1000px'}", + ) + .d-flex.align-items-center(slot="content") + .tags-popover-title(v-once) {{ `${$t('tags')}:` }} + .tag-label(v-for="tag in getTagsFor(task)") {{tag}} + .d-flex.align-items-center(v-if="task.tags && task.tags.length > 0") + .svg-icon.tags(v-html="icons.tags") + + // Habits right side control + .right-control.d-flex.align-items-center.justify-content-center(v-if="task.type === 'habit'", :class="controlClass.down") + .task-control.habit-control(:class="controlClass.down + '-control'") + .svg-icon.negative(v-html="icons.negative") + // Rewards right side control + .right-control.d-flex.align-items-center.justify-content-center.reward-control(v-if="task.type === 'reward'", :class="controlClass") + .svg-icon(v-html="icons.gold") + .small-text {{task.value}} + + + + + + + \ No newline at end of file diff --git a/website/client/components/tasks/user.vue b/website/client/components/tasks/user.vue new file mode 100644 index 0000000000..41535f70a2 --- /dev/null +++ b/website/client/components/tasks/user.vue @@ -0,0 +1,56 @@ + +.row.user-tasks-page + .col-12 + .row.tasks-navigation + .col-4.offset-4 + input.form-control.input-search(type="text", :placeholder="$t('search')") + .col-1.offset-3 + button.btn.btn-success(v-once) + .svg-icon.positive(v-html="icons.positive") + | {{ $t('create') }} + .row.tasks-columns + task-column.col-3(v-for="column in columns", :type="column", :key="column", :isUser="true") + + + + + diff --git a/website/client/components/userTasks.vue b/website/client/components/userTasks.vue deleted file mode 100644 index 3a46db218e..0000000000 --- a/website/client/components/userTasks.vue +++ /dev/null @@ -1,163 +0,0 @@ - -.row - .col-12 - .row - .col-3.p-4 - h3 Input - input.form-control(type="text", placeholder="Placeholder") - .col-3.p-4 - h3 Input Disabled - input.form-control(type="text", placeholder="Placeholder", disabled) - .col-3.p-4 - h3 Input With Icon - input.form-control.input-search(type="text", placeholder="Placeholder") - .col-3.p-4 - h3 Input With Icon Disabled - input.form-control.input-search(type="text", placeholder="Placeholder", disabled) - .col-3.p-4 - h3 Input Valid - input.form-control.input-valid(type="text", placeholder="Placeholder") - .col-3.p-4 - h3 Input Invalid - input.form-control.input-invalid(type="text", placeholder="Placeholder") - .row - .col-6.p-4 - h3 Textarea - textarea.form-control(rows="5", cols="50") - .col-6.p-4 - h3 Textarea Disabled - textarea.form-control(disabled, rows="10", cols="50") - .row - .col-2.p-4 - toggleSwitch(label="Toggle Switch") - .row - .col-3.p-4 - h3 Checkbox - label.custom-control.custom-checkbox - input.custom-control-input(type='checkbox') - span.custom-control-indicator - span.custom-control-description Check this custom checkbox - .col-3.p-4 - h3 Checkbox Disabled Checked - label.custom-control.custom-checkbox - input.custom-control-input(type='checkbox', disabled, checked) - span.custom-control-indicator - span.custom-control-description Check this custom checkbox - .col-3.p-4 - h3 Checkbox Disabled Not Checked - label.custom-control.custom-checkbox - input.custom-control-input(type='checkbox', disabled) - span.custom-control-indicator - span.custom-control-description Check this custom checkbox - .col-6.p-4 - h3 Radio Button - form - label.custom-control.custom-radio - input#radio1.custom-control-input(name='radio', type='radio') - span.custom-control-indicator - span.custom-control-description Toggle this custom radio - label.custom-control.custom-radio - input#radio2.custom-control-input(name='radio', type='radio') - span.custom-control-indicator - span.custom-control-description Toggle this custom radio - .col-3.p-4 - h3 Radio Button Disabled Checked - form - label.custom-control.custom-radio - input#radio3.custom-control-input(name='radio', type='radio', disabled, checked) - span.custom-control-indicator - span.custom-control-description Toggle this custom radio - .col-3.p-4 - h3 Radio Button Disabled Not Checked - form - label.custom-control.custom-radio - input#radio3.custom-control-input(name='radio', type='radio', disabled) - span.custom-control-indicator - span.custom-control-description Toggle this custom radio - .row - .col-3.p-4 - h3 Main Button - button.btn.btn-primary Button - .col-3.p-4 - h3 Secondary Button - button.btn.btn-secondary Button - .col-3.p-4 - h3 Green Button - button.btn.btn-success Button - .col-3.p-4 - h3 Blue Button - button.btn.btn-info Button - .col-3.p-4 - h3 Red Button - button.btn.btn-danger Button - .row - .col-3.p-4 - h3 Main Button Disabled - button.btn.btn-primary(disabled=true) Button - .col-3.p-4 - h3 Secondary Button Disabled - button.btn.btn-secondary(disabled=true) Button - .col-3.p-4 - h3 Green Button Disabled - button.btn.btn-success(disabled=true) Button - .col-3.p-4 - h3 Blue Button Disabled - button.btn.btn-info(disabled=true) Button - .col-3.p-4 - h3 Red Button Disabled - button.btn.btn-danger(disabled=true) Button - .row - .col-6.p-4 - h3 Dropdown Menu - b-dropdown(text="Menu", right=false) - b-dropdown-item(href="#") Menu item 1 - b-dropdown-item(href="#") Menu item 2 - b-dropdown-item(href="#") Menu item 3 - b-dropdown-item(href="#") Menu item 4 - .col-6.p-4 - h3 Dropdown Menu Disabled - b-dropdown(text="Menu", disabled) - b-dropdown-item(href="#") Menu item 1 - b-dropdown-item(href="#") Menu item 2 - b-dropdown-item(href="#") Menu item 3 - b-dropdown-item(href="#") Menu item 4 - .row - .col-6.p-4 - h1 Heading 1 - h2 Heading 2 - h3 Heading 3 - h4 Heading 4 - .col-6.p-4 - p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vehicula, purus sit amet sodales pharetra, ipsum ipsum mollis orci, id pharetra velit diam et dui. Sed placerat ipsum eget pharetra rutrum. Ut vitae rutrum lacus, eu imperdiet velit. Pellentesque eu velit cursus, scelerisque dui quis, dapibus magna. Vestibulum molestie sed sapien et ultricies. Nam porta ipsum leo, non congue magna vestibulum a. Etiam dictum felis sit amet augue varius tincidunt. Sed eget urna auctor, convallis felis in, pretium justo. Curabitur aliquet, ligula id tincidunt ullamcorper, orci lorem pharetra neque, in ornare arcu magna accumsan arcu. Maecenas dignissim lorem sed eros accumsan scelerisque. - p.small-text Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vehicula, purus sit amet sodales pharetra, ipsum ipsum mollis orci, id pharetra velit diam et dui. - .row - .col(v-for="taskType in tasksTypes") - h3 {{taskType}}s - ul - task(v-for="task in tasks", v-if="task.type === taskType", :key="task.id", :task="task") - - - diff --git a/website/client/index.html b/website/client/index.html index 6eac2d4fda..73f895a0f0 100644 --- a/website/client/index.html +++ b/website/client/index.html @@ -5,7 +5,7 @@