Merge pull request '[GITEA]: Improve profile readme rendering' (#1068) from Gusted/forgejo:profile-readme-consitency into forgejo-dependency

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1068
This commit is contained in:
Earl Warren 2023-07-19 12:16:20 +00:00
commit a3e829f247
2 changed files with 6 additions and 2 deletions

View file

@ -232,7 +232,11 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileGi
if bytes, err := profileReadme.GetBlobContent(setting.UI.MaxDisplayFileSize); err != nil { if bytes, err := profileReadme.GetBlobContent(setting.UI.MaxDisplayFileSize); err != nil {
log.Error("failed to GetBlobContent: %v", err) log.Error("failed to GetBlobContent: %v", err)
} else { } else {
if profileContent, err := markdown.RenderString(&markup.RenderContext{Ctx: ctx, GitRepo: profileGitRepo}, bytes); err != nil { if profileContent, err := markdown.RenderString(&markup.RenderContext{
Ctx: ctx,
GitRepo: profileGitRepo,
Metas: map[string]string{"mode": "document"},
}, bytes); err != nil {
log.Error("failed to RenderString: %v", err) log.Error("failed to RenderString: %v", err)
} else { } else {
ctx.Data["ProfileReadme"] = profileContent ctx.Data["ProfileReadme"] = profileContent

View file

@ -122,7 +122,7 @@
} }
#readme_profile { #readme_profile {
padding: 10px; padding: 1em 2em;
border-radius: 0.28571429rem; border-radius: 0.28571429rem;
background: var(--color-card); background: var(--color-card);
border: 1px solid var(--color-secondary); border: 1px solid var(--color-secondary);