Add support for viewing comments without js

Improve stylings
This commit is contained in:
ChunkyProgrammer
2023-09-27 18:40:50 -04:00
parent 4f25069f55
commit f77e4378fe
3 changed files with 39 additions and 5 deletions

View File

@@ -2,10 +2,27 @@
<title>Invidious</title>
<% end %>
<div id="post" class="comments">
<%= IV::Frontend::Comments.template_youtube(post_response.not_nil!, locale, thin_mode) %>
</div>
<div id="comments" class="comments">
<div>
<div id="post" class="comments post-comments">
<%= IV::Frontend::Comments.template_youtube(post_response.not_nil!, locale, thin_mode) %>
</div>
<% if nojs %>
<hr>
<% end %>
<br />
<div id="comments" class="comments post-comments">
<% if nojs %>
<%= comment_html %>
<% else %>
<noscript>
<a href="/post/<%= id %>?ucid=<%= ucid %>&nojs=1">
<%= translate(locale, "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.") %>
</a>
</noscript>
<% end %>
</div>
</div>
<script id="video_data" type="application/json">