fix(profile): flat header with correct spacing, complete missing utility classes
beca172
Файлы на момент коммита
- drop the boxed hero card; profile header is now a flat section with a divider - explicit margin between avatar and text so display name/username/badges align - add gap-5, gap-1.5, mb-1.5, pt-1, relative rules that were missing from the built CSS
R
rin
·
2026-10-16 16:36 UTC
3 файла изменено
+22
-10
assets/input.css
+7
-1
| ... | ... | @@ -1336,4 +1336,10 @@ kbd, .kbd { |
| 1336 | 1336 | border-color: hsl(var(--foreground) / 0.6); |
| 1337 | 1337 | background: hsl(var(--muted) / 0.5); |
| 1338 | 1338 | color: hsl(var(--foreground)); |
| 1339 | -} | |
| 1339 | +} | |
| 1340 | +/* Utility completion (classes used in templates but absent from the build) */ | |
| 1341 | +.relative { position: relative; } | |
| 1342 | +.gap-1\.5 { gap: 0.375rem; } | |
| 1343 | +.gap-5 { gap: 1.25rem; } | |
| 1344 | +.mb-1\.5 { margin-bottom: 0.375rem; } | |
| 1345 | +.pt-1 { padding-top: 0.25rem; } |
internal/web/static/css/app.css
+7
-1
| ... | ... | @@ -1337,4 +1337,10 @@ kbd, .kbd { |
| 1337 | 1337 | border-color: hsl(var(--foreground) / 0.6); |
| 1338 | 1338 | background: hsl(var(--muted) / 0.5); |
| 1339 | 1339 | color: hsl(var(--foreground)); |
| 1340 | -} | |
| 1340 | +} | |
| 1341 | +/* Utility completion (classes used in templates but absent from the build) */ | |
| 1342 | +.relative { position: relative; } | |
| 1343 | +.gap-1\.5 { gap: 0.375rem; } | |
| 1344 | +.gap-5 { gap: 1.25rem; } | |
| 1345 | +.mb-1\.5 { margin-bottom: 0.375rem; } | |
| 1346 | +.pt-1 { padding-top: 0.25rem; } |
internal/web/views/pages/profile.html
+8
-8
| ... | ... | @@ -1,10 +1,10 @@ |
| 1 | 1 | {{define "content"}} |
| 2 | 2 | <div class="container"> |
| 3 | - <!-- Profile hero --> | |
| 4 | - <section class="card mb-4" style="padding:1.5rem;"> | |
| 5 | - <div class="flex items-start gap-5 flex-wrap"> | |
| 3 | + <!-- Profile --> | |
| 4 | + <section class="mb-4" style="padding-bottom:1.4rem;border-bottom:1px solid hsl(var(--border));"> | |
| 5 | + <div class="flex items-start flex-wrap"> | |
| 6 | 6 | {{avatar .ProfileUser.Username .ProfileUser.AvatarURL "avatar-xxl"}} |
| 7 | - <div class="min-w-0 flex-1" style="min-width:15rem;"> | |
| 7 | + <div class="flex-1 min-w-0" style="margin-left:1.6rem;min-width:15rem;"> | |
| 8 | 8 | <div class="flex items-center gap-2 flex-wrap"> |
| 9 | 9 | <h1 class="text-2xl font-bold" style="margin:0;line-height:1.15;"> |
| 10 | 10 | {{if .ProfileUser.FullName}}{{.ProfileUser.FullName}}{{else}}{{.ProfileUser.Username}}{{end}} |
| ... | ... | @@ -13,13 +13,13 @@ |
| 13 | 13 | <span class="badge badge-primary">{{t .Lang "admin.role.admin"}}</span> |
| 14 | 14 | {{end}} |
| 15 | 15 | </div> |
| 16 | - <div class="text-sm text-muted font-mono" style="margin-top:0.2rem;">@{{.ProfileUser.Username}}</div> | |
| 16 | + <div class="text-sm text-muted font-mono" style="margin-top:0.3rem;">@{{.ProfileUser.Username}}</div> | |
| 17 | 17 | |
| 18 | 18 | {{if .ProfileUser.Bio}} |
| 19 | - <p class="text-sm" style="margin:0.65rem 0 0;max-width:44rem;">{{.ProfileUser.Bio}}</p> | |
| 19 | + <p class="text-sm" style="margin:0.7rem 0 0;max-width:44rem;">{{.ProfileUser.Bio}}</p> | |
| 20 | 20 | {{end}} |
| 21 | 21 | |
| 22 | - <div class="flex items-center flex-wrap gap-2" style="margin-top:0.85rem;"> | |
| 22 | + <div class="flex items-center flex-wrap gap-2" style="margin-top:0.9rem;"> | |
| 23 | 23 | {{if .ProfileUser.Location}} |
| 24 | 24 | <span class="profile-chip">{{icon "map-pin" "size-3.5"}}<span>{{.ProfileUser.Location}}</span></span> |
| 25 | 25 | {{end}} |
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | </div> |
| 31 | 31 | </div> |
| 32 | 32 | |
| 33 | - <div class="flex items-center gap-2"> | |
| 33 | + <div class="flex items-center gap-2" style="margin-left:auto;"> | |
| 34 | 34 | {{if .CurrentUser}} |
| 35 | 35 | {{if eq .CurrentUser.ID .ProfileUser.ID}} |
| 36 | 36 | <a href="/settings" class="btn btn-outline btn-sm"> |