-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomizer.min.js
117 lines (117 loc) · 5.28 KB
/
customizer.min.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
!(function () {
"use strict";
var e = document.getElementById("roundedUI"),
t = document.getElementById("navbarSkin"),
s = document.getElementById("footerSkin"),
n = document.querySelectorAll(".custom-option .custom-control-input"),
o = document.getElementById("main-styles"),
c = document.querySelector(".ms-customizer-backdrop"),
r = "";
function a() {
switch ((i(), this.value)) {
case "#5c77fc":
setTimeout(function () {
o.setAttribute("href", "css/skins/theme-5c77fc" + r + ".min.css");
}, 250);
break;
case "#38b3a2":
setTimeout(function () {
o.setAttribute("href", "css/skins/theme-38b3a2" + r + ".min.css");
}, 250);
break;
case "#7d51cb":
setTimeout(function () {
o.setAttribute("href", "css/skins/theme-7d51cb" + r + ".min.css");
}, 250);
break;
case "#ea4979":
setTimeout(function () {
o.setAttribute("href", "css/skins/theme-ea4979" + r + ".min.css");
}, 250);
break;
case "#f29366":
setTimeout(function () {
o.setAttribute("href", "css/skins/theme-f29366" + r + ".min.css");
}, 250);
}
}
function i() {
c.classList.add("show"),
setTimeout(function () {
c.classList.remove("show");
}, 700);
}
e.addEventListener("change", function () {
return (
i(),
setTimeout(function () {
document.getElementById("color-select").reset(), e.checked ? o.setAttribute("href", "css/skins/theme-5c77fc-rounded.min.css") : o.setAttribute("href", "css/theme.min.css");
}, 300),
(r = e.checked ? "-rounded" : "")
);
}),
t.addEventListener("change", function () {
var e = document.querySelector(".navbar.fixed-top"),
t = document.querySelector(".navbar-brand > img"),
s = t.src.split("/");
null !== e &&
("dark" === this.value
? ((e.className = "navbar navbar-expand-lg navbar-dark fixed-top bg-dark"), s.splice(s.length - 1, 1, "logo-light.png"), (t.src = s.join("/")))
: ((e.className = "navbar navbar-expand-lg navbar-light fixed-top bg-light"), s.splice(s.length - 1, 1, "logo-dark.png"), (t.src = s.join("/"))));
}),
s.addEventListener("change", function () {
var e = document.querySelector(".page-footer"),
t = document.querySelectorAll(".page-footer .widget-title"),
s = document.querySelectorAll(".page-footer .widget-links a"),
n = document.getElementById("mce-EMAIL"),
o = document.getElementById("mc-helper"),
c = document.querySelectorAll(".market-btn"),
r = document.getElementById("shop-features"),
a = document.querySelectorAll("#shop-features .col-md-3"),
i = document.querySelectorAll("#shop-features .icon-box-title");
"light" === this.value
? ((e.className = "page-footer bg-secondary"),
(r.className = "pt-5 pb-0 pb-md-5"),
(r.style.backgroundColor = "#f2f2f2"),
n.classList.remove("border-0", "box-shadow-0", "bg-secondary"),
(o.className = "font-size-xs text-muted pt-2 mb-2"),
t.forEach(function (e) {
e.classList.remove("text-white", "border-light");
}),
s.forEach(function (e) {
e.classList.remove("nav-link-inline", "nav-link-light");
}),
c.forEach(function (e) {
e.classList.add("bg-dark");
}),
a.forEach(function (e) {
e.classList.remove("border-light");
}),
i.forEach(function (e) {
e.classList.remove("text-white");
}))
: ((e.className = "page-footer bg-dark"),
(r.className = "pt-5 pb-0 pb-md-5 border-bottom border-light"),
(r.style.backgroundColor = "#1f1f1f"),
n.classList.add("border-0", "box-shadow-0", "bg-secondary"),
(o.className = "font-size-xs text-white opacity-60 pt-2 mb-2"),
t.forEach(function (e) {
e.classList.add("text-white", "border-light");
}),
s.forEach(function (e) {
e.classList.add("nav-link-inline", "nav-link-light");
}),
c.forEach(function (e) {
e.classList.remove("bg-dark");
}),
a.forEach(function (e) {
e.classList.add("border-light");
}),
i.forEach(function (e) {
e.classList.add("text-white");
}));
}),
n.forEach(function (e) {
e.addEventListener("change", a);
});
})();