Repository navigation
Expand file tree
/
Copy pathmobile.js
More file actions
58 lines (54 loc) · 2.57 KB
/
Copy pathmobile.js
File metadata and controls
58 lines (54 loc) · 2.57 KB
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
var smaller750 = false;
var smaller600 = false;
var smaller450 = false;
function checkMobileChanges() {
if (window.matchMedia("(max-width: 750px)").matches) {
if (!smaller750) {
document.getElementById("mobilechange-slide-docs").innerHTML = "<br>";
document.getElementById("catchphrase").style.display = "none";
document.getElementById("slide-title").classList = "slide-half slide1 centerContent";
}
smaller750 = true;
} else {
if (smaller750) {
document.getElementById("mobilechange-slide-docs").innerHTML = "";
document.getElementById("catchphrase").style.display = "block";
document.getElementById("slide-title").classList = "slide-full slide1 centerContent";
}
smaller750 = false;
};
if (window.matchMedia("(max-width: 600px)").matches) {
if (!smaller600) {
document.getElementById("slide-howto-code").style.fontSize = "2.5vw";
document.getElementById("slide-docs-title").innerHTML = 'More Informations <span id="mobilechange-slide-docs"></span><span class="background-accent">in the docs</span>:';
document.getElementById("mobilechange-slide-docs").innerHTML = "<br>";
}
smaller600 = true;
} else {
if (smaller600) {
document.getElementById("slide-howto-code").style.fontSize = "";
document.getElementById("slide-docs-title").innerHTML = 'With tutorials and <span id="mobilechange-slide-docs"></span>examples <span class="background-accent">in the docs</span>:';
document.getElementById("mobilechange-slide-docs").innerHTML = "";
}
smaller600 = false;
}
if (window.matchMedia("(max-width: 450px)").matches) {
if (!smaller450) {
document.getElementById("slide-platforms").style.display = "none";
document.getElementById("slide-howto").style.display = "none";
document.getElementById("arrows").style.display = "none";
document.getElementById("slide-docs").classList = "slide-half slide4";
}
smaller450 = true;
} else {
if (smaller450) {
document.getElementById("slide-platforms").style.display = "block";
document.getElementById("slide-howto").style.display = "block";
document.getElementById("arrows").style.display = "block";
document.getElementById("slide-docs").classList = "slide-third slide4";
}
smaller450 = false;
}
}
window.addEventListener('resize', checkMobileChanges);
checkMobileChanges();