forked from rDrama/rDrama
Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost
commit
b19650c0c0
|
@ -19,7 +19,8 @@ def error_401(e):
|
||||||
path = request.path
|
path = request.path
|
||||||
qs = urlencode(dict(request.values))
|
qs = urlencode(dict(request.values))
|
||||||
argval = quote(f"{path}?{qs}", safe='')
|
argval = quote(f"{path}?{qs}", safe='')
|
||||||
return redirect(f"/signup?redirect={argval}")
|
if session.get("history"): return redirect(f"/login?redirect={argval}")
|
||||||
|
else: return redirect(f"/signup?redirect={argval}")
|
||||||
|
|
||||||
@app.errorhandler(406)
|
@app.errorhandler(406)
|
||||||
def error_406(e):
|
def error_406(e):
|
||||||
|
|
|
@ -945,4 +945,17 @@
|
||||||
<div id="viewmore-{{offset}}"><button id="viewbtn" class="btn btn-primary" onclick="viewmore({{pid}},'{{sort}}',{{offset}},{{ids}})">VIEW MORE COMMENTS</a></div>
|
<div id="viewmore-{{offset}}"><button id="viewbtn" class="btn btn-primary" onclick="viewmore({{pid}},'{{sort}}',{{offset}},{{ids}})">VIEW MORE COMMENTS</a></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not ajax and v and v.theme == 'midnight' %}
|
||||||
|
<script>
|
||||||
|
const markTemplate = (name) => {
|
||||||
|
return `<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='50px' height='50px'><text transform='translate(10, 50) rotate(-45)' fill='rgba(45,45,45,0.1)' font-size='20'>${name}</text></svg>`;
|
||||||
|
};
|
||||||
|
const base64Mark = btoa(markTemplate("{{v.id}}"));
|
||||||
|
|
||||||
|
var style = document.createElement('style');
|
||||||
|
style.innerHTML = `#post-text,.comment-section > .comment{background-image:url("data:image/svg+xml;base64,${base64Mark}")}`;
|
||||||
|
document.getElementsByTagName('head')[0].appendChild(style);
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</body>
|
</body>
|
Loading…
Reference in New Issue