Skip to content

Commit 0987988

Browse files
committed
links to talks
1 parent 572d286 commit 0987988

File tree

8 files changed

+32
-28
lines changed

8 files changed

+32
-28
lines changed

dist/css/app.8b0d0391.css renamed to dist/css/app.50e533fa.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.0b0ef243.js

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

dist/js/app.f035c7e7.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/chunk-vendors.5ff42ae1.js renamed to dist/js/chunk-vendors.c5ab8b28.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.c0c5dcc173fc0992eda41a22c2108f8d.js renamed to dist/precache-manifest.30f6fe5b46624d03a566305cbb882f36.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": "71633edc7fc2a38736b6",
8-
"url": "dist/css/app.8b0d0391.css"
7+
"revision": "018c8e7df337e72ed5e1",
8+
"url": "dist/css/app.50e533fa.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": "99dff106395fd0b4b0148d0bcbff12a1",
179+
"revision": "9329403c7e76e363d09167b2f51007a0",
180180
"url": "dist/index.html"
181181
},
182182
{
183-
"revision": "71633edc7fc2a38736b6",
184-
"url": "dist/js/app.0b0ef243.js"
183+
"revision": "018c8e7df337e72ed5e1",
184+
"url": "dist/js/app.f035c7e7.js"
185185
},
186186
{
187-
"revision": "c646a1cb7b56537ec5fd",
188-
"url": "dist/js/chunk-vendors.5ff42ae1.js"
187+
"revision": "cddc46ff89796b51188e",
188+
"url": "dist/js/chunk-vendors.c5ab8b28.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.c0c5dcc173fc0992eda41a22c2108f8d.js"
17+
"dist/precache-manifest.30f6fe5b46624d03a566305cbb882f36.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.8b0d0391.css" rel="preload" as="style"><link href="dist/js/app.0b0ef243.js" rel="preload" as="script"><link href="dist/js/chunk-vendors.5ff42ae1.js" rel="preload" as="script"><link href="dist/css/app.8b0d0391.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.0b0ef243.js"></script></body></html>
20+
}(window.location))</script><link href="dist/css/app.50e533fa.css" rel="preload" as="style"><link href="dist/js/app.f035c7e7.js" rel="preload" as="script"><link href="dist/js/chunk-vendors.c5ab8b28.js" rel="preload" as="script"><link href="dist/css/app.50e533fa.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.c5ab8b28.js"></script><script src="dist/js/app.f035c7e7.js"></script></body></html>

src/views/Home.vue

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
</banner>
77
<news-banner>
88
<div v-if="currentTalk">
9-
<h3>
9+
<h3 class="color-white">
1010
Now ({{ format(new Date(currentTalk.slot.start), 'hh.mm') }} - {{ format(new Date(currentTalk.slot.end), 'hh.mm') }})
1111
</h3>
12-
<div>
12+
<a :href="`/#${getSlug(currentTalk.title)}`">
1313
{{ currentTalk.title || currentTalk.description?.en || '-' }}
14-
</div>
14+
</a>
1515
<div v-if="nextTalk" class="mt-small">
16-
<h3>
16+
<h3 class="color-white">
1717
Next ({{ format(new Date(nextTalk.slot.start), 'hh.mm') }} - {{ format(new Date(nextTalk.slot.end), 'hh.mm') }})
1818
</h3>
19-
<div>
19+
<a :href="`/#${getSlug(nextTalk.title)}`">
2020
{{ nextTalk.title || nextTalk.description?.en || '-' }}
21-
</div>
21+
</a>
2222
</div>
2323
</div>
2424
<div v-else>
@@ -144,7 +144,7 @@ import {
144144
Talks2023,
145145
NewsBanner
146146
} from 'Components'
147-
import { isThisHour, isToday, subHours, format } from 'date-fns'
147+
import { isToday, format, isWithinInterval } from 'date-fns'
148148
149149
export default {
150150
name: 'App',
@@ -209,7 +209,7 @@ export default {
209209
},
210210
computed: {
211211
currentTalk() {
212-
const talk = this.talks.find(({ slot = {} }) => slot.start && isThisHour(subHours(new Date(slot.start), 0)))
212+
const talk = this.talks.find(({ slot = {} }) => slot.start && isWithinInterval(new Date(), { start: new Date(slot.start), end: new Date(slot.end) }))
213213
if (talk) return talk
214214
return null
215215
},
@@ -223,7 +223,7 @@ export default {
223223
if (dateA && dateB) return dateA < dateB ? -1 : 1
224224
return 0
225225
})
226-
const current = talksSorted.findIndex(({ slot }) => isThisHour(subHours(new Date(slot.start), 0)))
226+
const current = talksSorted.findIndex(({ slot }) => isWithinInterval(new Date(), { start: new Date(slot.start), end: new Date(slot.end) }))
227227
return talksSorted[current + 1]
228228
}
229229
},
@@ -236,6 +236,10 @@ export default {
236236
behavior: 'smooth'
237237
})
238238
}
239+
},
240+
getSlug(title) {
241+
if (!title) return ''
242+
return title.replace(/[ ]/g, '-').replace(/[^a-zA-Z0-9-]/g, '').toLowerCase()
239243
}
240244
}
241245
}

0 commit comments

Comments
 (0)