aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-08-05 09:48:37 +0200
committerGitHub <noreply@github.com>2020-08-05 15:48:37 +0800
commit2872a04f2796b369fb388c6f34780bbda2e64710 (patch)
tree958a4814c21b3cee8ff2ee1ce9a8f8d01ad85bec /templates/user
parent6ab4d76ced00415bff636865e6b14c547bd357c8 (diff)
downloadgitea-2872a04f2796b369fb388c6f34780bbda2e64710.tar.gz
gitea-2872a04f2796b369fb388c6f34780bbda2e64710.zip
UserProfile Page: Render Description (#12415)
* If Description contain more that one line render it * simpler ... * only render if description exists * Fix NPE in tests * Update routers/user/profile.go Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/profile.tmpl5
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 563bc78307..bc2960b3b9 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -34,10 +34,9 @@
<a target="_blank" rel="noopener noreferrer me" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
</li>
{{end}}
- {{if .Owner.Description}}
+ {{if $.RenderedDescription}}
<li>
- {{svg "octicon-info" 16}}
- <span>{{.Owner.Description}}</span>
+ <div class="render-content markdown">{{$.RenderedDescription|Str2html}}</div>
</li>
{{end}}
{{range .OpenIDs}}