Skip to content

Commit 9c7321a

Browse files
committed
feat(docs): countdown update
1 parent a5c7586 commit 9c7321a

File tree

4 files changed

+89
-70
lines changed

4 files changed

+89
-70
lines changed
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
<template lang="pug">
2-
div.countdown.flex.justify-center
3-
span(v-if="hasEnded").heading.full-width.text-center
4-
span Quasar.Conf was a success!
5-
6-
span(v-else).heading.full-width.text-center
7-
span Quasar.Conf launches in ...
8-
div.flex.justify-center
9-
div.countdown__timer.flex
10-
span.time {{days}}
11-
span.label Days
12-
div.countdown__timer
13-
span.time {{hours}}
14-
span.label Hours
15-
div.countdown__timer
16-
span.time {{minutes}}
17-
span.label Minutes
18-
19-
q-btn.q-my-md(
20-
:color="color",
21-
:text-color="textColor",
22-
type="a",
23-
no-caps,
24-
:href="hasEnded ? 'https://www.youtube.com/watch?v=XfEx5teuY84&feature=youtu.be' : 'https://dev.to/quasar/introducing-quasar-conf-52gg'",
25-
:label="hasEnded ? 'View it on YouTube!' : 'Learn More!'",
2+
q-banner(inline-actions).conf-countdown
3+
template(v-if="!hasEnded" v-slot:action)
4+
q-btn(
5+
type="a"
6+
:href="btn.href"
7+
target="_blank"
8+
:color="color"
9+
:text-color="textColor"
10+
:icon="btn.icon"
11+
:label="btn.label"
12+
no-caps
13+
)
14+
q-btn(
15+
v-else
16+
type="a"
17+
:href="btn.href"
2618
target="_blank"
27-
:icon="hasEnded ? mdiYoutube : void 0"
19+
:color="color"
20+
:text-color="textColor"
21+
:icon="btn.icon"
22+
:label="btn.label"
23+
no-caps
24+
no-wrap
2825
)
26+
27+
.q-gutter-xs(v-if="!hasEnded" :class="paddingClass")
28+
.row.items-center(:class="alignClass")
29+
.text-bold Quasar.Conf
30+
.q-ml-xs launches in...
31+
q-badge.text-bold(v-if="days > 0" :color="color" :text-color="textColor") {{ days }} Days
32+
q-badge.text-bold(v-if="hours > 0" :color="color" :text-color="textColor") {{ hours }} Hours
33+
q-badge.text-bold(:color="color" :text-color="textColor") {{ minutes }} Minutes
2934
</template>
3035

3136
<script>
3237
import { mdiYoutube } from '@quasar/extras/mdi-v5'
3338
34-
const confDate = new Date('July 5, 2020 15:00:00').getTime()
39+
// July 5, 2020 15:00:00 GMT
40+
const confDate = 1593961200000
41+
3542
const oneDay = 1000 * 60 * 60 * 24
3643
const oneHour = 1000 * 60 * 60
3744
const oneMin = 1000 * 60
@@ -40,14 +47,10 @@ export default {
4047
name: 'ConfCountdown',
4148
4249
props: {
43-
color: {
44-
type: String,
45-
default: 'white'
46-
},
47-
textColor: {
48-
type: String,
49-
default: 'primary'
50-
}
50+
color: String,
51+
textColor: String,
52+
alignClass: String,
53+
paddingClass: String
5154
},
5255
5356
data () {
@@ -59,6 +62,21 @@ export default {
5962
}
6063
},
6164
65+
computed: {
66+
btn () {
67+
return this.hasEnded === true
68+
? {
69+
href: 'https://www.youtube.com/watch?v=XfEx5teuY84&feature=youtu.be',
70+
label: 'View Quasar.Conf on YouTube!',
71+
icon: mdiYoutube
72+
}
73+
: {
74+
href: 'https://dev.to/quasar/introducing-quasar-conf-52gg',
75+
label: 'About'
76+
}
77+
}
78+
},
79+
6280
mounted () {
6381
this.interval = setInterval(() => this.calcTimeRemaining, oneMin)
6482
this.calcTimeRemaining()
@@ -87,21 +105,3 @@ export default {
87105
}
88106
}
89107
</script>
90-
91-
<style lang="sass">
92-
.countdown
93-
flex-wrap: wrap
94-
.heading,
95-
.action
96-
font-size: 23px
97-
98-
&__timer
99-
display: flex
100-
flex-wrap: wrap
101-
102-
span
103-
width: 100%
104-
105-
.time
106-
font-size: 42px
107-
</style>

docs/src/layouts/Layout.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ q-layout.doc-layout(view="lHh LpR lff", @scroll="onScroll")
3131
content-class="doc-left-drawer"
3232
)
3333
q-scroll-area(style="height: calc(100% - 50px); margin-top: 50px")
34+
conf-countdown.layout-countdown(
35+
color="primary"
36+
align-class="justify-start"
37+
padding-class="q-py-md"
38+
)
39+
q-separator.q-mb-lg
40+
3441
.row.justify-center.q-my-lg
3542
q-btn(
3643
type="a"
@@ -42,7 +49,6 @@ q-layout.doc-layout(view="lHh LpR lff", @scroll="onScroll")
4249
:icon="mdiHeartOutline"
4350
label="Donate to Quasar"
4451
)
45-
conf-countdown.text-black.q-mt-xl(color="primary", text-color="white")
4652

4753
app-menu.q-my-lg
4854

@@ -460,4 +466,8 @@ export default {
460466
font-size: 18px
461467
.time
462468
font-size: 38px
469+
470+
.layout-countdown
471+
background: linear-gradient(45deg, #e6f1fc 25%, #c3e0ff 25%, #c3e0ff 50%, #e6f1fc 50%, #e6f1fc 75%, #c3e0ff 75%, #c3e0ff)
472+
background-size: 40px 40px
463473
</style>

docs/src/pages/Landing.vue

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,27 @@
44

55
section
66
.landing__hero.flex.flex-center
7-
.relative-position
8-
conf-countdown.text-white.q-mb-xl
9-
hr.countdown
7+
.relative-position.text-center
108
.text-h1
11-
.text-weight-bold Quasar
12-
.landing__hero-row.row.no-wrap.items-baseline
9+
div
10+
span.text-bold Quasar
11+
span.text-subtitle1 v{{ $q.version }}
12+
.landing__hero-row.row.no-wrap.items-baseline.justify-center
1313
span Framew
1414
img.landing__logo(src="https://cdn.quasar.dev/logo/svg/quasar-logo.svg")
1515
span rk
1616
.text-subtitle1.q-pl-sm Build high-performance <strong>VueJS</strong> user interfaces in record time
17+
.q-pt-sm.q-px-sm
18+
conf-countdown.landing-countdown.bg-primary.text-white.rounded-borders(
19+
color="white"
20+
text-color="primary"
21+
align-class="justify-center"
22+
)
1723
.q-pt-md.q-pl-sm
18-
.landing__hero-row.landing__hero-btns.q-gutter-sm.row.items-center
19-
q-btn(color="white", text-color="primary", no-caps, to="/start", label="Get Started")
20-
q-btn(color="white", text-color="primary", no-caps, to="/introduction-to-quasar", label="Why Quasar?")
21-
q-btn(color="white", text-color="primary", no-caps, to="/video-tutorials", label="Video Tutorials")
22-
.text-body2 v{{ $q.version }}
24+
.landing__hero-row.landing__hero-btns.q-gutter-sm.row.items-center.justify-center
25+
q-btn(color="white" text-color="primary" no-caps to="/start" label="Get Started")
26+
q-btn(color="white" text-color="primary" no-caps to="/introduction-to-quasar" label="Why Quasar?")
27+
q-btn(color="white" text-color="primary" no-caps to="/video-tutorials" label="Video Tutorials")
2328
.landing__arrow-down.row.justify-center.absolute
2429
q-icon.landing__arrow-down-icon.q-mt-xl(:name="mdiChevronDown" size="50px")
2530

@@ -325,10 +330,9 @@ export default {
325330
&:hover
326331
color: $grey-4
327332
328-
hr.countdown
329-
background: white
330-
width: 70%
331-
margin: 0 auto 40px
333+
.landing-countdown
334+
border-top: 4px solid darken($primary, 10%)
335+
border-bottom: 4px solid darken($primary, 10%)
332336
333337
@keyframes logo-rotate
334338
100%

ui/src/components/banner/QBanner.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,21 @@ export default Vue.extend({
1919
},
2020

2121
render (h) {
22+
const child = []
2223
const actions = slot(this, 'action')
23-
const child = [
24+
const avatar = slot(this, 'avatar')
25+
26+
avatar !== void 0 && child.push(
2427
h('div', {
2528
staticClass: 'q-banner__avatar col-auto row items-center self-start'
26-
}, slot(this, 'avatar')),
29+
}, avatar)
30+
)
2731

32+
child.push(
2833
h('div', {
2934
staticClass: 'q-banner__content col text-body2'
3035
}, slot(this, 'default'))
31-
]
36+
)
3237

3338
actions !== void 0 && child.push(
3439
h('div', {

0 commit comments

Comments
 (0)