Skip to content

Commit acdd20f

Browse files
committed
timetables
1 parent 9d4c354 commit acdd20f

File tree

8 files changed

+61
-22
lines changed

8 files changed

+61
-22
lines changed

dist/css/app.7f010ccd.css renamed to dist/css/app.48ec9bf6.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/app.1028086c.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/app.e386dbba.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/js/chunk-vendors.11de9951.js renamed to dist/js/chunk-vendors.5ff42ae1.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/precache-manifest.2648c43d06572095380e3924a70b0860.js renamed to dist/precache-manifest.be8b3f17addab052408f46345beb8aa6.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
44
"url": "dist/404.html"
55
},
66
{
7-
"revision": "506b666dd301ae09abab",
8-
"url": "dist/css/app.7f010ccd.css"
7+
"revision": "9c2a8cfc3bca8edb9cf4",
8+
"url": "dist/css/app.48ec9bf6.css"
99
},
1010
{
1111
"revision": "27679e61bfd27e1093f4bf200900b8e7",
@@ -176,16 +176,16 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
176176
"url": "dist/img/ticket-depth.jpg"
177177
},
178178
{
179-
"revision": "0d3486f1885beb4e4c08f52fc7ef0550",
179+
"revision": "5ce1241409e25d6a3237b94c16a662b7",
180180
"url": "dist/index.html"
181181
},
182182
{
183-
"revision": "506b666dd301ae09abab",
184-
"url": "dist/js/app.e386dbba.js"
183+
"revision": "9c2a8cfc3bca8edb9cf4",
184+
"url": "dist/js/app.1028086c.js"
185185
},
186186
{
187-
"revision": "40f670ff1370476acdd5",
188-
"url": "dist/js/chunk-vendors.11de9951.js"
187+
"revision": "c646a1cb7b56537ec5fd",
188+
"url": "dist/js/chunk-vendors.5ff42ae1.js"
189189
},
190190
{
191191
"revision": "ae69c76f0db87375aa82706bd2ce675f",

dist/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
1515

1616
importScripts(
17-
"dist/precache-manifest.2648c43d06572095380e3924a70b0860.js"
17+
"dist/precache-manifest.be8b3f17addab052408f46345beb8aa6.js"
1818
);
1919

2020
workbox.core.setCacheNameDetails({prefix: "robot-framework"});

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
l.pathname.slice(0, -1) + decoded + l.hash
1818
);
1919
}
20-
}(window.location))</script><link href="dist/css/app.7f010ccd.css" rel="preload" as="style"><link href="dist/js/app.e386dbba.js" rel="preload" as="script"><link href="dist/js/chunk-vendors.11de9951.js" rel="preload" as="script"><link href="dist/css/app.7f010ccd.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="dist/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="dist/img/icons/favicon-16x16.png"><link rel="manifest" href="dist/manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="robot-framework"><link rel="apple-touch-icon" href="dist/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="dist/img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="dist/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but robot-framework doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="dist/js/chunk-vendors.11de9951.js"></script><script src="dist/js/app.e386dbba.js"></script></body></html>
20+
}(window.location))</script><link href="dist/css/app.48ec9bf6.css" rel="preload" as="style"><link href="dist/js/app.1028086c.js" rel="preload" as="script"><link href="dist/js/chunk-vendors.5ff42ae1.js" rel="preload" as="script"><link href="dist/css/app.48ec9bf6.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="dist/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="dist/img/icons/favicon-16x16.png"><link rel="manifest" href="dist/manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="robot-framework"><link rel="apple-touch-icon" href="dist/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="dist/img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="dist/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but robot-framework doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="dist/js/chunk-vendors.5ff42ae1.js"></script><script src="dist/js/app.1028086c.js"></script></body></html>

src/views/Home.vue

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,27 @@
44
<h1 class="color-white"><span class="">RBCN</span><span class="color-theme">23</span></h1>
55
</div>
66
</banner>
7-
<news-banner v-if="$t('newsBanner') !== ''">
8-
<div v-html="$t('newsBanner')" />
7+
<news-banner>
8+
<div v-if="currentTalk">
9+
<h3>
10+
Now ({{ format(new Date(currentTalk.slot.start), 'hh.mm') }} - {{ format(new Date(currentTalk.slot.end), 'hh.mm') }})
11+
</h3>
12+
<div v-if="currentTalk">
13+
{{ currentTalk.title || currentTalk.description?.en || '-' }}
14+
{{ format(new Date(currentTalk.slot.start), 'hh.mm') }}
15+
</div>
16+
<h3>
17+
Next ({{ format(new Date(nextTalk.slot.start), 'hh.mm') }} - {{ format(new Date(nextTalk.slot.end), 'hh.mm') }})
18+
</h3>
19+
<div v-if="nextTalk">
20+
{{ nextTalk.title || nextTalk.description?.en || '-' }}
21+
</div>
22+
</div>
23+
<div v-else>
24+
Loading today's schedule...
25+
</div>
926
</news-banner>
10-
<div v-else class="border-top-theme border-thin" />
27+
<!-- <div v-else class="border-top-theme border-thin" /> -->
1128
<div class="container">
1229
<page-section
1330
title-id="intro"
@@ -126,6 +143,7 @@ import {
126143
Talks2023,
127144
NewsBanner
128145
} from 'Components'
146+
import { isThisHour, isToday, subHours, format } from 'date-fns'
129147
130148
export default {
131149
name: 'App',
@@ -188,7 +206,28 @@ export default {
188206
// .then((res) => res.json())
189207
// fetch('https://pretalx.com/api/events/robocon-2023/schedules/latest/')
190208
},
209+
computed: {
210+
currentTalk() {
211+
const talk = this.talks.find(({ slot = {} }) => slot.start && isThisHour(subHours(new Date(slot.start), 0)))
212+
if (talk) return talk
213+
return null
214+
},
215+
nextTalk() {
216+
const talksSorted = this.talks
217+
.filter(({ slot = {} }) => slot.start && slot.end)
218+
.filter(({ slot = {} }) => isToday(new Date(slot.start)))
219+
.sort((a, b) => {
220+
const dateA = a.slot?.start ? new Date(a.slot.start) : null
221+
const dateB = b.slot?.start ? new Date(b.slot.start) : null
222+
if (dateA && dateB) return dateA < dateB ? -1 : 1
223+
return 0
224+
})
225+
const current = talksSorted.findIndex(({ slot }) => isThisHour(subHours(new Date(slot.start), 0)))
226+
return talksSorted[current + 1]
227+
}
228+
},
191229
methods: {
230+
format,
192231
goTo(id) {
193232
const el = document.getElementById(id)
194233
if (el) {

0 commit comments

Comments
 (0)