Просмотр исходного кода

:art: altering some styles to start making this look nice

tags/0.0.1
J 4 лет назад
Родитель
Сommit
1cc689b08b

+ 22
- 5
frontend/src/App.vue Просмотреть файл

76
 <style lang="postcss">
76
 <style lang="postcss">
77
 @import './sss/theme.sss'
77
 @import './sss/theme.sss'
78
 
78
 
79
-html
80
-    background-color: #e90d77
81
-
82
 #app
79
 #app
83
     display: flex
80
     display: flex
84
     flex-direction: row
81
     flex-direction: row
85
     text-align: center
82
     text-align: center
86
-    color: $light
83
+    color: $primary
87
     font-family: $sans
84
     font-family: $sans
88
-    background-color: $secondary
85
+    background-color: $dark
89
     overflow-x: hidden
86
     overflow-x: hidden
90
     height: 100%
87
     height: 100%
91
     > main
88
     > main
92
         position: relative
89
         position: relative
93
         height: 100%
90
         height: 100%
91
+        > header
92
+            h2
93
+                font-size: $ms-1
94
         > article
94
         > article
95
             height: 100%
95
             height: 100%
96
             width: 100%
96
             width: 100%
97
             flex-direction: column
97
             flex-direction: column
98
+    
99
+    button
100
+        padding: $ms-0
101
+        background-color: $primary
102
+        border: 1px transparent solid
103
+        border-radius: $ms-1
104
+        transition: $transition
105
+        &:hover
106
+            background-color: $secondary
107
+            border: 1px transparent solid
108
+            border-radius: $ms-1
109
+            cursor: pointer
110
+            color: $primary
111
+        &:disabled
112
+            cursor: default
113
+            color: $primary
114
+            background-color: $light
98
 </style>
115
 </style>

+ 1
- 1
frontend/src/components/MainNav.vue Просмотреть файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-nav#main-header.w-full.f-row.around.p-2
2
+nav#main-header.w-full.z-top.f-row.around.p-2
3
     button(@click="$emit('show-sidebar')") toggle sidebar
3
     button(@click="$emit('show-sidebar')") toggle sidebar
4
     router-link.header__icon.mobile--only(:to="`/matches`") matches
4
     router-link.header__icon.mobile--only(:to="`/matches`") matches
5
     router-link.header__icon(to='/') home
5
     router-link.header__icon(to='/') home

+ 2
- 1
frontend/src/components/SideBar.vue Просмотреть файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-aside.sidebar.p-1.f-col
2
+aside.sidebar.p-1.f-col.z-top
3
     .temp-control-box.f-row.start.center
3
     .temp-control-box.f-row.start.center
4
         input(v-model="switchToPID")
4
         input(v-model="switchToPID")
5
         button(@click="$emit('updatePid', switchToPID)").t-up.p-0 switch profile
5
         button(@click="$emit('updatePid', switchToPID)").t-up.p-0 switch profile
44
 aside.sidebar
44
 aside.sidebar
45
     background-color: yellow
45
     background-color: yellow
46
     height: 100vh
46
     height: 100vh
47
+    position: fixed
47
     h3
48
     h3
48
         padding: 2vh
49
         padding: 2vh
49
 
50
 

+ 2
- 2
frontend/src/sss/_variables.sss Просмотреть файл

22
 /**
22
 /**
23
   * Modular Scale
23
   * Modular Scale
24
   */
24
   */
25
-$base: 0.5em
25
+$base: 0.7em
26
 $scale: $golden
26
 $scale: $golden
27
 
27
 
28
 $ms-0: calc($base)
28
 $ms-0: calc($base)
39
 /**
39
 /**
40
   * Color Scale
40
   * Color Scale
41
   */
41
   */
42
-$cbase: 0.5
42
+$cbase: 0.3
43
 $cs-0: calc($cbase)
43
 $cs-0: calc($cbase)
44
 $cs-1: calc($cs-0 * $scale)
44
 $cs-1: calc($cs-0 * $scale)
45
 $cs-2: calc($cs-1 * $scale)
45
 $cs-2: calc($cs-1 * $scale)

+ 10
- 10
frontend/src/sss/theme.sss Просмотреть файл

1
 @import './_variables.sss'
1
 @import './_variables.sss'
2
 
2
 
