Skip to content

Commit fea3744

Browse files
Video placeholder (#191)
1 parent ecdfb2b commit fea3744

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

src/imgs/video-placeholder.png

403 KB
Loading

src/messages/ui.en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"helpMenu.about": "About",
106106

107107
"homepage.Link": "Home page",
108+
"homepage.introVideo": "introduction video",
108109

109110
"menu.data.helpHeading": "1. Add data",
110111

src/pages/Homepage.svelte

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,10 @@
3131
import LinkOverlay from '../components/LinkOverlay.svelte';
3232
import { Paths, getTitle, navigate } from '../router/paths';
3333
import { gestures } from '../script/stores/Stores';
34-
import CompatibilityWarningDialog from '../components/CompatibilityWarningDialog.svelte';
3534
import StandardDialog from '../components/dialogs/StandardDialog.svelte';
3635
import { clearGestures } from '../script/stores/mlStore';
3736
import { get } from 'svelte/store';
38-
39-
// Avoid youtube cookie. rel=0 should limit related videos to youtube channel.
40-
// Once we have translated videos we can try e.g. cc_lang_pref=fr
41-
// but we'll need to check our codes match theirs.
42-
const introVideoUrl =
43-
// TODO: Replace placeholder youtube video id
44-
'https://www.youtube-nocookie.com/embed/u2u7UJSRuko?rel=0&cc_load_policy=1';
37+
import introVideoPlaceholderImage from '../imgs/video-placeholder.png';
4538
4639
const playgroundSurveyUrl =
4740
'https://stage.microbit.org/teach/playground-survey/exploring-machine-learning';
@@ -86,15 +79,28 @@
8679
<h1 class="sr-only">{$t('content.index.title')}</h1>
8780
<div class="mb-8">
8881
<div class="flex flex-col items-center justify-center m-10 gap-5">
82+
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
83+
<img
84+
src={introVideoPlaceholderImage}
85+
alt="Placeholder image for introduction video"
86+
on:click={() => alert('This is just a placeholder for the final video')}
87+
class="w-38rem h-auto aspect-video"
88+
style="aspect-ratio: 16/9" />
89+
<!-- Once we have the final video URL
90+
Avoid youtube cookie. rel=0 should limit related videos to youtube channel.
91+
Once we have translated videos we can try e.g. cc_lang_pref=fr
92+
but we'll need to check our codes match theirs.
93+
8994
<iframe
9095
class="w-38rem h-auto aspect-video"
9196
style="aspect-ratio: 16/9"
92-
title="introduction video"
93-
src={introVideoUrl}
97+
title={$t('homepage.introVideo')}
98+
src="https://www.youtube-nocookie.com/embed/u2u7UJSRuko?rel=0&cc_load_policy=1"
9499
allow="encrypted-media"
95100
frameBorder="0"
96101
allowFullScreen>
97102
</iframe>
103+
-->
98104
<p>
99105
<HtmlFormattedMessage
100106
id="content.index.toolInfo"

0 commit comments

Comments
 (0)