Skip to content

Commit f155cf6

Browse files
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 <[email protected]>
1 parent 0f5e07f commit f155cf6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/web/user/profile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func Profile(ctx *context.Context) {
115115
profileContent, err := markdown.RenderString(&markup.RenderContext{
116116
Ctx: ctx,
117117
GitRepo: gitRepo,
118+
Metas: map[string]string{"mode": "document"},
118119
}, bytes)
119120
if err != nil {
120121
ctx.ServerError("RenderString", err)

web_src/css/user.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
}
123123

124124
#readme_profile {
125-
padding: 10px;
125+
padding: 1em 2em;
126126
border-radius: 0.28571429rem;
127127
background: var(--color-card);
128128
border: 1px solid var(--color-secondary);

0 commit comments

Comments
 (0)