3
 /**
3
 /**
4
-  * Colors
5
-*/
6
-$hue: 200
7
-$bg: calc($hue * $cs-1)
8
-$bright: 50%
4
+ * Colors
5
+ */
6
+$hue: 50
7
+$bg: calc($hue * $cs-5)
8
+$bright: 70%
9
 $opacity: 1
9
 $opacity: 1
10
 
10
 
11
-$primary: hsla($hue, 20%, calc($bright * $cs-1), $opacity)
12
-$secondary: hsla($bg, 20%, calc($bright * $cs-1), $opacity)
13
-$hilite: hsla($hue, 50%, calc($bright * $cs-0), $opacity)
11
+$primary: hsla($hue, 80%, calc($bright * $cs-5), $opacity)
12
+$secondary: hsla($bg, 20%, calc($bright * $cs-0), $opacity)
13
+$hilite: hsla($hue, 80%, calc($bright * $cs-0), $opacity)
14
 
14
 
15
-$light: hsla(255, 50%, calc($bright * $cs-0), $opacity)
16
-$dark: hsla(001, 50%, calc($bright * $cs-0), $opacity)
15
+$light: hsla(100, 100%, calc($bright * $cs-0), $opacity)
16
+$dark: hsla(001, 0%, 5%, $opacity)

+ 11
- 52
frontend/src/views/SurveyView.vue Просмотреть файл

2
 main.view--survey.f-col.start.w-full
2
 main.view--survey.f-col.start.w-full
3
     header.w-full.f-col
3
     header.w-full.f-col
4
         p survey for profile: {{ current }}
4
         p survey for profile: {{ current }}
5
-        //- Transition(name="slide-up" :duration="1600")
6
-        //-     h3(v-if="step == 0") hello, what shall i call you?
7
-        //-         span(v-for="letter in name" class="fade") {{ letter }}
8
-
9
-        //-     h3(v-else-if="step == 1") Hi {{ name}}.&nbsp;
10
-        //-         span What can i help you with?
11
-        //-         br
12
-        //-         span I am seeking a 
13
-        //-             span(v-if="!seeking") ___________.
14
-        //-             span(v-else class="fade") {{ seeking }}.
15
-            
16
-        //-     h3(v-else-if="step == 2") Looking for a {{ seeking }} then. 
17
-        //-         span You're in the right place. 
18
-        //-         br
19
-        //-         span How would you like to use siimee? 
20
-        //-         br
21
-        //-         span I am 
22
-        //-             span(v-if="!urgency") ___________.
23
-        //-             span(v-else class="fade") {{ urgency }}.
24
-            
25
-        //-     h3(v-else-if="[3, 4, 5, 6].includes(step)")
26
-        //-         span I am a 
27
-        //-         span(v-if="!role && !experience" class="fade") _________ _________
28
-        //-         span(v-else-if="role && !experience" class="fade") _________ {{ role }}
29
-        //-         span(v-else-if="!role && experience" class="fade") {{ experience }} _________
30
-        //-         span(v-else class="fade") {{ experience }} {{ role }}
31
-        //-         span .&nbsp;
32
-        //-         br
33
-        //-         span Looking for a&nbsp;
34
-        //-         span(v-if="!distance && !duration" class="fade") ________ ________&nbsp;
35
-        //-         span(v-else-if="!distance && duration" class="fade") {{ duration }} ________&nbsp;
36
-        //-         span(v-else-if="distance && !duration" class="fade") _________ {{ distance }}&nbsp;
37
-        //-         span(v-else class="fade") {{ duration }} {{ distance }}&nbsp;
38
-        //-         span role.
39
-        
40
-        //-     h3(v-else)
41
-        //-         p My name is {{ name }}.
42
-        //-             span(v-if="pronouns") My pronouns are {{ pronouns }}.
43
-        //-         p I am&nbsp;
44
-        //-             span a {{ experience }}
45
-        //-             span {{ role }}
46
-        //-         p Looking for a {{ duration }},&nbsp;
47
-        //-             span {{ distance }}&nbsp;
48
-        //-             span {{ seeking }}.
49
-        //-         p I am proficient in 
50
-        //-             span(v-for="(lang, i) in language") {{ lang }} &nbsp;
51
-        //-                 span(v-if="i > 1") , 
52
-
53
     article.match.w-full
5
     article.match.w-full
54
         ul.w-full
6
         ul.w-full
