From 337dffaab925738c99c03433e0c60870d5663cb7 Mon Sep 17 00:00:00 2001 From: f0x Date: Tue, 30 Jul 2024 17:13:15 +0200 Subject: [PATCH] move pageType to body class --- internal/web/profile.go | 1 + web/source/css/layout/page.css | 38 +++++++++++++++++----------------- web/template/page.tmpl | 4 ++-- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/internal/web/profile.go b/internal/web/profile.go index ce28f02d1..3950d46ad 100644 --- a/internal/web/profile.go +++ b/internal/web/profile.go @@ -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, diff --git a/web/source/css/layout/page.css b/web/source/css/layout/page.css index fd336b47b..b7b4567fa 100644 --- a/web/source/css/layout/page.css +++ b/web/source/css/layout/page.css @@ -86,34 +86,34 @@ .page-content { grid-column: 2; align-self: start; +} - &.with-sidebar { - grid-column: 1 / span 2; - display: grid; - grid-template-columns: 1fr minmax(auto, 50rem); - grid-template-columns: 1fr min(92%, 50rem); +.page.with-sidebar .page-content { + grid-column: 1 / span 2; + display: grid; + grid-template-columns: 1fr minmax(auto, 50rem); + grid-template-columns: 1fr min(92%, 50rem); - .sidebar { - display: inline-block; - align-self: start; - justify-self: end; - position: sticky; - top: 0; - padding: 0 1.5rem; + .sidebar { + display: inline-block; + align-self: start; + justify-self: end; + position: sticky; + top: 0; + padding: 0 1.5rem; - ol { - margin-top: 0; - } + ol { + margin-top: 0; + } - h2 { - margin-top: 1.5rem; - } + h2 { + margin-top: 1.5rem; } } } @media screen and (max-width: 80rem) { - .page-content.with-sidebar { + .page.with-sidebar .page-content { grid-column: 2; display: flex; flex-direction: column; diff --git a/web/template/page.tmpl b/web/template/page.tmpl index 19f3e0d60..0bf33addd 100644 --- a/web/template/page.tmpl +++ b/web/template/page.tmpl @@ -74,11 +74,11 @@ image/webp {{- template "instanceTitle" . -}} - +
{{- include "page_header.tmpl" . | indent 3 }}
-
+
{{- include .pageContent . | indent 3 | outdentPre }}