From f155cf60d31707f9bf969cc7a3c417d716aed257 Mon Sep 17 00:00:00 2001 From: crystal <71373843+crystalcommunication@users.noreply.github.com> Date: Fri, 11 Aug 2023 02:58:50 -0600 Subject: [PATCH] Improve profile readme rendering (#25988) (#26453) manual backport of #25988 to v1.20 - 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: Earl Warren <109468362+earl-warren@users.noreply.github.com> --- 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 6f9f84d60dbdf..a2f8d797be0f8 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -115,6 +115,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 54a966e7cb471..9fcdb3814aaad 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -122,7 +122,7 @@ } #readme_profile { - padding: 10px; + padding: 1em 2em; border-radius: 0.28571429rem; background: var(--color-card); border: 1px solid var(--color-secondary);