diff --git a/controllers/torrent/comment.go b/controllers/torrent/comment.go index 6aa8fc28..dc33a971 100644 --- a/controllers/torrent/comment.go +++ b/controllers/torrent/comment.go @@ -34,6 +34,9 @@ func PostCommentHandler(c *gin.Context) { 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") if strings.TrimSpace(content) == "" { diff --git a/public/css/main.css b/public/css/main.css index 9dc73561..7d520367 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1141,11 +1141,11 @@ html, body { text-align: justify; } -.comment-box p:nth-child(2) { +.comment-box span+p { margin-top: 9px; } -.comment-box img { +.comment-box span+p img { width: 50px; height: 50px; float: left; diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index a08496c9..32289a45 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -186,7 +186,7 @@ {{idx}} {{formatDateRFC(element.Date)}} -

0}}href="/user/{{element.UserID}}/{{element.Username}}"{{end}} class="comment-user">{{element.Username}}

+

0}}href="/user/{{element.UserID}}/{{element.Username}}"{{end}} class="comment-user">{{if element.Username == ""}}れんちょん{{else}}{{element.Username}}{{end}}

{{element.Content|raw}}

{{idx = idx + 1}}