diff --git a/src/Moonglade.Web/Pages/Post.cshtml b/src/Moonglade.Web/Pages/Post.cshtml index 3c7c5fec6..89af74f63 100644 --- a/src/Moonglade.Web/Pages/Post.cshtml +++ b/src/Moonglade.Web/Pages/Post.cshtml @@ -92,8 +92,6 @@ } - var pid = document.querySelector('article').dataset.postid; - window.fitImageToDevicePixelRatio = @BlogConfig.ImageSettings.FitImageToDevicePixelRatio.ToString().ToLower(); var q = new QRious({ @@ -104,6 +102,7 @@ $('#comment-form').on('submit', function (e) { e.preventDefault(); + let pid = document.querySelector('article').dataset.postid; viewpost.submitComment(pid); }); @@ -185,6 +184,7 @@ } + @if (BlogConfig.ContentSettings.EnableComments) { var days = DateTime.UtcNow.Date.Subtract(Model.Post.PubDateUtc.GetValueOrDefault()).Days; @@ -201,13 +201,13 @@
@if (Model.Post.CommentEnabled) { -
+
@SharedLocalizer["Comments"]
-
+ } else {