Skip to content

Commit 48432c4

Browse files
committed
Profile -> Calendar: fix event position/color/ size. Fix current date color.
Profile -> Files: add divider, add text capitalize, fix text position;
1 parent f1ceb1d commit 48432c4

File tree

3 files changed

+46
-30
lines changed

3 files changed

+46
-30
lines changed

src/pages/User/Profile/Profile.scss

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@
8989
color: $grey-medium;
9090
}
9191
}
92+
93+
.v-btn.v-date-picker-table__current.v-btn--active {
94+
height: 28px;
95+
width: 28px;
96+
}
97+
98+
.v-date-picker-table__events {
99+
top: -6px;
100+
& > div {
101+
height: 6px;
102+
width: 6px;
103+
}
104+
}
92105
}
93106
.v-date-picker-header__value {
94107
button {
@@ -153,24 +166,9 @@
153166

154167
}
155168
}
156-
.v-image {
157-
position: relative;
158-
p {
159-
position: absolute;
160-
left: 5px;
161-
color: white;
162-
font-weight: 600;
163-
&.folder-title {
164-
font-size: 18px;
165-
bottom: 15px;
166169

167-
}
168-
&.folder-subtitle-1 {
169-
bottom: -5px;
170-
font-size: 13px;
171-
}
172-
}
173-
}
170+
171+
174172
.view-card {
175173
.views-value {
176174
font-size: 1.5rem;
@@ -199,6 +197,23 @@
199197

200198
}
201199
.folder-card {
200+
.v-image {
201+
position: relative;
202+
p {
203+
position: absolute;
204+
left: 8px;
205+
color: white;
206+
font-weight: 600;
207+
&.folder-title {
208+
font-size: 18px;
209+
bottom: 10px;
210+
}
211+
&.folder-subtitle-1 {
212+
bottom: -10px;
213+
font-size: 13px;
214+
}
215+
}
216+
}
202217
.theme--dark.v-tabs > .v-tabs-bar {
203218
background-color: transparent;
204219
.v-tab--active {

src/pages/User/Profile/Profile.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,21 @@
174174
<v-tabs-slider></v-tabs-slider>
175175
<v-tab
176176
v-for="(tab, i) in mock.tabs"
177+
class="text-capitalize font-weight-regular"
177178
:key="i"
178179
:href="'#tab-' + tab.tabName.toLocaleLowerCase()"
179180
>
180181
{{ tab.tabName }}
181182
</v-tab>
183+
182184
<v-tab-item
183185
v-for="(tab, i) in mock.tabs"
184186
:key="i"
185187
:value="'tab-' + tab.tabName.toLocaleLowerCase()"
186-
class="pt-1 pb-0 pb-sm-3 pb-lg-0"
188+
class="pb-0 pb-sm-3 pb-lg-0"
187189
>
188-
<v-row justify-xl="space-around" justify="start" class="d-flex flex-nowrap overflow-x-auto pa-4">
190+
<v-divider></v-divider>
191+
<v-row justify-xl="space-around" justify="start" class="d-flex flex-nowrap overflow-x-auto pa-4 pt-5">
189192
<div
190193
v-for="(img, i) in mock.images"
191194
:key="i">
@@ -195,7 +198,7 @@
195198
class="folder-image mr-3"
196199
>
197200
<p class="folder-title"> {{ img.title }} </p>
198-
<p class="folder-subtitle-1"> {{img.subtitle}} </p>
201+
<p class="folder-subtitle-1 font-weight-medium"> {{img.subtitle}} </p>
199202
</v-img>
200203
</div>
201204
</v-row>
@@ -232,7 +235,6 @@
232235
<v-row no-gutters>
233236
<v-tabs color="secondary">
234237
<v-tabs-slider></v-tabs-slider>
235-
236238
<v-tab
237239
v-for="(tab, i) in mock.taskTabs"
238240
:key="i"
@@ -350,8 +352,8 @@
350352
<v-col>
351353
<v-date-picker
352354
v-model="picker"
353-
:events="arrayEvents"
354-
:event-color="date => date[9] % 2 ? 'primary' : 'warning'"
355+
:events="dateFunctionEvents"
356+
color="primary"
355357
full-width
356358
flat
357359
no-title
@@ -514,16 +516,16 @@ export default {
514516
next () {
515517
this.$refs.calendar.next()
516518
},
519+
dateFunctionEvents (date) {
520+
const [,, day] = date.split('-')
521+
if ([12, 17, 28].includes(parseInt(day, 10))) return true
522+
if ([1, 19, 22].includes(parseInt(day, 10))) return ['primary']
523+
return false
524+
},
517525
},
518526
mounted() {
519527
setTimeout(() => {
520528
this.apexLoading = true
521-
}),
522-
this.arrayEvents = [...Array(6)].map(() => {
523-
const day = Math.floor(Math.random() * 30)
524-
const d = new Date()
525-
d.setDate(day)
526-
return d.toISOString().substr(0, 10)
527529
})
528530
}
529531
}

src/styles/_variables.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ $card-shadow: 0 3px 11px 0 #E8EAFC, 0 3px 3px -2px #B2B2B21A, 0 1px 8px 0 #9A9A9
4848

4949
// Buttons //
5050
$button-shadow: 0px 3px 11px 0px #E8EAFC, 0 3px 3px -2px #B2B2B21A, 0 1px 8px 0 #9A9A9A1A;
51-

0 commit comments

Comments
 (0)