-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (21 loc) · 682 Bytes
/
index.js
File metadata and controls
26 lines (21 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function renderCursos(){
let html = "";
for(let key of Object.keys(app.data.curso)){
let path = app.data.curso[key];
html += `
<div class="curso-item" onclick="openCurso('${key}')">
<div name="cap" style="background-image: url(./data/cursos/${key}/banner.png);"></div>
<div>
<h2>${path.name}</h2>
<p>${path.preDesc}</p>
</div>
</div>`;
}
$("div#barCursos").innerHTML = html;
}
app.event.onloadeddata = () => {
renderCursos();
}
function openCurso(name){
window.open(`./p/video/?curso=${name}&ep=${Object.keys(app.data.curso[name].video)[0]}`, "_top");
}