mirror of
https://codeberg.org/tacerus/teddit.git
synced 2025-01-07 20:02:32 +01:00
add nsfw tags
This commit is contained in:
parent
b014c950ef
commit
836438dfeb
19
dist/css/styles.css
vendored
19
dist/css/styles.css
vendored
@ -377,6 +377,18 @@ header .tabmenu li.active a {
|
|||||||
.green {
|
.green {
|
||||||
color: green !important;
|
color: green !important;
|
||||||
}
|
}
|
||||||
|
.tag {
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 4px;
|
||||||
|
margin: 2px 6px 0px 0px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 0.68rem;
|
||||||
|
}
|
||||||
|
.tag.nsfw {
|
||||||
|
border-color: #d10023;
|
||||||
|
color: #d10023;
|
||||||
|
}
|
||||||
input[type="submit"],
|
input[type="submit"],
|
||||||
.btn {
|
.btn {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
@ -514,12 +526,12 @@ input[type="submit"]:hover,
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
#links .link .entry .meta p.comments {
|
#links .link .entry .meta .links {
|
||||||
float: left;
|
float: left;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
}
|
}
|
||||||
#links .link .entry .meta p.comments a {
|
#links .link .entry .meta .links a {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: #888;
|
color: #888;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -537,7 +549,6 @@ input[type="submit"]:hover,
|
|||||||
#links.search .link .meta a.comments {
|
#links.search .link .meta a.comments {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* COMMENTS */
|
/* COMMENTS */
|
||||||
.comment {
|
.comment {
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
@ -987,12 +998,10 @@ input[type="submit"]:hover,
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
#user .entries .entry .title .meta a.comments {
|
#user .entries .entry .title .meta a.comments {
|
||||||
float: left;
|
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
#user .entries .entry a.comments.t1,#user .entries .entry a.context {
|
#user .entries .entry a.comments.t1,#user .entries .entry a.context {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
float: left;
|
|
||||||
}
|
}
|
||||||
#user .entries .entry a.context {
|
#user .entries .entry a.context {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
@ -21,6 +21,7 @@ module.exports = function(fetch) {
|
|||||||
link_flair_text: post.link_flair_text,
|
link_flair_text: post.link_flair_text,
|
||||||
name: post_id,
|
name: post_id,
|
||||||
num_comments: post.num_comments,
|
num_comments: post.num_comments,
|
||||||
|
over_18: post.over_18,
|
||||||
permalink: teddifyUrl(post.permalink),
|
permalink: teddifyUrl(post.permalink),
|
||||||
title: post.title,
|
title: post.title,
|
||||||
url: teddifyUrl(post.url),
|
url: teddifyUrl(post.url),
|
||||||
@ -81,6 +82,7 @@ module.exports = function(fetch) {
|
|||||||
title: post.crosspost.title,
|
title: post.crosspost.title,
|
||||||
name: post.crosspost.name,
|
name: post.crosspost.name,
|
||||||
num_comments: post.crosspost.num_comments,
|
num_comments: post.crosspost.num_comments,
|
||||||
|
over_18: post.crosspost.over_18,
|
||||||
id: post.crosspost.id,
|
id: post.crosspost.id,
|
||||||
permalink: teddifyUrl(post.crosspost.permalink),
|
permalink: teddifyUrl(post.crosspost.permalink),
|
||||||
ups: post.crosspost.ups,
|
ups: post.crosspost.ups,
|
||||||
|
@ -64,6 +64,7 @@ module.exports = function() {
|
|||||||
locked: data.locked,
|
locked: data.locked,
|
||||||
media: data.media,
|
media: data.media,
|
||||||
num_comments: data.num_comments,
|
num_comments: data.num_comments,
|
||||||
|
over_18: data.over_18,
|
||||||
permalink: data.permalink,
|
permalink: data.permalink,
|
||||||
score: data.score,
|
score: data.score,
|
||||||
subreddit: data.subreddit,
|
subreddit: data.subreddit,
|
||||||
|
@ -62,6 +62,7 @@ module.exports = function() {
|
|||||||
edited: post.edited,
|
edited: post.edited,
|
||||||
selftext_html: unescape(post.selftext_html),
|
selftext_html: unescape(post.selftext_html),
|
||||||
num_comments: post.num_comments,
|
num_comments: post.num_comments,
|
||||||
|
over_18: post.over_18,
|
||||||
permalink: post.permalink,
|
permalink: post.permalink,
|
||||||
user_flair: await formatUserFlair(post)
|
user_flair: await formatUserFlair(post)
|
||||||
}
|
}
|
||||||
@ -78,6 +79,7 @@ module.exports = function() {
|
|||||||
edited: post.edited,
|
edited: post.edited,
|
||||||
body_html: unescape(post.body_html),
|
body_html: unescape(post.body_html),
|
||||||
num_comments: post.num_comments,
|
num_comments: post.num_comments,
|
||||||
|
over_18: post.over_18,
|
||||||
permalink: post.permalink,
|
permalink: post.permalink,
|
||||||
link_author: post.link_author,
|
link_author: post.link_author,
|
||||||
link_title: post.link_title,
|
link_title: post.link_title,
|
||||||
|
@ -33,6 +33,9 @@ html
|
|||||||
a(href="/u/" + post.author + "")
|
a(href="/u/" + post.author + "")
|
||||||
| #{post.author}
|
| #{post.author}
|
||||||
!= post.user_flair
|
!= post.user_flair
|
||||||
|
.links
|
||||||
|
if post.over_18
|
||||||
|
span.tag.nsfw NSFW
|
||||||
if post.crosspost.is_crosspost === true
|
if post.crosspost.is_crosspost === true
|
||||||
.crosspost
|
.crosspost
|
||||||
.title
|
.title
|
||||||
|
@ -105,7 +105,9 @@ html
|
|||||||
| #{link.subreddit}
|
| #{link.subreddit}
|
||||||
if link.stickied
|
if link.stickied
|
||||||
span(class="green") stickied
|
span(class="green") stickied
|
||||||
p.comments
|
.links
|
||||||
|
if link.over_18
|
||||||
|
span.tag.nsfw NSFW
|
||||||
a(href="" + link.permalink + "", class="comments")
|
a(href="" + link.permalink + "", class="comments")
|
||||||
| #{link.num_comments} comments
|
| #{link.num_comments} comments
|
||||||
if json.info.before || json.info.after
|
if json.info.before || json.info.after
|
||||||
|
@ -86,6 +86,8 @@ html
|
|||||||
| to
|
| to
|
||||||
!= post.user_flair
|
!= post.user_flair
|
||||||
a(href="/r/" + post.subreddit + "", class="subreddit") #{post.subreddit}
|
a(href="/r/" + post.subreddit + "", class="subreddit") #{post.subreddit}
|
||||||
|
if post.over_18
|
||||||
|
span.tag.nsfw NSFW
|
||||||
a.comments(href="" + post.permalink + "") #{post.num_comments} comments
|
a.comments(href="" + post.permalink + "") #{post.num_comments} comments
|
||||||
if post.type === 't1'
|
if post.type === 't1'
|
||||||
.entry
|
.entry
|
||||||
@ -116,6 +118,8 @@ html
|
|||||||
p.created(title="" + toUTCString(post.created) + "") #{timeDifference(post.created)}
|
p.created(title="" + toUTCString(post.created) + "") #{timeDifference(post.created)}
|
||||||
.body
|
.body
|
||||||
div !{post.body_html}
|
div !{post.body_html}
|
||||||
|
if post.over_18
|
||||||
|
span.tag.nsfw NSFW
|
||||||
a.context(href="" + post.permalink + "?context=10") context
|
a.context(href="" + post.permalink + "?context=10") context
|
||||||
a.comments.t1(href="" + post.url + "") full comments (#{post.num_comments})
|
a.comments.t1(href="" + post.url + "") full comments (#{post.num_comments})
|
||||||
if data.before || data.after
|
if data.before || data.after
|
||||||
|
Loading…
Reference in New Issue
Block a user