diff options
| author | winter | 2025-03-20 22:17:38 +0000 |
|---|---|---|
| committer | winter | 2025-03-20 22:17:38 +0000 |
| commit | b5c4e99cb1a2e5bb5cf6d38192d677843b1acd80 (patch) | |
| tree | 3aee1e8b4961abe6e8c6b84913b04c9396b11b4e /templates/skeleton.php | |
| parent | c10a1ea700a94e4eff8b10985cd402943ad07859 (diff) | |
fix various htmx navigation / page reloads
also i added a UserAccount::setPassword because i felt like it
Diffstat (limited to 'templates/skeleton.php')
| -rw-r--r-- | templates/skeleton.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/templates/skeleton.php b/templates/skeleton.php index c9e28c5..f4963da 100644 --- a/templates/skeleton.php +++ b/templates/skeleton.php @@ -7,7 +7,7 @@ $settings = GlobalSettings::getInstance(); $fullTitle = $pageTitle . ' — ' . $settings->get('instance.name'); -$loadPartialPage = isset($_SERVER['HTTP_HX_REQUEST']); +$loadPartialPage ??= isset($_SERVER['HTTP_HX_REQUEST']) && !isset($_GET['fl']); if ($loadPartialPage) { echo '<title>' . htmlspecialchars($fullTitle) . '</title>'; goto skipStart; @@ -46,12 +46,11 @@ if ($loadPartialPage) { </head> <body hx-boost="true" hx-indicator="#loadingIndicator" hx-target="#centrePane" hx-swap="outerHTML show:window:top"> - <header> - <?php skipStart: ?> - <nav id="nav" <?= $loadPartialPage ? 'hx-swap-oob="true"' : '' ?>> + <?php skipStart: ?> + <header id="header" hx-swap-oob="true"> + <nav> <?php if ($user != null): ?> - <a id="leftPaneActivator" href="/mobilepane/left" class="inlineIcon material-symbols menu" - hx-boost="false"></a> + <a id="leftPaneActivator" href="/mobilepane/left" class="inlineIcon material-symbols menu"></a> <?php else: ?> <span id="leftPaneActivator"></span> <?php endif; ?> @@ -68,8 +67,7 @@ if ($loadPartialPage) { <img id="loadingIndicator" class="htmx-indicator" src="/static/tail-spin.svg"> <?php if ($user != null): ?> - <a id="rightPaneActivator" href="/mobilepane/right" class="inlineIcon material-symbols notifications" - hx-boost="false"></a> + <a id="rightPaneActivator" href="/mobilepane/right" class="inlineIcon material-symbols notifications"></a> <?php endif; ?> <?php if ($user == null): @@ -83,10 +81,10 @@ if ($loadPartialPage) { </a> <?php endif; ?> </nav> - <?php if ($loadPartialPage) - goto skipToMainContent; ?> </header> - <main> + <?php if ($loadPartialPage) + goto skipToMainContent; ?> + <main id="main" hx-swap-oob="true"> <div> <section id="leftPane"> <?php |
