Skip to content

Commit

Permalink
Changed some more styling for citations
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthyG committed Nov 19, 2017
1 parent 76db7f3 commit 561e5e4
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 12 deletions.
19 changes: 16 additions & 3 deletions css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -1727,15 +1727,28 @@ ul.unstyled {
float: right;
}

.card>.card-body>.quote>blockquote>by {
.card>.card-body>.quote>blockquote {
margin: 0;
border-width: 0.2rem;
border-color: #1DE9B6;
-webkit-border-radius: 0.1rem; -moz-border-radius: 0.1rem; -o-border-radius: 0.1rem; -ms-border-radius: 0.1rem; border-radius: 0.1rem ;
background-color: rgba(255, 255, 255, 0.35);
}

.card>.card-body>.quote>blockquote by {
position: relative;
display: block;
margin: 10px 0 0;
margin-bottom: 20px;
font-size: 85%;
padding-bottom: 0.2rem;
border-bottom: 2px solid #1DE9B6;
}

.card>.card-body>.quote>blockquote>by>on {
font-size: 85%;
.card>.card-body>.quote>blockquote on {
font-size: 75%;
padding-top: 0.2rem;
border-top: 2px solid #1DE9B6;
}

.times-messages {
Expand Down
19 changes: 16 additions & 3 deletions css/zstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,28 @@ ul.unstyled {
float: right;
}

.card>.card-body>.quote>blockquote>by {
.card>.card-body>.quote>blockquote {
margin: 0;
border-width: 0.2rem;
border-color: #1DE9B6;
border-radius: 0.1rem;
background-color: rgba(255, 255, 255, 0.35);
}

.card>.card-body>.quote>blockquote by {
position: relative;
display: block;
margin: 10px 0 0;
margin-bottom: 20px;
font-size: 85%;
padding-bottom: 0.2rem;
border-bottom: 2px solid #1DE9B6;
}

.card>.card-body>.quote>blockquote>by>on {
font-size: 85%;
.card>.card-body>.quote>blockquote on {
font-size: 75%;
padding-top: 0.2rem;
border-top: 2px solid #1DE9B6;
}

.times-messages {
Expand Down
25 changes: 22 additions & 3 deletions js/all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -1268,10 +1268,29 @@ class ThunderWave extends ZeroFrame {
var rcurdate = moment().format("MMMM Do, YYYY")
var curdate3 = (curdate === rcurdate ? "Today" : (moment(rcurdate, "MMMM Do, YYYY").subtract(1, "d").format("MMMM Do, YYYY") === curdate ? "Yesterday" : curdate));

var quote_parsed = marked(
quote.body, {
renderer: markedR
}
)
.replace(/((?:(?:[\w]+)@(?:zeroid|zeroverse|kaffie)\.bit)|@(?:[\w]+))/gmi, function(match, p1) { // ((?:[\w]+)@(?:zeroid|zeroverse)\.bit)
var profile_link_part = (page.LS.opts.parse_profile_links.value ? '<a class="message-profile-link" onclick="add2MSGInput(\'' + p1 + ' \'); return false;" href="?u/' + encodeURI(p1) + '">' + p1 + '</a>' : '<span class="message-profile-link">' + p1 + '</span>')
var isthisuser = (p1.match(new RegExp(page.site_info.cert_user_id + "|@" + page.site_info.cert_user_id.split("@")[0], "gmi"))) ? true : false
return (isthisuser ? "<mark>" : "") + profile_link_part + (isthisuser ? "</mark>" : "")
})
if (!page.LS.opts.disable_emojis.value)
quote_parsed = emojione.toImage(quote_parsed)

$('#QUOTEREPLACE_' + _tc).replaceWith($('<div class="quote">' +
'<blockquote cite="tc_' + _tc + '">' + quote.body +
'<by> - ' + quote.cert_user_id + ' | <on onclick="javascript:window.location.hash=\'t_' + tc + '\'">' +
curdate3 + ' ' + curtime + '</on></by>' +
'<blockquote cite="tc_' + _tc + '">' +
'<by>' + quote.cert_user_id
.replace(/((?:(?:[\w]+)@(?:zeroid|zeroverse|kaffie)\.bit)|@(?:[\w]+))/gmi, function(match, p1) { // ((?:[\w]+)@(?:zeroid|zeroverse)\.bit)
var profile_link_part = (page.LS.opts.parse_profile_links.value ? '<a class="message-profile-link" onclick="add2MSGInput(\'' + p1 + ' \'); return false;" href="?u/' + encodeURI(p1) + '">' + p1 + '</a>' : '<span class="message-profile-link">' + p1 + '</span>')
var isthisuser = (p1.match(new RegExp(page.site_info.cert_user_id + "|@" + page.site_info.cert_user_id.split("@")[0], "gmi"))) ? true : false
return (isthisuser ? "<mark>" : "") + profile_link_part + (isthisuser ? "</mark>" : "")
}) + '</by>' + quote_parsed +
'- <on onclick="javascript:window.location.hash=\'t_' + tc + '\'">' +
curdate3 + ' ' + curtime + '</on>' +
'</blockquote></div>'))
})
})(tc)
Expand Down

0 comments on commit 561e5e4

Please sign in to comment.