index page larger header (does not work)

This commit is contained in:
f0x 2024-07-30 16:49:55 +02:00
parent 01174fd648
commit 01871cdb04
2 changed files with 45 additions and 41 deletions

View file

@ -60,7 +60,7 @@ func (m *Module) indexHandler(c *gin.Context) {
Instance: instance,
OGMeta: apiutil.OGBase(instance),
Stylesheets: []string{},
Extra: map[string]any{"showStrap": true},
Extra: map[string]any{"showStrap": true, "largeHeader": true},
}
apiutil.TemplateWebPage(c, page)

View file

@ -22,7 +22,7 @@
If some if/else macro is used multiple times, declare it once here instead.
When invoking these nested templates, remember to pass in the values passed
to the executing template, ie., use '{{ template "example" . }}' not
'{{ template "example" }}', otherwise you'll end up with empty variables.
'{{ template "example" }}', otherwise you'll end up with empty variables.
*/ -}}
{{- define "thumbnailType" -}}
@ -43,7 +43,8 @@ image/webp
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -59,7 +60,8 @@ image/webp
{{- if .account }}
<link rel="alternate" type="application/activity+json" href="/users/{{- .account.Username -}}">
{{- else if .status }}
<link rel="alternate" type="application/activity+json" href="/users/{{- .status.Account.Username -}}/statuses/{{- .status.ID -}}">
<link rel="alternate" type="application/activity+json"
href="/users/{{- .status.Account.Username -}}/statuses/{{- .status.ID -}}">
{{- else }}
{{- end }}
<link rel="icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}">
@ -70,9 +72,10 @@ image/webp
<script type="text/javascript" src="{{- . -}}" async="" defer=""></script>
{{- end }}
<title>{{- template "instanceTitle" . -}}</title>
</head>
<body class="page">
<header class="page-header">
</head>
<body class="page">
<header class="page-header{{ if .largeHeader}} large{{end}}">
{{- include "page_header.tmpl" . | indent 3 }}
</header>
<div class="page-content">
@ -81,5 +84,6 @@ image/webp
<footer class="page-footer">
{{- include "page_footer.tmpl" . | indent 3 }}
</footer>
</body>
</body>
</html>