Archived
1
0

add bumplock css

This commit is contained in:
Jeff Becker 2018-03-09 07:01:33 -05:00
parent 702ab469cd
commit 024f773a7c
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
5 changed files with 23 additions and 3 deletions

View File

@ -731,6 +731,10 @@ func (self *thread) HasOmittedImages() bool {
return self.truncatedImageCount > 0 return self.truncatedImageCount > 0
} }
func (self *thread) BumpLock() bool {
return len(self.Posts) >= BumpLimit
}
func (self *thread) Update(db Database) { func (self *thread) Update(db Database) {
root := self.Posts[0].MessageID() root := self.Posts[0].MessageID()
self.Posts = append([]PostModel{self.Posts[0]}, db.GetThreadReplyPostModels(self.prefix, root, 0, 0)...) self.Posts = append([]PostModel{self.Posts[0]}, db.GetThreadReplyPostModels(self.prefix, root, 0, 0)...)

View File

@ -528,3 +528,8 @@ background-repeat: repeat;
font-weight: bold; font-weight: bold;
margin-left: none; margin-left: none;
} }
.bumplock {
background: red;
filter: saturate(0.5);
}

View File

@ -41,8 +41,12 @@
<br /> <br />
{{{form}}} {{{form}}}
{{#board.Threads}} {{#board.Threads}}
{{#Truncate}} {{#BumpLock}}
<div class="thread bumplock" id="thread_{{OP.PostHash}}">
{{^BumpLock}}
<div class="thread" id="thread_{{OP.PostHash}}"> <div class="thread" id="thread_{{OP.PostHash}}">
{{/BumpLock}}
{{#Truncate}}
{{{OP.RenderPost}}} {{{OP.RenderPost}}}
<div class="excluded">{{MissingPostCount}} posts excluded</div> <div class="excluded">{{MissingPostCount}} posts excluded</div>
{{#Replies}} {{#Replies}}

View File

@ -39,8 +39,11 @@
<center><b><a href="{{thread.BoardURL}}">{{thread.Board}}</a></b></center> <center><b><a href="{{thread.BoardURL}}">{{thread.Board}}</a></b></center>
<br /> <br />
{{{form}}} {{{form}}}
{{#thread.BumpLock}}
<div class="thread bumplock" id="thread_{{thread.OP.PostHash}}">
{{^thread.BumpLock}}
<div class="thread" id="thread_{{thread.OP.PostHash}}"> <div class="thread" id="thread_{{thread.OP.PostHash}}">
{{/thread.BumpLock}}
{{{thread.OP.RenderPost}}} {{{thread.OP.RenderPost}}}
{{#thread.Replies}} {{#thread.Replies}}
{{{RenderPost}}} {{{RenderPost}}}

View File

@ -45,8 +45,12 @@
{{/next}} {{/next}}
</div> </div>
{{#threads}} {{#threads}}
{{#Truncate}} {{#BumpLock}}
<div class="thread bumplock" id="thread_{{OP.PostHash}}">
{{^BumpLock}}
<div class="thread" id="thread_{{OP.PostHash}}"> <div class="thread" id="thread_{{OP.PostHash}}">
{{/BumpLock}}
{{#Truncate}}
Posted on <a href="{{BoardURL}}">{{Board}}</a> Posted on <a href="{{BoardURL}}">{{Board}}</a>
<br /> <br />
{{{OP.RenderTruncatedPost}}} {{{OP.RenderTruncatedPost}}}