From dd36e3fd6aa05a8c75cf4f4777edb197a6c80780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 12 Nov 2024 16:42:22 +0100 Subject: [PATCH] Test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bruno Rybársky --- assets/3rdparty/sliderm.css | 196 ++++++++++++ assets/3rdparty/sliderm.js | 595 ++++++++++++++++++++++++++++++++++++ assets/script.js | 21 ++ pages/home/index.html | 13 + templates/skeleton.html | 2 + 5 files changed, 827 insertions(+) create mode 100644 assets/3rdparty/sliderm.css create mode 100644 assets/3rdparty/sliderm.js diff --git a/assets/3rdparty/sliderm.css b/assets/3rdparty/sliderm.css new file mode 100644 index 0000000..41363da --- /dev/null +++ b/assets/3rdparty/sliderm.css @@ -0,0 +1,196 @@ +.sliderm { + position: relative +} + +.sliderm__slider { + overflow: hidden +} + +.sliderm__slides { + display: flex; + transition: all 0s linear 0s +} + +.sliderm__slide { + box-sizing: border-box +} + +.sliderm__slide img { + width: 100% +} + +.sliderm--initialize > div { + opacity: 0 +} + +.sliderm__button--next, .sliderm__button--previous { + align-items: center; + background-color: #000; + color: #fff; + cursor: pointer; + display: inline-flex; + height: 32px; + justify-content: center; + opacity: .5; + overflow: hidden; + position: absolute; + top: calc(50% - 16px); + width: 32px +} + +.sliderm__button--next span, .sliderm__button--previous span { + opacity: 1 +} + +.sliderm__button--none { + background: none !important; + height: 100%; + text-shadow: 1px 1px 5px #000; + top: 0 +} + +.sliderm__button--square { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0 +} + +.sliderm__button--circle { + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50% +} + +.sliderm__button--previous { + left: -16px +} + +.sliderm__button--previous span { + margin-left: -3px +} + +.sliderm__button--next { + right: -16px +} + +.sliderm__button--next span { + margin-right: -3px +} + +.sliderm__paginations { + display: flex; + justify-content: center; + margin: 10px 0 +} + +.sliderm__pagination { + border: 2px solid #aaa; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50%; + cursor: pointer; + height: 10px; + margin: 0 2px; + position: relative; + width: 10px +} + +.sliderm__pagination[data-active=true] { + border: 2px solid #00a0a0 +} + +.sliderm--initialized .sliderm__spinner { + display: none +} + +.sliderm__spinner { + animation: sliderm-load 1.8s ease-in-out infinite; + animation-delay: -.16s; + animation-fill-mode: both; + border-radius: 50%; + color: #1cbbb4; + font-size: 10px; + height: 2.5em; + left: calc(50% - 1.25em); + opacity: 1 !important; + position: absolute; + text-indent: -9999em; + top: calc(50% - 1.25em); + transform: translateZ(0); + width: 2.5em +} + +.sliderm__spinner:after, .sliderm__spinner:before { + animation: sliderm-load 1.8s ease-in-out infinite; + animation-fill-mode: both; + border-radius: 50%; + content: ""; + height: 2.5em; + position: absolute; + top: 0; + width: 2.5em +} + +.sliderm__spinner:before { + animation-delay: -.32s; + left: -3.5em +} + +.sliderm__spinner:after { + left: 3.5em +} + +@keyframes sliderm-load { + 0%, 80%, to { + box-shadow: 0 2.5em 0 -1.3em + } + 40% { + box-shadow: 0 2.5em 0 0 + } +} + +@font-face { + font-family: sliderm__fontello; + src: url(data:application/octet-stream;base64,d09GRgABAAAAAA1YAA8AAAAAF5QAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQgAAAGBWImDEY21hcAAAAdgAAABiAAABojStBSVjdnQgAAACPAAAAAsAAAAOAAAAAGZwZ20AAAJIAAAG7QAADgxiLvl6Z2FzcAAACTgAAAAIAAAACAAAABBnbHlmAAAJQAAAAUMAAAGe0I3mJmhlYWQAAAqEAAAAMwAAADYh3d7ZaGhlYQAACrgAAAAfAAAAJAcwA01obXR4AAAK2AAAABoAAAAcEHn/52xvY2EAAAr0AAAAEAAAABABRgGtbWF4cAAACwQAAAAgAAAAIADDDjtuYW1lAAALJAAAAXQAAALNzZ0ZGnBvc3QA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gWWawAWNgILABKyCKimEgsARDYGQjsAVDYWRQWLAEQ2EbsAVDYFmwAyWwAmIgsABQWLBAYFlmsAFjYbACJUZhOCMgPCM4GyEgIEYjR7ABKyNhOCFZsTABFCstsEcssQA6Ky6xMAEUKy2wSCyxADsrISMgIDywBiNCIzixMAEUK7AGQy6wMCstsEkssAAVIEewACNCsgABARUUEy6wNiotsEossAAVIEewACNCsgABARUUEy6wNiotsEsssQABFBOwNyotsEwssDkqLbBNLLAAFkUjIC4gRoojYTixMAEUKy2wTiywCiNCsE0rLbBPLLIAAEYrLbBQLLIAAUYrLbBRLLIBAEYrLbBSLLIBAUYrLbBTLLIAAEcrLbBULLIAAUcrLbBVLLIBAEcrLbBWLLIBAUcrLbBXLLMAAABDKy2wWCyzAAEAQystsFksswEAAEMrLbBaLLMBAQBDKy2wWyyzAAABQystsFwsswABAUMrLbBdLLMBAAFDKy2wXiyzAQEBQystsF8ssgAARSstsGAssgABRSstsGEssgEARSstsGIssgEBRSstsGMssgAASCstsGQssgABSCstsGUssgEASCstsGYssgEBSCstsGcsswAAAEQrLbBoLLMAAQBEKy2waSyzAQAARCstsGosswEBAEQrLbBrLLMAAAFEKy2wbCyzAAEBRCstsG0sswEAAUQrLbBuLLMBAQFEKy2wbyyxADwrLrEwARQrLbBwLLEAPCuwQCstsHEssQA8K7BBKy2wciywABaxADwrsEIrLbBzLLEBPCuwQCstsHQssQE8K7BBKy2wdSywABaxATwrsEIrLbB2LLEAPSsusTABFCstsHcssQA9K7BAKy2weCyxAD0rsEErLbB5LLEAPSuwQistsHossQE9K7BAKy2weyyxAT0rsEErLbB8LLEBPSuwQistsH0ssQA+Ky6xMAEUKy2wfiyxAD4rsEArLbB/LLEAPiuwQSstsIAssQA+K7BCKy2wgSyxAT4rsEArLbCCLLEBPiuwQSstsIMssQE+K7BCKy2whCyxAD8rLrEwARQrLbCFLLEAPyuwQCstsIYssQA/K7BBKy2whyyxAD8rsEIrLbCILLEBPyuwQCstsIkssQE/K7BBKy2wiiyxAT8rsEIrLbCLLLILAANFUFiwBhuyBAIDRVgjIRshWVlCK7AIZbADJFB4sQUBFUVYMFktAEu4AMhSWLEBAY5ZsAG5CAAIAGNwsQAHQrEAACqxAAdCsQAKKrEAB0KxAAoqsQAHQrkAAAALKrEAB0K5AAAACyq5AAMAAESxJAGIUViwQIhYuQADAGREsSgBiFFYuAgAiFi5AAMAAERZG7EnAYhRWLoIgAABBECIY1RYuQADAABEWVlZWVmxAA4quAH/hbAEjbECAESzBWQGAERE) format("truetype") +} + +[class*=" sliderm__icon-"]:before, [class^=sliderm__icon-]:before { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + display: inline-block; + font-family: sliderm__fontello; + font-style: normal; + font-variant: normal; + font-weight: 400; + line-height: 1em; + margin-left: .2em; + margin-right: .2em; + text-align: center; + text-decoration: inherit; + text-transform: none; + width: 1em +} + +.sliderm__icon-left--regular:before { + content: "\fef01" +} + +.sliderm__icon-right--regular:before { + content: "\fef02" +} + +.sliderm__icon-left--bold:before { + content: "\fef03" +} + +.sliderm__icon-right--bold:before { + content: "\fef04" +} + +.sliderm__icon-right--thin:before { + content: "\fef05" +} + +.sliderm__icon-left--thin:before { + content: "\fef06" +} \ No newline at end of file diff --git a/assets/3rdparty/sliderm.js b/assets/3rdparty/sliderm.js new file mode 100644 index 0000000..94696d6 --- /dev/null +++ b/assets/3rdparty/sliderm.js @@ -0,0 +1,595 @@ +(() => { + "use strict"; + (() => { + function getDom(t) { + return function hasDom(t) { + return null !== document.querySelector(t) + }(t) ? document.querySelector(t) : null + } + + function setDom(t) { + for (var e, n = document.createElement(t), o = arguments.length, i = new Array(o > 1 ? o - 1 : 0), r = 1; r < o; r++) i[r - 1] = arguments[r]; + return (e = n.classList).add.apply(e, i), n + } + + function findDom(t, e) { + try { + return t.querySelector(e) + } catch (t) { + return null + } + } + + var t = "sliderm", e = "sliderm__slides", n = "sliderm__paginations", o = "sliderm__pagination", + i = "sliderm__slide--clone"; + + function isInteger(t) { + return Number.isFinite(t) + } + + var r = function bold(t) { + var e = {1: "thin", 2: "regular", 3: "bold"}; + return void 0 !== e[t] ? e[t] : "regular" + }, a = function shape(t) { + return "none" === t || "square" === t ? t : "circle" + }, s = function size(t) { + return isInteger(t) && 16 !== t ? t <= 13 ? 13 : t >= 28 ? 28 : t : null + }, l = function bgColor(t) { + return "#000000" !== t ? t : null + }, u = function color(t) { + return "#ffffff" !== t ? t : null + }, c = function opacity(t) { + return !isInteger(t) || t > 1 || t < .1 || .5 === t ? null : t + }; + + function queue(t) { + var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; + return setTimeout((function () { + t() + }), e) + } + + var p = [function breakpoint(t, e) { + if (t.getOption("breakpoint")) { + !function init() { + var n = t.getOption("columns"), o = t.getOption("breakpoint.columns"), + i = Number(e.getAttribute("data-columns")), r = function calculate(t, e) { + var n = window.innerWidth, o = Object.keys(t).filter((function (e) { + return n < t[e] + })); + return void 0 !== o[0] ? Number(o[0]) : e + }(o, n); + if (e.setAttribute("data-columns", n), void 0 !== r && i !== r) { + var a = t.getItems(); + t.updateOption("columns", r), t.updateCurrentItems(); + for (var s = 0; s < a.length; s += 1) t.go("columns", a[s]); + t.emit("breakpoint.changed") + } + }() + } + }, function transition(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++) o[i - 2] = arguments[i]; + var r = o[0], a = t.getOption("duration"); + "stop" !== r ? (e.style.setProperty("transition-duration", "".concat(a, "ms")), t.on("destory", (function () { + e.style.removeProperty("transition-duration") + }))) : e.style.removeProperty("transition-duration") + }, function transform(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++) o[i - 2] = arguments[i]; + var r = o[0]; + e.style.setProperty("transform", "translateX(".concat(r, "px)")), t.on("destory", (function () { + e.style.removeProperty("transform") + })) + }, function autoplay(t) { + if (t.getOption("autoplay")) { + var e = t.getOption("autoplay.duration"), n = "left" === t.getOption("autoplay.direction") ? "<" : ">", + o = function repeat(t) { + return setInterval((function () { + t() + }), arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 5e3) + }((function () { + t.slideTo(n) + }), e); + t.on("destory", (function () { + !function stop(t) { + clearInterval(t), clearTimeout(t) + }(o) + })) + } + }, function grouping(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++) o[i - 2] = arguments[i]; + var r = o[0], a = o[1], s = t.getOption("grouping"), l = a + 1; + if (s) { + var u = t.getOption("columns"), c = Math.ceil((a + 1) / u); + r.setAttribute("data-order", c) + } else r.setAttribute("data-order", l); + t.on("destory", (function () { + r.removeAttribute("data-order") + })) + }, function columns(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++) o[i - 2] = arguments[i]; + var r = o[0], a = t.getOption("columns"), s = parseFloat((1 / a * 100).toFixed(2)); + r.style.setProperty("flex", "0 0 ".concat(s, "%")), t.on("destory", (function () { + r.style.removeProperty("flex") + })) + }, function preview(t, e) { + if (t.getOption("preview")) { + var n = t.getOption("preview.edge"); + e.style.setProperty("padding", "0 ".concat(n, "px")), t.on("destory", (function () { + e.style.removeProperty("padding") + })) + } + }, function spacing(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++) o[i - 2] = arguments[i]; + var r = o[0], a = Math.floor(t.getOption("spacing") / 2); + r.style.setProperty("padding", "0px ".concat(a, "px")), t.on("destory", (function () { + r.style.removeProperty("padding") + })) + }, function align(t, e) { + var n = t.getOption("align"); + "center" === n ? e.style.setProperty("align-items", "center") : "bottom" === n && e.style.setProperty("align-items", "flex-end"), t.on("destory", (function () { + e.style.removeProperty("align-items") + })) + }, function touch(t, e) { + if (t.getOption("touch")) { + !function init() { + var n = t.getOption("touch.threshold"), o = t.getOption("touch.duration"), i = t.adaptEvent(e), + r = {x: 0, y: 0, time: 0}; + i.on("touchstart", (function (t) { + t.preventDefault(); + var e = t.changedTouches[0]; + r.x = e.pageX, r.y = e.pageY, r.time = (new Date).getTime() + })), i.on("touchmove", (function (t) { + t.preventDefault() + })), i.on("touchend", (function (e) { + e.preventDefault(); + var i = e.changedTouches[0], a = (new Date).getTime() - r.time, s = Math.abs(i.pageX - r.x); + if (!(a > o || s < n)) { + var l = i.pageX > r.x ? ">" : "<"; + t.slideTo(l) + } + })) + }() + } + }, function clone(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++) o[r - 2] = arguments[r]; + var a = o[0], s = o[1], l = t.getOption("columns"), u = t.getOption("preview"), c = t.getOption("loop"); + if (u || c) { + var p = t.getItemCount(), d = t.getItems(), f = l, h = a.cloneNode(!0), v = null, m = !1; + h.classList.add(i), s < f && (e.appendChild(h), m = !0), s >= p - f && (m ? ((v = a.cloneNode(!0)).classList.add(i), e.insertBefore(v, d[0])) : e.insertBefore(h, d[0])), t.on("destory", (function () { + h.remove(), v && v.remove() + })) + } + }, function slide(t, e) { + for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++) o[i - 2] = arguments[i]; + var r = o[0], a = o[1], s = t.getOption("grouping"), l = t.getOption("preview"), + u = t.getOption("duration"), c = t.getOption("columns"), p = t.getOption("loop"), + d = t.getItems()[0].offsetWidth, f = t.getPage(), h = p || l, v = f.maximum(), m = f.calculate(r, !1), + g = m < 1 || m > v, y = 0; + !p && g || (y = s ? d * (0 - (h ? 0 : -1) - m) * c : d * (1 - (h ? c : 0) - m), t.emit("slide.start"), t.go("transition", a), t.go("transform", y), t.updatePosition(m), g ? queue((function () { + m = f.calculate(r, g), y = s ? d * (0 - m) * c : d * (1 - c - m), t.go("transition", "stop"), t.go("transform", y), t.updatePosition(m), t.emit("slide.end") + }), u + 10) : t.emit("slide.end")) + }, function loop(t, e) { + var n = t.getOption("loop"), o = t.getOption("grouping"); + if (n && o) { + var i = t.getItems(), r = t.getOption("columns"), a = t.getItemCount(), s = i[i.length - 1], + l = r - a % r, u = []; + if (l !== r && 1 !== r) { + for (var c = 1; c <= l; c += 1) { + var p = s.cloneNode(!0); + p.classList.add("sliderm__slide--empty"), p.innerHTML = "", e.appendChild(p), u.push(p) + } + t.updateCurrentItems(), t.on("destory", (function () { + u.forEach((function (t) { + t.remove() + })) + })) + } + } + }, function init(e) { + var n = e.getOption("duration"), o = e.getRoot(); + o.classList.add(t), o.classList.remove("".concat(t, "--initialized")), o.classList.add("".concat(t, "--initialize")), e.on("initialized", (function () { + queue((function () { + o.classList.remove("".concat(t, "--initialize")), o.classList.add("".concat(t, "--initialized")) + }), n + 50) + })) + }], d = [function pagination(t) { + var e, i, r, a = function click(e) { + if (o === e.target.className) { + var n = Array.prototype.indexOf.call(i.childNodes, e.target) + 1; + t.slideTo(n) + } + }, s = function mark() { + var e = t.getPosition(), o = findDom(t.getRoot(), ".".concat(n)).children; + Array.from(o).forEach((function (t, n) { + var o = n + 1; + t.removeAttribute("data-active"), o === e && t.setAttribute("data-active", !0) + })) + }, l = function destory() { + r.off("click", a), t.off("slide.end", s), i.remove() + }, u = function init() { + !function render() { + var a = setDom("div", n); + e = t.getPage().maximum(); + for (var s = 0; s < e; s += 1) { + var l = setDom("div", o); + 0 === s && l.setAttribute("data-active", !0), a.append(l) + } + i = a, r = t.adaptEvent(i), t.getRoot().append(i) + }(), function listen() { + r.on("click", a), t.on("slide.end", s) + }() + }; + t.on("destory", l), t.on("breakpoint.changed", (function () { + l(), u() + })), u() + }, function spinner(t) { + !function init() { + var e = t.getOption("spinner.color"), n = setDom("div", "sliderm__spinner"); + n.style.setProperty("color", e), t.getRoot().append(n), t.on("destory", (function () { + n.remove() + })) + }() + }, function arrow(t) { + !function init() { + for (var e = [s, r, a, u, l, c], n = setDom("div", "sliderm__button--previous"), o = setDom("div", "sliderm__button--next"), i = t.adaptEvent(n), p = t.adaptEvent(o), d = null, f = null, h = 0; h < e.length; h += 1) { + var v = e[h].name, m = e[h](t.getOption("arrow.".concat(v))); + null !== m && ("bold" === v ? (d = setDom("span", "sliderm__icon-left--".concat(m)), f = setDom("span", "sliderm__icon-right--".concat(m))) : "shape" === v ? (n.classList.add("sliderm__button--".concat(m)), o.classList.add("sliderm__button--".concat(m))) : ("bgColor" === v ? v = "background-color" : "size" === v && (v = "font-size", m = "".concat(m, "px")), n.style.setProperty(v, m), o.style.setProperty(v, m))) + } + n.append(d), o.append(f), t.getRoot().append(n), t.getRoot().append(o), i.on("click", (function () { + t.slideTo("<") + })), p.on("click", (function () { + t.slideTo(">") + })), t.on("destory", (function () { + n.remove(), o.remove() + })) + }() + }]; + + function _defineProperties(t, e) { + for (var n = 0; n < e.length; n++) { + var o = e[n]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o) + } + } + + var f = function () { + function EventDispatcher() { + !function _classCallCheck(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + }(this, EventDispatcher), this.events = {} + } + + return function _createClass(t, e, n) { + return e && _defineProperties(t.prototype, e), n && _defineProperties(t, n), Object.defineProperty(t, "prototype", {writable: !1}), t + }(EventDispatcher, [{ + key: "on", value: function on(t, e) { + Object.prototype.hasOwnProperty.call(this.events, t) || (this.events[t] = []), this.events[t].push(e) + } + }, { + key: "off", value: function off(t, e) { + var n = this; + void 0 === e ? delete this.events[t] : this.events[t].forEach((function (o, i) { + o === e && n.events[t].splice(i, 1) + })) + } + }, { + key: "emit", value: function emit(t) { + for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++) n[o - 1] = arguments[o]; + void 0 !== this.events[t] && Array.isArray(this.events[t]) && this.events[t].forEach((function (t) { + t.apply(void 0, n) + })) + } + }, { + key: "destory", value: function destory() { + delete this.events + } + }]), EventDispatcher + }(); + + function event_adapter_defineProperties(t, e) { + for (var n = 0; n < e.length; n++) { + var o = e[n]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o) + } + } + + var h = function () { + function EventAdapter(t) { + !function event_adapter_classCallCheck(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + }(this, EventAdapter), this.target = t, this.events = {} + } + + return function event_adapter_createClass(t, e, n) { + return e && event_adapter_defineProperties(t.prototype, e), n && event_adapter_defineProperties(t, n), Object.defineProperty(t, "prototype", {writable: !1}), t + }(EventAdapter, [{ + key: "on", value: function on(t, e) { + this.events[t] = e, this.target.addEventListener(t, this.events[t]) + } + }, { + key: "off", value: function off(t) { + this.target.removeEventListener(t, this.events[t]) + } + }, { + key: "emit", value: function emit(t) { + void 0 !== this.events[t] && this.target.dispatchEvent(new Event(t)) + } + }, { + key: "destory", value: function destory() { + for (var t = Object.keys(this.events), e = 0; e < t.length; e += 1) this.off(t[e]); + delete this.events + } + }, { + key: "mock", value: function mock(t, e) { + void 0 !== this.events[t] && this.events[t](e) + } + }]), EventAdapter + }(); + + function error(t) { + console.error("[Sliderm] ".concat(t)) + } + + const v = { + arrow: !0, + pagination: !0, + spinner: !0, + grouping: !1, + loop: !0, + preview: !1, + breakpoint: !0, + touch: !0, + autoplay: !1, + columns: 4, + duration: 1e3, + spacing: 10, + align: "center", + extensions: [], + _arrow: {color: "#ffffff", bgColor: "#000000", opacity: .5, size: 16, shape: "circle", bold: 2}, + _preview: {edge: 40}, + _spinner: {color: "#1cbbb4"}, + _breakpoint: {columns: {4: !1, 3: 960, 2: 768, 1: 420}}, + _touch: {threshold: 10, duration: 300}, + _autoplay: {direction: "right", duration: 5e3} + }; + + function page_defineProperties(t, e) { + for (var n = 0; n < e.length; n++) { + var o = e[n]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o) + } + } + + var m = function () { + function Page(t) { + !function page_classCallCheck(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + }(this, Page), this.sliderm = t + } + + return function page_createClass(t, e, n) { + return e && page_defineProperties(t.prototype, e), n && page_defineProperties(t, n), Object.defineProperty(t, "prototype", {writable: !1}), t + }(Page, [{ + key: "calculate", value: function calculate() { + for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; + var o = e[0], i = e[1], r = this.sliderm.getOption("columns"), + a = this.sliderm.getOption("grouping"), s = this.sliderm.getItemCount(), + l = this.sliderm.getGroupCount(), u = this.sliderm.getPosition(), c = a ? l : s, p = u, d = 0; + if (a) { + var f = Math.ceil(u * r / r); + p = f + } + return "number" == typeof o ? d = o : ">" === o ? (d = p + 1) > c && i && (d = 1) : "<" === o && (d = p - 1) <= 0 && i && (d = c), d + } + }, { + key: "maximum", value: function maximum() { + var t = this.sliderm.getOption("loop"), e = this.sliderm.getOption("preview"), + n = this.sliderm.getOption("grouping"), o = this.sliderm.getOption("columns"), i = t || e; + return n ? this.sliderm.getGroupCount() : i ? this.sliderm.getItemCount() : this.sliderm.getItemCount() - o + 1 + } + }]), Page + }(); + + function _toConsumableArray(t) { + return function _arrayWithoutHoles(t) { + if (Array.isArray(t)) return _arrayLikeToArray(t) + }(t) || function _iterableToArray(t) { + if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t) + }(t) || _unsupportedIterableToArray(t) || function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }() + } + + function _slicedToArray(t, e) { + return function _arrayWithHoles(t) { + if (Array.isArray(t)) return t + }(t) || function _iterableToArrayLimit(t, e) { + var n = null == t ? null : "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]; + if (null == n) return; + var o, i, r = [], a = !0, s = !1; + try { + for (n = n.call(t); !(a = (o = n.next()).done) && (r.push(o.value), !e || r.length !== e); a = !0) ; + } catch (t) { + s = !0, i = t + } finally { + try { + a || null == n.return || n.return() + } finally { + if (s) throw i + } + } + return r + }(t, e) || _unsupportedIterableToArray(t, e) || function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }() + } + + function _unsupportedIterableToArray(t, e) { + if (t) { + if ("string" == typeof t) return _arrayLikeToArray(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(t, e) : void 0 + } + } + + function _arrayLikeToArray(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, o = new Array(e); n < e; n++) o[n] = t[n]; + return o + } + + function sliderm_defineProperties(t, e) { + for (var n = 0; n < e.length; n++) { + var o = e[n]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o) + } + } + + function _classPrivateMethodInitSpec(t, e) { + !function _checkPrivateRedeclaration(t, e) { + if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object") + }(t, e), e.add(t) + } + + function _classPrivateMethodGet(t, e, n) { + if (!e.has(t)) throw new TypeError("attempted to get private field on non-instance"); + return n + } + + var g = new WeakSet, y = new WeakSet, _ = new WeakSet, b = new WeakSet, P = new WeakSet, w = function () { + function Sliderm(t, n) { + !function sliderm_classCallCheck(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + }(this, Sliderm), _classPrivateMethodInitSpec(this, P), _classPrivateMethodInitSpec(this, b), _classPrivateMethodInitSpec(this, _), _classPrivateMethodInitSpec(this, y), _classPrivateMethodInitSpec(this, g); + var o = getDom(t); + o ? (this.options = Object.assign(v, n), this.event = new f, this.page = new m(this), this.root = o, this.initialized = !1, this.domEvents = [], this.itemCount = 0, this.position = 1, this.modules = {}, this.slider = findDom(this.root, ".".concat(e)), this.items = [], _classPrivateMethodGet(this, g, _initialize2).call(this)) : error('The DOM "'.concat(t, '" is invalid.')) + } + + return function sliderm_createClass(t, e, n) { + return e && sliderm_defineProperties(t.prototype, e), n && sliderm_defineProperties(t, n), Object.defineProperty(t, "prototype", {writable: !1}), t + }(Sliderm, [{ + key: "adaptEvent", value: function adaptEvent(t) { + var e = new h(t); + return this.domEvents.push(e), e + } + }, { + key: "getPage", value: function getPage() { + return this.page + } + }, { + key: "getRoot", value: function getRoot() { + return this.root + } + }, { + key: "getItemCount", value: function getItemCount() { + return this.itemCount + } + }, { + key: "getGroupCount", value: function getGroupCount() { + return this.groupCount + } + }, { + key: "getItems", value: function getItems() { + return this.items + } + }, { + key: "getPosition", value: function getPosition() { + return this.position + } + }, { + key: "updatePosition", value: function updatePosition(t) { + this.position = t + } + }, { + key: "updateCurrentItems", value: function updateCurrentItems() { + return !this.initialized && (_classPrivateMethodGet(this, _, _updateItems2).call(this), _classPrivateMethodGet(this, b, _updateGroupCount2).call(this), !0) + } + }, { + key: "getOption", value: function getOption(t) { + var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + n = void 0 !== this.options[t] ? this.options[t] : e; + if (t.includes(".")) try { + var o = t.split("."), i = _slicedToArray(o, 2), r = i[0], a = i[1]; + return this.options["_".concat(r)][a] + } catch (t) { + return e + } + return n + } + }, { + key: "updateOption", value: function updateOption(t, e) { + if (t.includes(".")) try { + var n = _slicedToArray(t.split("."), 2), o = n[0], i = n[1]; + this.options["_".concat(o)][i] = e + } catch (t) { + } else this.options[t] = e + } + }, { + key: "slideTo", value: function slideTo(t) { + this.go("slide", t) + } + }, { + key: "go", value: function go(t) { + var e; + if (void 0 !== this.modules[t]) { + for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++) o[i - 1] = arguments[i]; + (e = this.modules)[t].apply(e, [this, this.slider].concat(o)) + } else error("Invalid module name: ".concat(t)) + } + }, { + key: "on", value: function on(t, e) { + this.event.on(t, e) + } + }, { + key: "off", value: function off(t, e) { + this.event.off(t, e) + } + }, { + key: "emit", value: function emit(t) { + for (var e, n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++) o[i - 1] = arguments[i]; + var r = [this].concat(o); + (e = this.event).emit.apply(e, [t].concat(_toConsumableArray(r))) + } + }, { + key: "destory", value: function destory() { + this.event.emit("destory"), this.event.destory(), this.domEvents.forEach((function (t) { + t.destory() + })) + } + }]), Sliderm + }(); + + function _initialize2() { + var t = this; + this.emit("initialize"), _classPrivateMethodGet(this, _, _updateItems2).call(this), _classPrivateMethodGet(this, b, _updateGroupCount2).call(this), _classPrivateMethodGet(this, P, _beforeMountExtensions2).call(this), _classPrivateMethodGet(this, y, _mountExtensions2).call(this), this.go("init"), this.go("breakpoint"), this.go("loop"), this.go("align"), this.go("touch"), this.go("preview"), this.go("autoplay"), this.items.forEach((function (e, n) { + t.go("columns", e), t.go("spacing", e), t.go("grouping", e, n), t.go("clone", e, n) + })), this.slideTo(1), this.initialized = !0, this.emit("initialized") + } + + function _mountExtensions2() { + for (var t = 0; t < p.length; t += 1) "function" == typeof p[t] && (this.modules[p[t].name] = p[t]); + for (var e = 0; e < d.length; e += 1) "function" == typeof d[e] && this.getOption(d[e].name) && d[e](this) + } + + function _updateItems2() { + this.items = Array.from(findDom(this.root, ".".concat(e)).children), this.itemCount = this.items.length + } + + function _updateGroupCount2() { + var t = this.getOption("columns"); + this.groupCount = Math.ceil(this.itemCount / t) + } + + function _beforeMountExtensions2() { + for (var t = 0; t < this.options.extensions.length; t += 1) { + var e = this.options.extensions[t].name; + if ("" !== e) { + var n = this.options.extensions[t]; + void 0 === this.options[e] ? p.push(n) : d.push(n) + } + } + } + + window.Sliderm = w + })() +})(); \ No newline at end of file diff --git a/assets/script.js b/assets/script.js index 3458c48..64924c0 100644 --- a/assets/script.js +++ b/assets/script.js @@ -80,6 +80,26 @@ async function doAction(url, requestData, successMessage, failureMessage, silent return data; } + +async function doSlicks() { + const elements = document.querySelectorAll('[data-slick]'); + elements.forEach(function (element) { + // Initialize the Slick carousel on each element + const sliderm = new Sliderm('#' + element.id, { + arrow: true, + pagination: true, + grouping: false, + loop: true, + preview: false, + columns: 4, + duration: 1000, + spacing: 10, + align: 'center', + }); + + }); +} + async function handlePageResponse(data) { "use strict"; const navbar = document.getElementById("navbar_container"); @@ -297,6 +317,7 @@ async function onPageLoad() { if (currentSite === "memes" && currentPage === "index") { await getMemeImages(); } + await doSlicks(); } async function navigateTo(site, page) { diff --git a/pages/home/index.html b/pages/home/index.html index 1014f57..16f60c2 100644 --- a/pages/home/index.html +++ b/pages/home/index.html @@ -5,3 +5,16 @@

Neoficiálna študentská stránka pre Adlerku


+ +
+
+
+
+
+
+
+
+
+
+
+ diff --git a/templates/skeleton.html b/templates/skeleton.html index fc1a30d..945a89f 100644 --- a/templates/skeleton.html +++ b/templates/skeleton.html @@ -5,12 +5,14 @@ + __TEMPLATE__DYNAMIC__SCRIPT__ __TEMPLATE__DYNAMIC__STYLE__ + __TEMPLATE_PAGE_TITLE__ __TEMPLATE_SEO_STUFF__