add css for highliting a specific forum post

This commit is contained in:
r888888888
2017-01-23 12:15:30 -08:00
parent 5404c1d231
commit e699684c61
3 changed files with 9 additions and 1 deletions

View File

@@ -9,6 +9,10 @@ div.list-of-forum-posts {
margin-bottom: 3em;
word-wrap: break-word;
&:target {
background-color: #FFC;
}
div.author {
width: 12em;
float: left;

View File

@@ -154,6 +154,10 @@ class ForumTopic < ActiveRecord::Base
self.updater_id = CurrentUser.id
end
def page_for(post_id)
(posts.where("id < ?", post_id).count / Danbooru.config.posts_per_page.to_f).ceil
end
def last_page
(response_count / Danbooru.config.posts_per_page.to_f).ceil
end

View File

@@ -74,7 +74,7 @@ class PostArchive < ActiveRecord::Base
sqs_service.send_message(msg)
end
def export_to_archives(version_id = 1451061)
def export_to_archives(version_id = 4394763)
PostVersion.where("id > ?", version_id).find_each do |version|
previous = version.previous
tags = version.tags.scan(/\S+/)