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

@@ -83,9 +83,11 @@ module ApplicationHelper
raw content_tag(:time, duration, datetime: datetime, title: title)
end
def time_ago_in_words_tagged(time)
def time_ago_in_words_tagged(time, compact: false)
if time.past?
raw time_tag(time_ago_in_words(time) + " ago", time)
text = time_ago_in_words(time) + " ago"
text = text.gsub(/almost|about|over/, "") if compact
raw time_tag(text, time)
else
raw time_tag("in " + distance_of_time_in_words(Time.now, time), time)
end