-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
84 lines (74 loc) · 1.8 KB
/
index.js
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { videoDOM, categoryDOM, isEven } from "./includes/functions.js";
//kod för endast landingpage.
//ARRAYS
//alla videor med titel
let videoInfo = [
{
videoTitle: "How to play Horizon and not die all the time",
},
{
videoTitle: "Meditate like Dobby",
},
{
videoTitle: "Clickers are the new influencers",
},
{
videoTitle: "Clickers are the new influencers",
},
{
videoTitle: "Clickers are the new influencers",
},
{
videoTitle: "Clickers are the new influencers",
},
{
videoTitle: "Clickers are the new influencers",
},
{
videoTitle: "Clickers are the new influencers",
},
{
videoTitle: "Meditate like Voldemort",
},
{
videoTitle: "Azkaban ASMR",
},
{
videoTitle: "How to build a website. pls.",
},
{
videoTitle: "Meditate like Aloy",
},
]
let categories = [
"Hämnd",
"Musik",
"Shiet",
"Spel",
"ASMR",
"Klick"
]
console.log("index.js");
//initialize alla videor på framsidan
for (let index = 0; index < videoInfo.length; index++) {
const element = videoInfo[index];
let link = "";
let checkEvenNum = isEven(index);
//varannan video ska ha en annorlunda länk
if (checkEvenNum === true){
link = "video.php?link=1" + "&title=" + element.videoTitle;
}else {
link = "video.php?link=2" + "&title=" + element.videoTitle;
}
videoDOM(element.videoTitle,
`assets/images/thumbnails/thumb${index}.png`,
`assets/images/userPics/user${index}.png`,
link);
index + 1;
}
//initialize alla kategorier på framsidan
for (let index = 0; index < categories.length; index++) {
const element = categories[index];
categoryDOM(element);
index + 1;
}