Skip to content

Commit 0d28c5b

Browse files
committed
rbcn banner
1 parent aa7f0d0 commit 0d28c5b

File tree

6 files changed

+89
-8
lines changed

6 files changed

+89
-8
lines changed

src/assets/css/text.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
font-display: swap;
2424
font-weight: 600;
2525
}
26+
@font-face {
27+
font-family: RBCN;
28+
src: url('~Fonts/RBCN23.woff2') format('woff');
29+
}
2630

2731
h1, h2, h3, h4 {
2832
font-family: var(--font-title);

src/assets/fonts/RBCN23.woff2

3.52 KB
Binary file not shown.

src/components/Banner.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<template>
22
<div class="row bg-theme center p-medium">
33
<div>
4-
<h1 class="title">
5-
ROBOT<br>
6-
FRAME<br>
7-
WORK<div style="font-size: 2.5rem; transform: translateY(-.5rem); display: inline-block;">🇺🇦</div>
4+
<h1 class="title color-black">
5+
ROBOT FRAMEWORK
86
</h1>
97
</div>
108
</div>
@@ -17,9 +15,8 @@ export default {
1715
</script>
1816

1917
<style scoped>
20-
21-
.title::first-line {
22-
color: var(--color-white);
18+
.title {
19+
font-size: 2rem;
2320
}
2421
2522
</style>

src/components/RoboconBanner.vue

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<template>
2+
<div class="font-title type-uppercase bg-black color- type-center p-large type-large color-white">
3+
<div class="row center bottom">
4+
<div class=" ml-small col-sm-12">
5+
<div class="timer">
6+
<span class="color-robocon">{{ countdown.days }}</span> days
7+
<span class="color-robocon">{{ countdown.hours }}</span> hrs
8+
<span class="color-robocon">{{ countdown.minutes }}</span> mins
9+
<span class="color-robocon">{{ countdown.seconds }}</span> sec
10+
</div>
11+
<div class="mx-small">
12+
to
13+
</div>
14+
</div>
15+
<div class="col-sm-12">
16+
<div class="line-height-1 title-robocon">
17+
RBCN<span class="color-robocon">23</span>
18+
</div>
19+
<div class="line-height-1 mb-small" style="font-size: 1.5rem;">
20+
ONLINE CONFERENCE
21+
</div>
22+
</div>
23+
</div>
24+
<a class="type-large color-robocon" href="https://robocon.io/">
25+
Get your discounted ticket!
26+
</a>
27+
</div>
28+
</template>
29+
30+
<script>
31+
import { differenceInDays, differenceInHours, differenceInMinutes, differenceInSeconds } from 'date-fns'
32+
export default {
33+
name: 'BannerRobocon',
34+
data: () => ({
35+
timeNow: new Date(),
36+
eventDate: new Date('2023-03-01T09:00Z')
37+
}),
38+
computed: {
39+
countdown() {
40+
return {
41+
days: this.numberToPaddedString(differenceInDays(this.eventDate, this.timeNow)),
42+
hours: this.numberToPaddedString(differenceInHours(this.eventDate, this.timeNow) % 24),
43+
minutes: this.numberToPaddedString(differenceInMinutes(this.eventDate, this.timeNow) % 60),
44+
seconds: this.numberToPaddedString(differenceInSeconds(this.eventDate, this.timeNow) % 60)
45+
}
46+
}
47+
},
48+
mounted() {
49+
setInterval(() => (this.timeNow = new Date()), 1000)
50+
},
51+
methods: {
52+
numberToPaddedString: (number) => `${number}`.length === 2 ? `${number}` : `0${number}`
53+
}
54+
}
55+
</script>
56+
57+
<style scoped>
58+
.color-robocon {
59+
color: #ff9f00;
60+
}
61+
.title-robocon {
62+
font-family: RBCN;
63+
letter-spacing: 0.25rem;
64+
margin-top: -1rem;
65+
font-size: 8rem;
66+
}
67+
@media screen and (max-width: 768px) {
68+
.title-robocon {
69+
font-size: 27vw;
70+
}
71+
.timer {
72+
font-size: 4vw;
73+
}
74+
}
75+
</style>

src/components/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import NewsBanner from './NewsBanner.vue'
22
import Banner from './Banner.vue'
3+
import RoboconBanner from './RoboconBanner.vue'
34
import PageFooter from './PageFooter.vue'
45
import Navbar from './Navbar.vue'
56
import NavbarSubPage from './NavbarSubPage.vue'
@@ -25,6 +26,7 @@ import DocumentIcon from './icons/DocumentIcon.vue'
2526
export {
2627
NewsBanner,
2728
Banner,
29+
RoboconBanner,
2830
PageFooter,
2931
Navbar,
3032
NavbarSubPage,

src/views/Home.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<nav-mobile />
3+
<robocon-banner />
34
<banner />
45
<navbar class="nav-desktop" />
56
<news-banner
@@ -89,7 +90,8 @@ import {
8990
ResourceBox,
9091
TabBox,
9192
Sponsors,
92-
Milestones
93+
Milestones,
94+
RoboconBanner
9395
} from 'Components'
9496
import VideoComponent from 'Components/VideoComponent'
9597
@@ -110,6 +112,7 @@ export default {
110112
TabBox,
111113
Sponsors,
112114
Milestones,
115+
RoboconBanner,
113116
MonacoEditor: defineAsyncComponent(() => import('Components/Editor.vue'))
114117
}
115118
}

0 commit comments

Comments
 (0)