diff --git a/fet2020/static/js/alpine-csp.js b/fet2020/static/js/alpine-csp.js index d75266d5..34ba9d46 100644 --- a/fet2020/static/js/alpine-csp.js +++ b/fet2020/static/js/alpine-csp.js @@ -3108,6 +3108,9 @@ } return this.showModal; }, + getNotShowModal() { + return !this.showModal; + }, toggle() { this.showModal = !this.showModal; this.setClass(); @@ -3155,7 +3158,7 @@ }, getShowNavBarMd() { if (screen.width >= 766) { - return this.showNavBar = true; + this.showNavBar = true; } return this.showNavBar; }, @@ -3166,7 +3169,7 @@ return this.showNavBar; } })); - alpine_default.data("PopupNav", () => ({ + alpine_default.data("popupNav", () => ({ showPopupNav: false, toggleShowPopupNav() { this.showPopupNav = !this.showPopupNav; @@ -3180,9 +3183,9 @@ } return this.showPopupNav; }, - getScreenLg() { + getNotScreenLg() { if (screen.width >= 1024) { - return true; + return false; } } })); @@ -3198,6 +3201,85 @@ return this.showSearch; } })); + alpine_default.data("prevArticleButton", () => ({ + showPrevArticleButton: false, + openShowPrevArticleButton() { + this.showPrevArticleButton = true; + }, + closeShowPrevArticleButton() { + this.showPrevArticleButton = false; + }, + getShowPrevArticleButton() { + return this.showPrevArticleButton; + } + })); + alpine_default.data("nextArticleButton", () => ({ + showNextArticleButton: false, + openShowNextArticleButton() { + this.showNextArticleButton = true; + }, + closeShowNextArticleButton() { + this.showNextArticleButton = false; + }, + getShowNextArticleButton() { + return this.showNextArticleButton; + } + })); + alpine_default.data("options", () => ({ + showOptions: false, + openShowOptions() { + this.showOptions = true; + }, + closeShowOptions() { + this.showOptions = false; + }, + getShowOptions() { + if (screen.width >= 766) { + this.showOptions = true; + } + return this.showOptions; + } + })); + alpine_default.data("memberExpandList", () => ({ + expandList: false, + toggleExpandList() { + this.expandList = !this.expandList; + this.setClass(); + }, + openExpandList() { + this.expandList = true; + this.setClass(); + }, + closeExpandList() { + this.expandList = false; + this.setClass(); + }, + getExpandList() { + return this.expandList; + }, + getNotExpandList() { + return !this.expandList; + }, + setClass() { + if (this.getExpandList() == false) { + this.$refs.rotate.classList.remove("-rotate-90"); + } else { + this.$refs.rotate.classList.add("-rotate-90"); + } + } + })); + alpine_default.data("pin", () => ({ + showPin: true, + openShowPin() { + this.showPin = true; + }, + closeShowPin() { + this.showPin = false; + }, + getShowPin() { + return this.showPin; + } + })); // packages/csp/builds/cdn.js window.Alpine = src_default2; diff --git a/fet2020/templates/base.html b/fet2020/templates/base.html index 247d6fc1..78c4e825 100644 --- a/fet2020/templates/base.html +++ b/fet2020/templates/base.html @@ -87,7 +87,7 @@ {% else %}