Skip to content

Commit 1038df4

Browse files
added ui,ad and other area js files
1 parent adcb9b8 commit 1038df4

File tree

8 files changed

+48
-48
lines changed

8 files changed

+48
-48
lines changed

1991/javascripts/ad.js

Whitespace-only changes.

1991/javascripts/basic-english.js

Whitespace-only changes.

1991/javascripts/basic-speaking.js

Whitespace-only changes.

1991/javascripts/listening.js

Whitespace-only changes.

1991/javascripts/reading.js

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,51 +13,3 @@ const tutorials = [
1313
youtubeIframe: '<iframe width="560" height="315" src="https://www.youtube.com/embed/example3" title="YouTube video player" frameborder="0" allowfullscreen></iframe>'
1414
}
1515
];
16-
17-
// 2. The function to render the list
18-
function renderPlaylist() {
19-
const container = document.getElementById('list-wrapper');
20-
21-
// Clear existing content (optional)
22-
container.innerHTML = '';
23-
24-
tutorials.forEach((item, index) => {
25-
// Create the bar element
26-
const bar = document.createElement('div');
27-
bar.className = 'playlist-bar';
28-
bar.style.cssText = `
29-
display: flex;
30-
align-items: center;
31-
padding: 15px;
32-
margin-bottom: 10px;
33-
background-color: #2a2a2a;
34-
color: white;
35-
border-radius: 8px;
36-
cursor: pointer;
37-
transition: background 0.2s;
38-
font-family: sans-serif;
39-
`;
40-
41-
// Inner HTML for the bar (Icon + Title)
42-
bar.innerHTML = `
43-
<span style="margin-right: 15px; opacity: 0.5;">${index + 1}</span>
44-
<span style="flex-grow: 1; font-weight: 500;">${item.className}</span>
45-
<span style="font-size: 0.8em; color: #4CAF50;">▶ Play</span>
46-
`;
47-
48-
// Hover effect
49-
bar.onmouseenter = () => bar.style.backgroundColor = '#383838';
50-
bar.onmouseleave = () => bar.style.backgroundColor = '#2a2a2a';
51-
52-
// Click event to load the video (e.g., into a main player area)
53-
bar.onclick = () => {
54-
console.log(`Loading: ${item.className}`);
55-
// You could append item.youtubeIframe to a #video-display div here
56-
};
57-
58-
container.appendChild(bar);
59-
});
60-
}
61-
62-
// Run the function
63-
document.addEventListener('DOMContentLoaded', renderPlaylist);

1991/javascripts/speaking.js

Whitespace-only changes.

1991/javascripts/ui.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
// 2. The function to render the list
3+
function renderPlaylist() {
4+
const container = document.getElementById('list-wrapper');
5+
6+
// Clear existing content (optional)
7+
container.innerHTML = '';
8+
9+
tutorials.forEach((item, index) => {
10+
// Create the bar element
11+
const bar = document.createElement('div');
12+
bar.className = 'playlist-bar';
13+
bar.style.cssText = `
14+
display: flex;
15+
align-items: center;
16+
padding: 15px;
17+
margin-bottom: 10px;
18+
background-color: #2a2a2a;
19+
color: white;
20+
border-radius: 8px;
21+
cursor: pointer;
22+
transition: background 0.2s;
23+
font-family: sans-serif;
24+
`;
25+
26+
// Inner HTML for the bar (Icon + Title)
27+
bar.innerHTML = `
28+
<span style="margin-right: 15px; opacity: 0.5;">${index + 1}</span>
29+
<span style="flex-grow: 1; font-weight: 500;">${item.className}</span>
30+
<span style="font-size: 0.8em; color: #4CAF50;">▶ Play</span>
31+
`;
32+
33+
// Hover effect
34+
bar.onmouseenter = () => bar.style.backgroundColor = '#383838';
35+
bar.onmouseleave = () => bar.style.backgroundColor = '#2a2a2a';
36+
37+
// Click event to load the video (e.g., into a main player area)
38+
bar.onclick = () => {
39+
console.log(`Loading: ${item.className}`);
40+
// You could append item.youtubeIframe to a #video-display div here
41+
};
42+
43+
container.appendChild(bar);
44+
});
45+
}
46+
47+
// Run the function
48+
document.addEventListener('DOMContentLoaded', renderPlaylist);

1991/javascripts/writing.js

Whitespace-only changes.

0 commit comments

Comments
 (0)