-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (30 loc) · 1.1 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
// header buttons functionality - mostly toggling of CSS classes
toggleThumbnailsLayout = function () {
document.getElementById("grid").classList.toggle("go-masonry");
["codeMasonry", "codeGrid"].forEach((idCls) => {
document.getElementById(idCls).classList.toggle(idCls);
});
};
function showResponsivity() {
["expand", "shrink"].forEach((cls) => {
document.getElementById("fenceBox").classList.toggle(cls);
});
}
function toggleHoverEffect(that) {
document.getElementById("grid").classList.toggle("go-zoomFx");
that.classList.toggle("zoomFx");
["#codeMasonry", "#codeGrid"].forEach((id) => {
document.querySelector(id + " ins").classList.toggle("hidden");
});
}
function toggleGalleryTheme(that) {
SSG.cfg.theme = SSG.cfg.theme === "light" ? "dark" : "light";
that.innerText = "◑ theme: " + SSG.cfg.theme.toUpperCase();
document.getElementById("ssgrun").classList.toggle("dark");
}
function runStoryShowGallery() {
SSG.run({ fs: false, initImgName: ["klaksvik-sheeps", 1] });
}
setTimeout(() => {
document.getElementById("fenceBox").classList.remove("delay");
}, 3333);