post tooltips: add header bar with more post info.

Add a header bar containing the following information:

* Uploader + top tagger + upload date
* Score, favorite count, comment count
* Rating
* Source (Pixiv, Twitter, etc)
* Image dimensions

Also list series pools with tags.
This commit is contained in:
evazion
2018-05-07 01:36:15 -05:00
parent 27ca4f7cb1
commit a22bf20230
4 changed files with 96 additions and 20 deletions

View File

@@ -509,6 +509,15 @@ class Post < ApplicationRecord
source
end
end
def source_domain
return "" unless source =~ %r!\Ahttps?://!i
url = Addressable::URI.parse(normalized_source)
url.domain
rescue
""
end
end
module TagMethods