mirror of
				https://github.com/Theodor-Springmann-Stiftung/musenalm.git
				synced 2025-10-29 17:25:32 +00:00 
			
		
		
		
	more refactoring of <head>; login -> alpine ajax
This commit is contained in:
		| @@ -1,46 +1,11 @@ | ||||
| <!doctype html> | ||||
| <html class="w-full h-full" {{ if .lang }}lang="{{ .lang }}"{{ end }}> | ||||
| 	<head> | ||||
| 		<meta charset="UTF-8" /> | ||||
| 		<meta | ||||
| 			name="htmx-config" | ||||
| 			content='{"defaultSwapStyle":"outerHTML", "scrollBehavior": "instant"}' /> | ||||
|  | ||||
| 		{{ block "head" . }} | ||||
| 			<!-- Default Head elements --> | ||||
| 		{{ end }} | ||||
|  | ||||
| 		{{ if .isDev }} | ||||
| 			<link rel="icon" href="/assets/logo/dev_favicon.png" /> | ||||
| 			<meta name="robots" content="noindex" /> | ||||
| 		{{ else }} | ||||
| 			{{ if .url }} | ||||
| 				<link rel="canonical" href="{{ .url }}" /> | ||||
| 			{{ end }} | ||||
| 			<link rel="icon" href="/assets/logo/favicon.png" /> | ||||
| 		{{ end }} | ||||
|  | ||||
|  | ||||
| 		<script src="/assets/js/alpine.min.js" defer></script> | ||||
| 		<script src="/assets/js/htmx.min.js" defer></script> | ||||
| 		<script src="/assets/js/htmx-response-targets.js" defer></script> | ||||
| 		<script src="/assets/js/mark.min.js" defer></script> | ||||
|  | ||||
| 		<script type="module" src="/assets/scripts.js"></script> | ||||
| 		<link href="/assets/css/remixicon.css" rel="stylesheet" /> | ||||
| 		<link rel="stylesheet" type="text/css" href="/assets/css/fonts.css" /> | ||||
| 		<link rel="stylesheet" type="text/css" href="/assets/style.css" /> | ||||
|  | ||||
| 		<script type="module"> | ||||
| 			document.body.addEventListener("htmx:responseError", function (event) { | ||||
| 				const config = event.detail.requestConfig; | ||||
| 				if (config.boosted) { | ||||
| 					document.body.innerHTML = event.detail.xhr.responseText; | ||||
| 					const newUrl = event.detail.xhr.responseURL || config.url; | ||||
| 					window.history.pushState(null, "", newUrl); | ||||
| 				} | ||||
| 			}); | ||||
| 		</script> | ||||
| 		{{ template "_head" . }} | ||||
| 	</head> | ||||
|  | ||||
| 	<body class="w-full min-h-full" hx-ext="response-targets" hx-boost="true"> | ||||
| @@ -49,5 +14,7 @@ | ||||
| 				<!-- Default app body... --> | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
|  | ||||
| 		{{ template "_scripts" . }} | ||||
| 	</body> | ||||
| </html> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens