From e9d75f0203193fcf3b6d9a54d7dd2e932076c04e Mon Sep 17 00:00:00 2001 From: AntonLV Date: Mon, 18 Mar 2024 13:10:26 +0300 Subject: [PATCH] Ticket #4641 - Use HTMX to load page content without genaral page structure. --- .../data/template/system/css/general.css | 34 ++++++++----------- .../template/system/scripts/BxTemplMenu.php | 2 +- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/modules/boonex/artificer/data/template/system/css/general.css b/modules/boonex/artificer/data/template/system/css/general.css index fe7416830b..48506a4730 100644 --- a/modules/boonex/artificer/data/template/system/css/general.css +++ b/modules/boonex/artificer/data/template/system/css/general.css @@ -71,32 +71,28 @@ import url(../../../../../../../template/css/general.css); /*--- Page Content ---*/ -/* -#bx-content-wrapper.fade { - opacity: 1; - transition: opacity 200ms ease-out; -} -#bx-content-wrapper.fade.htmx-swapping { - opacity: 0; - transition: opacity 400ms ease-out; -} -#bx-content-wrapper.fade.htmx-added { +#bx-content-wrapper.htmx-added { opacity: 0; } -*/ -#bx-content-wrapper.ltr.htmx-swapping { - animation: slide-to-right 400ms cubic-bezier(0.37, 0.82, 0.2, 1); +#bx-content-wrapper.ltr.htmx-swapping:not(.htmx-added) { + opacity: 0; + transition: opacity 400ms ease-out; + animation: slide-to-right 400ms cubic-bezier(0.37, 0.82, 0.2, 1); } -#bx-content-wrapper.ltr.htmx-added { - animation: slide-from-left 200ms cubic-bezier(0.37, 0.82, 0.2, 1); +#bx-content-wrapper.ltr.htmx-settling { + opacity: 1; + animation: slide-from-left 400ms cubic-bezier(0.37, 0.82, 0.2, 1); } -#bx-content-wrapper.rtl.htmx-swapping { - animation: slide-to-left 400ms cubic-bezier(0.37, 0.82, 0.2, 1); +#bx-content-wrapper.rtl.htmx-swapping:not(.htmx-added) { + opacity: 0; + transition: opacity 400ms ease-out; + animation: slide-to-left 400ms cubic-bezier(0.37, 0.82, 0.2, 1); } -#bx-content-wrapper.rtl.htmx-added { - animation: slide-from-right 200ms cubic-bezier(0.37, 0.82, 0.2, 1); +#bx-content-wrapper.rtl.htmx-settling { + opacity: 1; + animation: slide-from-right 400ms cubic-bezier(0.37, 0.82, 0.2, 1); } @keyframes slide-from-right { diff --git a/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php b/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php index 449c50f4de..0867ad03c3 100644 --- a/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php +++ b/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php @@ -27,7 +27,7 @@ public function __construct ($aObject, $oTemplate = false) 'get' => '', 'trigger' => 'click', 'target' => '#bx-content-wrapper', - 'swap' => 'outerHTML swap:400ms settle:200ms', + 'swap' => 'outerHTML swap:400ms settle:400ms', 'push-url' => 'true', 'on::before-on-load' => 'oBxArtificerUtils.submenuClickBl(this)', 'on::after-on-load' => 'oBxArtificerUtils.submenuClickAl(this)'