mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-25 16:49:26 +01:00
support contest mode
This commit is contained in:
parent
ced2d6f001
commit
357c6402cd
@ -28,6 +28,7 @@ module.exports = function(fetch) {
|
||||
ups: post.ups,
|
||||
id: post.id,
|
||||
domain: post.domain,
|
||||
contest_mode: post.contest_mode,
|
||||
comments: null,
|
||||
has_media: false,
|
||||
media: null,
|
||||
|
@ -474,7 +474,7 @@ module.exports = (app, redis, fetch, RedditAPI) => {
|
||||
sortby = config.post_comments_sort
|
||||
}
|
||||
|
||||
if(!['confidence', 'top', 'new', 'controversial', 'old', 'qa'].includes(sortby)) {
|
||||
if(!['confidence', 'top', 'new', 'controversial', 'old', 'qa', 'random'].includes(sortby)) {
|
||||
console.error(`Got invalid sort.`, req.originalUrl)
|
||||
return res.redirect('/')
|
||||
}
|
||||
|
@ -70,6 +70,10 @@ body.dark #post .infobar {
|
||||
background-color: #d2d2d2;
|
||||
color: #2f2f2f;
|
||||
}
|
||||
body.dark #post .infobar.blue {
|
||||
background: #c7e3f9;
|
||||
border: 1px solid #4b78a4;
|
||||
}
|
||||
body.dark #post .infobar a {
|
||||
color: #0356d4;
|
||||
}
|
||||
@ -660,6 +664,10 @@ input[type="submit"]:hover,
|
||||
float: left;
|
||||
width: calc(100% - 50px);
|
||||
}
|
||||
#post .infobar.blue {
|
||||
background: #eff8ff;
|
||||
border: 1px solid #93abc2;
|
||||
}
|
||||
#post header {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
@ -134,6 +134,9 @@ html
|
||||
a(href="" + post.media.source + "") [media]
|
||||
if post.selftext
|
||||
div.usertext-body !{post.selftext}
|
||||
if post.contest_mode
|
||||
.infobar.blue
|
||||
p this thread is in contest mode - contest mode randomizes comment sorting and hides scores.
|
||||
if viewing_comment
|
||||
.infobar
|
||||
p you are viewing a single comment's thread.
|
||||
|
Loading…
Reference in New Issue
Block a user