55
             template(v-for="(q, i) in profileQuestions" :key="q.response_key_prompt")
7
             template(v-for="(q, i) in profileQuestions" :key="q.response_key_prompt")
61
                         span {{q.response_key_prompt}}? 
13
                         span {{q.response_key_prompt}}? 
62
                         span {{q.response_key_description}} 
14
                         span {{q.response_key_description}} 
63
 
15
 
16
+                        //- Select
64
                         div(v-if="q.responses.length")
17
                         div(v-if="q.responses.length")
65
                             button(
18
                             button(
66
                                 v-for="(res, index) in q.responses"
19
                                 v-for="(res, index) in q.responses"
68
                                 @click="profile[q.response_key_prompt] = res; step++"
21
                                 @click="profile[q.response_key_prompt] = res; step++"
69
                                 :disabled="profile[q.response_key_prompt] == res"
22
                                 :disabled="profile[q.response_key_prompt] == res"
70
                             ).p-0 {{res}}
23
                             ).p-0 {{res}}
24
+                        
25
+                        //- Fill in the blank
71
                         div(v-else-if="q.response_key_category === 'profile'")
26
                         div(v-else-if="q.response_key_category === 'profile'")
72
                             input(v-model="profile[q.response_key_prompt]" @keyup.enter="step++") 
27
                             input(v-model="profile[q.response_key_prompt]" @keyup.enter="step++") 
73
                             label >{{ profile[q.response_key_prompt]}}
28
                             label >{{ profile[q.response_key_prompt]}}
29
+                        
30
+                        //- Questionaire
74
                         div(v-else).f-col
31
                         div(v-else).f-col
75
                             input(type="range" min="-3" max="3" list="ticks" v-model="questionaire[q.response_key_category]").w-full
32
                             input(type="range" min="-3" max="3" list="ticks" v-model="questionaire[q.response_key_category]").w-full
76
                             label {{ questionaireResponses[parseInt(questionaire[q.response_key_category]) + 3] }} 
33
                             label {{ questionaireResponses[parseInt(questionaire[q.response_key_category]) + 3] }} 
78
                         button(:disabled="step == 0" @click="step--") back
35
                         button(:disabled="step == 0" @click="step--") back
79
                         p {{step + 1}} of {{profileQuestions.length}}
36
                         p {{step + 1}} of {{profileQuestions.length}}
80
                         button(@click="step++") next
37
                         button(@click="step++") next
38
+                
39
+            //- Confirmation
81
             li(v-if="step == profileQuestions.length")
40
             li(v-if="step == profileQuestions.length")
82
                 p Does this look correct?
41
                 p Does this look correct?
83
                 h4 {{ profile }}
42
                 h4 {{ profile }}
86
                     button(@click="step--") back
45
                     button(@click="step--") back
87
                     p(@click="step = 0").p-1 start over
46
                     p(@click="step = 0").p-1 start over
88
                     button(@click="$router.push({ name: 'HomeView' })") save
47
                     button(@click="$router.push({ name: 'HomeView' })") save
89
-            
48
+
90
     MainNav(@show-sidebar="$emit('show-sidebar')")
49
     MainNav(@show-sidebar="$emit('show-sidebar')")
91
 </template>
50
 </template>
92
 
51
 
112
         return {
71
         return {
113
             validSurvey: null,
72
             validSurvey: null,
114
             componentMap: stepToComponentMap,
73
             componentMap: stepToComponentMap,
74
+            slideDuration: 1200,
115
             step: 0,
75
             step: 0,
116
             profile: {
76
             profile: {
117
                 name: '',
77
                 name: '',
195
         opacity: 0
155
         opacity: 0
196
 
156
 
197
 .fade
157
 .fade
198
-    animation: fadeIn 300ms ease-in
158
+    animation: fadeIn 1200ms ease-in
199
 
159
 
200
 @keyframes fadeIn
160
 @keyframes fadeIn
201
     0%
161
     0%
238
         padding: 1vh
198
         padding: 1vh
239
     ul
199
     ul
240
         display: flex
200
         display: flex
241
-        /* color: blue */
242
         width: 100%
201
         width: 100%
243
-        li
202
+        > li
244
             flex-direction: column
203
             flex-direction: column
245
             border: 0px solid yellow
204
             border: 0px solid yellow
246
             width: 100%
205
             width: 100%

Загрузка…
Отмена
Сохранить