Commit 33f4196c authored by Markus Willman's avatar Markus Willman

template and js fixes (source and log views)

parent f2fb8b95
......@@ -23,13 +23,36 @@
<!-- log styles -->
<style>
.dclog { white-space:pre-wrap !important; border:none !important; page-break-inside:auto !important; page-break-before:avoid !important }
.dclog { white-space:pre-wrap !important }
.dclog > .nick { font-weight:bold }
.bs-dark .dclog > .nick { font-weight:bolder; color:#CCC }
.dclog > .timestamp { color:#CCC }
@media print {
.dclog { border:none !important; page-break-inside:auto !important; page-break-before:avoid !important }
}
@media screen {
.dclog { min-height: calc(100vh - 18rem); overflow-y: scroll; }
}
</style>
{% endblock %}
{% block scripts -%}
{{ parent() }}
<!-- twemoji.js - Twitter Emoji, MIT (code) & CC-BY 4.0 (graphics) - https://twemoji.twitter.com/ -->
<script src="//twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
<script>
$(function () {
var content = $('.dclog');
content.html(twemoji.parse(content.html(), {
size: 16
}));
});
</script>
{% endblock %}
{% block content -%}
<h4 class="float-left d-print-none">Log file: {{ log_file }}</h4>
<div class="text-right d-print-none">
......
......@@ -40,7 +40,7 @@
var sourceRefs = function(idx, element, passes = 1) {
element = $(element).parent();
for (var i = 0; i < passes; ++i) {
element.replaceWith(element.html().replace(
element.html(element.html().replace(
/\'([\w\/\.]+)\'((?:.*?)\%\})/gm,
"'<a class=\"src-ref\" href=\"{{base_url}}/$1?source=view\" rel=\"nofollow\">$1</a>'$2"
));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment