From 84c3b60a4ce8fe30356d4c3464ec8dbeb08ec139 Mon Sep 17 00:00:00 2001 From: Earl Warren <109468362+earl-warren@users.noreply.github.com> Date: Thu, 20 Jul 2023 00:22:32 +0200 Subject: [PATCH] Improve profile readme rendering (#25988) - Tell the renderer to use the `document` mode, so it's consistent with other renderers. - Use the same padding as `.file-view.markup`, so it's consistent with other containers that contain markup rendering. - Resolves https://codeberg.org/forgejo/forgejo/issues/833 Co-authored-by: Gusted Conflicts: routers/web/user/profile.go inserted Metas: map[string]string{"mode": "document"}, where it was missing --- routers/web/user/profile.go | 1 + web_src/css/user.css | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index d103ed4ae2..21ac984c2c 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -120,6 +120,7 @@ func Profile(ctx *context.Context) { profileContent, err := markdown.RenderString(&markup.RenderContext{ Ctx: ctx, GitRepo: gitRepo, + Metas: map[string]string{"mode": "document"}, }, bytes) if err != nil { ctx.ServerError("RenderString", err) diff --git a/web_src/css/user.css b/web_src/css/user.css index 71b4232b58..86974591a9 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -126,7 +126,7 @@ } #readme_profile { - padding: 10px; + padding: 1em 2em; border-radius: 0.28571429rem; background: var(--color-card); border: 1px solid var(--color-secondary);