mirror of https://gitlab.com/bashrc2/epicyon
Show moderatable newswire items in a different color
parent
e0ec134810
commit
1a284f3567
|
@ -68,6 +68,8 @@
|
||||||
--quote-font-size: 120%;
|
--quote-font-size: 120%;
|
||||||
--line-spacing: 130%;
|
--line-spacing: 130%;
|
||||||
--line-spacing-newswire: 100%;
|
--line-spacing-newswire: 100%;
|
||||||
|
--newswire-item-moderated-color: green;
|
||||||
|
--newswire-date-moderated-color: lightgreen;
|
||||||
--column-left-width: 10vw;
|
--column-left-width: 10vw;
|
||||||
--column-center-width: 80vw;
|
--column-center-width: 80vw;
|
||||||
--column-right-width: 10vw;
|
--column-right-width: 10vw;
|
||||||
|
@ -233,6 +235,19 @@ a:focus {
|
||||||
line-height: var(--line-spacing-newswire);
|
line-height: var(--line-spacing-newswire);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.newswireItemModerated {
|
||||||
|
font-size: var(--font-size-newswire);
|
||||||
|
color: var(--newswire-item-moderated-color);
|
||||||
|
line-height: var(--line-spacing-newswire);
|
||||||
|
}
|
||||||
|
|
||||||
|
.newswireDateModerated {
|
||||||
|
font-size: var(--font-size-newswire);
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--newswire-date-moderated-color);
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.newswireItemVotedOn a:link {
|
.newswireItemVotedOn a:link {
|
||||||
background: var(--newswire-voted-background-color);
|
background: var(--newswire-voted-background-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5416,25 +5416,30 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool,
|
||||||
else:
|
else:
|
||||||
totalVotesStr = ''
|
totalVotesStr = ''
|
||||||
totalVotes = 0
|
totalVotes = 0
|
||||||
|
moderatedItem = False
|
||||||
if moderator:
|
if moderator:
|
||||||
|
moderatedItem = item[5]
|
||||||
totalVotes = votesOnNewswireItem(item[2])
|
totalVotes = votesOnNewswireItem(item[2])
|
||||||
# show a number of ticks or crosses for how many
|
# show a number of ticks or crosses for how many
|
||||||
# votes for or against
|
# votes for or against
|
||||||
totalVotesStr = \
|
totalVotesStr = \
|
||||||
votesIndicator(totalVotes, positiveVoting)
|
votesIndicator(totalVotes, positiveVoting)
|
||||||
|
|
||||||
htmlStr += '<p class="newswireItem">' + \
|
if moderator and moderatedItem:
|
||||||
|
htmlStr += '<p class="newswireItemModerated">' + \
|
||||||
'<a href="' + item[1] + '">' + item[0] + '</a>' + \
|
'<a href="' + item[1] + '">' + item[0] + '</a>' + \
|
||||||
totalVotesStr
|
totalVotesStr
|
||||||
if moderator:
|
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<a href="/users/' + nickname + \
|
'<a href="/users/' + nickname + \
|
||||||
'/newswirevote=' + dateStrLink + '" ' + \
|
'/newswirevote=' + dateStrLink + '" ' + \
|
||||||
'title="' + translate['Vote'] + '">' + \
|
'title="' + translate['Vote'] + '">' + \
|
||||||
'<label class="newswireDate">'
|
'<label class="newswireDateModerated">'
|
||||||
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
|
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
|
||||||
else:
|
else:
|
||||||
|
htmlStr += '<p class="newswireItem">' + \
|
||||||
|
'<a href="' + item[1] + '">' + item[0] + '</a>' + \
|
||||||
|
totalVotesStr
|
||||||
htmlStr += ' <label class="newswireDate">'
|
htmlStr += ' <label class="newswireDate">'
|
||||||
htmlStr += dateStr.replace('+00:00', '') + '</label></p>'
|
htmlStr += dateStr.replace('+00:00', '') + '</label></p>'
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
Loading…
Reference in New Issue