From 86471e010a1c15b6621db2e6c11eea86d5f1baa1 Mon Sep 17 00:00:00 2001 From: f0x Date: Wed, 10 May 2023 20:18:50 +0200 Subject: [PATCH] profile responsiveness, accessibility tweaks --- web/source/css/profile.css | 42 +++--------- web/template/profile.tmpl | 137 ++++++++++++++++++++----------------- 2 files changed, 84 insertions(+), 95 deletions(-) diff --git a/web/source/css/profile.css b/web/source/css/profile.css index 44cf754d1..04c4d6cd1 100644 --- a/web/source/css/profile.css +++ b/web/source/css/profile.css @@ -27,22 +27,18 @@ main.profile { padding: 0.5rem; border-radius: $br; - display: grid; - grid-template-rows: auto auto; - grid-template-columns: 35fr 65fr; - grid-template-areas: - "header header" - "about toots"; - - gap: 1rem; + .column-split { + display: flex; + flex-wrap: wrap; + gap: 1rem; + } } main.profile .header { - grid-area: header; - background: $bg-accent; border-radius: $br; overflow: hidden; + margin-bottom: 1rem; .header-image { position: relative; @@ -165,7 +161,6 @@ main.profile { } &.pinned { - margin: 0 1rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; @@ -178,29 +173,12 @@ main.profile { } main.profile .toots { - grid-area: toots; - + flex: 65 25rem; display: flex; flex-direction: column; gap: 0.4rem; - .col-header { - margin: 0; - background: $gray4; - border-top-left-radius: $br; - border-top-right-radius: $br; - padding: 0.75rem; - } - .toot { - padding-top: 0.75rem; - box-shadow: none; - border: none; - - .contentgrid { - padding: 0 0.75rem; - } - .info { padding: 0.3rem 0.75rem; } @@ -212,7 +190,7 @@ main.profile .toots { } main.profile .about-user { - grid-area: about; + flex: 35 14rem; border-radius: $br; overflow: hidden; @@ -237,10 +215,6 @@ main.profile .about-user { &:first-child { border-top: 0.1rem solid $gray2; } - - b { - color: $fg-accent; - } } } diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index 49ef3c054..5e4bd9c0f 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -26,7 +26,7 @@ {{ end }} -
+ +
+ Profile for + {{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}. + Username @{{.account.Username}}, {{acctInstance .account.Acct}} +
-
-
-

About

-
+
-
- {{ range .account.Fields }} -
- {{.Name}} - {{.Value}} +
+
+

About

- {{ end }} -
-
- {{ if .account.Note }} - {{emojify .account.Emojis (noescape .account.Note)}} - {{else}} - This GoToSocial user hasn't written a bio yet! - {{end}} -
+
+ {{ range .account.Fields }} +
+ {{.Name}} + {{.Value}} +
+ {{ end }} +
-
- Joined - Posts{{.account.StatusesCount}} - Followed by{{.account.FollowersCount}} - Following{{.account.FollowingCount}} -
-
+
+ {{ if .account.Note }} + {{emojify .account.Emojis (noescape .account.Note)}} + {{else}} + This GoToSocial user hasn't written a bio yet! + {{end}} +
-
- {{ if .pinned_statuses }} -
-

Pinned posts

- jump to recent -
-
- {{ range .pinned_statuses }} -
- {{ template "status.tmpl" .}} -
- {{ end }} -
- {{ end }} +
+ Joined on {{.account.CreatedAt | timestampVague}}. + {{.account.StatusesCount}} post{{if .account.StatusesCount | eq 1 | not}}s{{end}}. + Followed by {{.account.FollowersCount}}. + Following {{.account.FollowingCount}}. +
-
-

Recent posts

-
- -
- {{ if not .statuses }} -
Nothing here!
- {{ else }} - {{ range .statuses }} -
- {{ template "status.tmpl" .}} -
- {{ end }} - {{ end }} +
- + +
+

Recent posts

+
+ +
+ {{ if not .statuses }} +
Nothing here!
+ {{ else }} + {{ range .statuses }} +
+ {{ template "status.tmpl" .}} +
+ {{ end }} + {{ end }} +
+ + +