Skip to content

Commit

Permalink
Improve profile readme rendering (#25988)
Browse files Browse the repository at this point in the history
- 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 <postmaster@gusted.xyz>
Conflicts:
	routers/web/user/profile.go
	inserted Metas:   map[string]string{"mode": "document"}, where
	it was missing
  • Loading branch information
earl-warren authored and crystalcommunication committed Aug 11, 2023
1 parent 0f5e07f commit 73967f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions routers/web/user/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/user.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 73967f5

Please sign in to comment.