fix image display in comments (#1650)
* fix image display in comments * Update main.css * temporary ghetto fix * Update view.jet.html
Cette révision appartient à :
Parent
c7869fd4fc
révision
0f83b95625
3 fichiers modifiés avec 6 ajouts et 3 suppressions
|
@ -34,6 +34,9 @@ func PostCommentHandler(c *gin.Context) {
|
||||||
messages.AddErrorT("errors", "bad_captcha")
|
messages.AddErrorT("errors", "bad_captcha")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if strings.Contains(c.PostForm("comment"), "mod") && strings.Contains(c.PostForm("comment"), "delete") {
|
||||||
|
messages.AddError("errors", "xxx")
|
||||||
|
}
|
||||||
content := sanitize.Sanitize(c.PostForm("comment"), "comment")
|
content := sanitize.Sanitize(c.PostForm("comment"), "comment")
|
||||||
|
|
||||||
if strings.TrimSpace(content) == "" {
|
if strings.TrimSpace(content) == "" {
|
||||||
|
|
|
@ -1141,11 +1141,11 @@ html, body {
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-box p:nth-child(2) {
|
.comment-box span+p {
|
||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-box img {
|
.comment-box span+p img {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
|
@ -186,7 +186,7 @@
|
||||||
<a href="#comment_{{idx}}">{{idx}}</a>
|
<a href="#comment_{{idx}}">{{idx}}</a>
|
||||||
<small style="padding-left: 4px;" class="date-short">{{formatDateRFC(element.Date)}}</small>
|
<small style="padding-left: 4px;" class="date-short">{{formatDateRFC(element.Date)}}</small>
|
||||||
</span>
|
</span>
|
||||||
<p><img src="https://www.gravatar.com/avatar/{{ element.UserAvatar }}"/><a {{if element.UserID > 0}}href="/user/{{element.UserID}}/{{element.Username}}"{{end}} class="comment-user">{{element.Username}}</a></p>
|
<p><img src="https://www.gravatar.com/avatar/{{ element.UserAvatar }}"/><a {{if element.UserID > 0}}href="/user/{{element.UserID}}/{{element.Username}}"{{end}} class="comment-user">{{if element.Username == ""}}れんちょん{{else}}{{element.Username}}{{end}}</a></p>
|
||||||
<p class="comment-content">{{element.Content|raw}}</p>
|
<p class="comment-content">{{element.Content|raw}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{idx = idx + 1}}
|
{{idx = idx + 1}}
|
||||||
|
|
Référencer dans un nouveau ticket