diff --git a/contrib/backends/srndv2/src/srnd/model_mem.go b/contrib/backends/srndv2/src/srnd/model_mem.go index 827d0ed..1ca0b5b 100644 --- a/contrib/backends/srndv2/src/srnd/model_mem.go +++ b/contrib/backends/srndv2/src/srnd/model_mem.go @@ -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)...) diff --git a/contrib/static/krane.css b/contrib/static/krane.css index 29daef1..3a10531 100644 --- a/contrib/static/krane.css +++ b/contrib/static/krane.css @@ -528,3 +528,8 @@ background-repeat: repeat; font-weight: bold; margin-left: none; } + +.bumplock { + background: red; + filter: saturate(0.5); +} diff --git a/contrib/templates/placebo/board.mustache b/contrib/templates/placebo/board.mustache index b5661c9..b53f6b9 100644 --- a/contrib/templates/placebo/board.mustache +++ b/contrib/templates/placebo/board.mustache @@ -41,8 +41,12 @@
{{{form}}} {{#board.Threads}} - {{#Truncate}} + {{#BumpLock}} +
+ {{^BumpLock}}
+ {{/BumpLock}} + {{#Truncate}} {{{OP.RenderPost}}}
{{MissingPostCount}} posts excluded
{{#Replies}} diff --git a/contrib/templates/placebo/thread.mustache b/contrib/templates/placebo/thread.mustache index 49f3545..cce0ed4 100644 --- a/contrib/templates/placebo/thread.mustache +++ b/contrib/templates/placebo/thread.mustache @@ -39,8 +39,11 @@
{{thread.Board}}

{{{form}}} - + {{#thread.BumpLock}} +
+ {{^thread.BumpLock}}
+ {{/thread.BumpLock}} {{{thread.OP.RenderPost}}} {{#thread.Replies}} {{{RenderPost}}} diff --git a/contrib/templates/placebo/ukko.mustache b/contrib/templates/placebo/ukko.mustache index 002de02..cf08f7a 100644 --- a/contrib/templates/placebo/ukko.mustache +++ b/contrib/templates/placebo/ukko.mustache @@ -45,8 +45,12 @@ {{/next}}
{{#threads}} - {{#Truncate}} + {{#BumpLock}} +
+ {{^BumpLock}}
+ {{/BumpLock}} + {{#Truncate}} Posted on {{Board}}
{{{OP.RenderTruncatedPost}}}