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
}
func (self *thread) BumpLock() bool {
return len(self.Posts) >= BumpLimit
}
func (self *thread) Update(db Database) {
root := self.Posts[0].MessageID()
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;
margin-left: none;
}
.bumplock {
background: red;
filter: saturate(0.5);
}

View File

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

View File

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

View File

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