move pageType to body class

This commit is contained in:
f0x 2024-07-30 17:13:15 +02:00
parent 0d3548ff5d
commit 337dffaab9
3 changed files with 22 additions and 21 deletions

View File

@ -156,6 +156,7 @@ func (m *Module) profileGETHandler(c *gin.Context) {
Javascript: []string{jsFrontend},
Extra: map[string]any{
"account": targetAccount,
"pageType": "wider",
"rssFeed": rssFeed,
"robotsMeta": robotsMeta,
"statuses": statusResp.Items,

View File

@ -86,8 +86,9 @@
.page-content {
grid-column: 2;
align-self: start;
}
&.with-sidebar {
.page.with-sidebar .page-content {
grid-column: 1 / span 2;
display: grid;
grid-template-columns: 1fr minmax(auto, 50rem);
@ -110,10 +111,9 @@
}
}
}
}
@media screen and (max-width: 80rem) {
.page-content.with-sidebar {
.page.with-sidebar .page-content {
grid-column: 2;
display: flex;
flex-direction: column;

View File

@ -74,11 +74,11 @@ image/webp
<title>{{- template "instanceTitle" . -}}</title>
</head>
<body class="page">
<body class="page{{if .pageType}} {{.pageType}}{{end}}">
<header class="page-header{{if .largeHeader}} large{{end}}">
{{- include "page_header.tmpl" . | indent 3 }}
</header>
<div class="page-content{{if .pageType}} {{.pageType}}{{end}}">
<div class="page-content">
{{- include .pageContent . | indent 3 | outdentPre }}
</div>
<footer class="page-footer">