load(); session_start(); $auth0_session = Auth::client()->getCredentials(); if (!is_null($auth0_session)) { $_SESSION['user_id'] = $auth0_session->user['sub']; } /** * Is this an htmx request? * * @return bool True if this is an htmx request, false if not */ function is_htmx(): bool { return key_exists('HTTP_HX_REQUEST', $_SERVER) && !key_exists('HTTP_HX_HISTORY_RESTORE_REQUEST', $_SERVER); } function page_link(string $href, string $text, array $attrs = []): void { echo ' $value) echo " $key=\"" . htmlspecialchars($value) . "\""; echo ">$text"; } function page_head(string $title): void { Layout::htmlHead($title); echo '
'; if (!is_htmx()) echo '