html: add cookie data attributes to <body> tag.

* Add `data-cookie-*` attributes to the <body> tag
* Add a `post-preview-show-votes` class to thumbnails.

Ref: https://github.com/danbooru/danbooru/issues/4930#issuecomment-978064810
This commit is contained in:
evazion
2021-12-09 16:21:52 -06:00
parent 7976d12cd0
commit 00153b9214
2 changed files with 34 additions and 13 deletions

View File

@@ -80,6 +80,7 @@ class PostPreviewComponent < ApplicationComponent
klass << "post-status-deleted" if post.is_deleted?
klass << "post-status-has-parent" if post.parent_id
klass << "post-status-has-children" if post.has_visible_children?
klass << "post-preview-show-votes" if show_votes
klass << "post-preview-fit-#{fit}"
klass << "post-preview-#{size}"
klass