index page larger header (does not work)
This commit is contained in:
parent
01174fd648
commit
01871cdb04
|
@ -60,7 +60,7 @@ func (m *Module) indexHandler(c *gin.Context) {
|
||||||
Instance: instance,
|
Instance: instance,
|
||||||
OGMeta: apiutil.OGBase(instance),
|
OGMeta: apiutil.OGBase(instance),
|
||||||
Stylesheets: []string{},
|
Stylesheets: []string{},
|
||||||
Extra: map[string]any{"showStrap": true},
|
Extra: map[string]any{"showStrap": true, "largeHeader": true},
|
||||||
}
|
}
|
||||||
|
|
||||||
apiutil.TemplateWebPage(c, page)
|
apiutil.TemplateWebPage(c, page)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
If some if/else macro is used multiple times, declare it once here instead.
|
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
|
When invoking these nested templates, remember to pass in the values passed
|
||||||
to the executing template, ie., use '{{ template "example" . }}' not
|
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" -}}
|
{{- define "thumbnailType" -}}
|
||||||
|
@ -43,7 +43,8 @@ image/webp
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
@ -59,7 +60,8 @@ image/webp
|
||||||
{{- if .account }}
|
{{- if .account }}
|
||||||
<link rel="alternate" type="application/activity+json" href="/users/{{- .account.Username -}}">
|
<link rel="alternate" type="application/activity+json" href="/users/{{- .account.Username -}}">
|
||||||
{{- else if .status }}
|
{{- 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 }}
|
{{- else }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<link rel="icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}">
|
<link rel="icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}">
|
||||||
|
@ -70,9 +72,10 @@ image/webp
|
||||||
<script type="text/javascript" src="{{- . -}}" async="" defer=""></script>
|
<script type="text/javascript" src="{{- . -}}" async="" defer=""></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<title>{{- template "instanceTitle" . -}}</title>
|
<title>{{- template "instanceTitle" . -}}</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="page">
|
|
||||||
<header class="page-header">
|
<body class="page">
|
||||||
|
<header class="page-header{{ if .largeHeader}} large{{end}}">
|
||||||
{{- include "page_header.tmpl" . | indent 3 }}
|
{{- include "page_header.tmpl" . | indent 3 }}
|
||||||
</header>
|
</header>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
@ -81,5 +84,6 @@ image/webp
|
||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
{{- include "page_footer.tmpl" . | indent 3 }}
|
{{- include "page_footer.tmpl" . | indent 3 }}
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue