Skip to content

Commit 218ff05

Browse files
added ui,ad and other area js files
1 parent bc4be4b commit 218ff05

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

1991/javascripts/reading.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
className: "Academic Reading: Mastering True/False/Not Given",
4+
youtubeIframe: '<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>'
5+
},
6+
{
7+
className: "Speed Reading Techniques for Section 3",
8+
youtubeIframe: '<iframe width="560" height="315" src="https://www.youtube.com/embed/example2" title="YouTube video player" frameborder="0" allowfullscreen></iframe>'
9+
},
10+
{
11+
className: "Matching Headings: The 'Elimination' Method",
12+
youtubeIframe: '<iframe width="560" height="315" src="https://www.youtube.com/embed/example3" title="YouTube video player" frameborder="0" allowfullscreen></iframe>'
13+
}
14+
]

1991/javascripts/ui.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,40 @@ function renderPlaylist() {
2020
$('#title').text(title);
2121
}
2222

23-
23+
let url;
24+
let tutorials=[];
25+
26+
if(topic=='listening'){
27+
url = 'https://brainandbinary.github.io/1991/javascripts/listening.json';
28+
}
29+
30+
if(topic=='reading'){
31+
url = 'https://brainandbinary.github.io/1991/javascripts/reading.json';
32+
}
33+
34+
if(topic=='writing'){
35+
url = 'https://brainandbinary.github.io/1991/javascripts/writing.json';
36+
}
37+
38+
if(topic=='speaking'){
39+
url = 'https://brainandbinary.github.io/1991/javascripts/speaking.json';
40+
}
41+
42+
if(topic=='basic-speaking'){
43+
url = 'https://brainandbinary.github.io/1991/javascripts/basic-speaking.json';
44+
}
45+
46+
if(topic=='basic-english'){
47+
url = 'https://brainandbinary.github.io/1991/javascripts/basic-english.json';
48+
}
49+
50+
try{
51+
const response = await fetch(url);
52+
// 1. 'data' will be the array [ {className: ...}, {className: ...} ]
53+
tutorials = await response.json();
54+
}catch(e){
55+
console.log(e)
56+
}
2457

2558

2659
const container = document.getElementById('list-wrapper');

0 commit comments

Comments
 (0)