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 <postmaster@gusted.xyz>
Conflicts:
	routers/web/user/profile.go
	inserted Metas:   map[string]string{"mode": "document"}, where
	it was missing
This commit is contained in:
Earl Warren 2023-07-20 00:22:32 +02:00 committed by Earl Warren
parent 5d3cfbd2ba
commit 84c3b60a4c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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);