|
@ -38,7 +38,7 @@ |
|
|
<label class="custom-control-label" for="darkSwitch">Dark Mode</label> |
|
|
<label class="custom-control-label" for="darkSwitch">Dark Mode</label> |
|
|
</div> |
|
|
</div> |
|
|
<div class="navbar-text" style="margin-right: 20px; ">{{ user['userName'] }}</div> #} |
|
|
<div class="navbar-text" style="margin-right: 20px; ">{{ user['userName'] }}</div> #} |
|
|
<div class="toolbar-button"><svg |
|
|
|
|
|
|
|
|
<div id="type-button" class="toolbar-button" onclick="showTypeMenu();"><svg |
|
|
width="24" |
|
|
width="24" |
|
|
height="24" |
|
|
height="24" |
|
|
fill="none" |
|
|
fill="none" |
|
@ -109,7 +109,7 @@ |
|
|
<br> |
|
|
<br> |
|
|
</div> #} |
|
|
</div> #} |
|
|
<div class="col-lg-12"> |
|
|
<div class="col-lg-12"> |
|
|
<div style="padding: 10px;" id="article"> |
|
|
|
|
|
|
|
|
<div style="padding: 10px; word-wrap: break-word; display: none;" id="article"> |
|
|
<h1 style="text-align: center;">{{ article[3] }}</h1> |
|
|
<h1 style="text-align: center;">{{ article[3] }}</h1> |
|
|
<a href="{{ article[1] }}" class="text-info" target="_blank" style="display: block; text-align: center; margin-bottom: 20px;">View Original</a> |
|
|
<a href="{{ article[1] }}" class="text-info" target="_blank" style="display: block; text-align: center; margin-bottom: 20px;">View Original</a> |
|
|
{{ article[2] | safe}} |
|
|
{{ article[2] | safe}} |
|
@ -118,16 +118,68 @@ |
|
|
</div> |
|
|
</div> |
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
{% include 'fragments/type_menu.j2' %} |
|
|
{% endblock %} |
|
|
{% endblock %} |
|
|
|
|
|
|
|
|
{% block scripts %} |
|
|
{% block scripts %} |
|
|
{{ super() }} |
|
|
{{ super() }} |
|
|
|
|
|
<script type="text/javascript" src="{{url_for('.static', filename='cookies.js')}}"></script> |
|
|
<script> |
|
|
<script> |
|
|
$('#article img').css('max-width', '100%'); |
|
|
$('#article img').css('max-width', '100%'); |
|
|
$('#article img').css('height', 'auto'); |
|
|
$('#article img').css('height', 'auto'); |
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener( 'DOMContentLoaded', function( event ) { |
|
|
|
|
|
var x = readCookie('fontcookie'); |
|
|
|
|
|
if (x) { |
|
|
|
|
|
$('#article').css('font-family', x); |
|
|
|
|
|
} else { |
|
|
|
|
|
createCookie('fontcookie', 'sans-serif', 365); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var x = readCookie('fontsizecookie'); |
|
|
|
|
|
if (x) { |
|
|
|
|
|
$('#article').css('font-size', x); |
|
|
|
|
|
} else { |
|
|
|
|
|
createCookie('fontsizecookie', '1.25rem', 365); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$('#article').show(); |
|
|
|
|
|
}, true ); |
|
|
|
|
|
|
|
|
$(function () { |
|
|
$(function () { |
|
|
$('[data-toggle="tooltip"]').tooltip() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
$('[data-toggle="tooltip"]').tooltip(); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function showTypeMenu() { |
|
|
|
|
|
pos = $('#type-button').first().position(); |
|
|
|
|
|
left = pos.left-$('#type-menu').width() + 50 |
|
|
|
|
|
if (left < 0) left = 0 |
|
|
|
|
|
$('#type-menu').css({top: pos.top+30, left: left}); |
|
|
|
|
|
$('#type-menu').show(); |
|
|
|
|
|
var overlay = jQuery('<div id="overlay" onclick="closeTypeMenu();"> </div>'); |
|
|
|
|
|
overlay.appendTo(document.body) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function closeTypeMenu() { |
|
|
|
|
|
$('#type-menu').hide(); |
|
|
|
|
|
$('#overlay').remove(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setFont(fonts) { |
|
|
|
|
|
createCookie('fontcookie', fonts, 365); |
|
|
|
|
|
$('#article').css('font-family', "'" + fonts + "'"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setSize(size) { |
|
|
|
|
|
createCookie('fontsizecookie', size, 365); |
|
|
|
|
|
$('#article').css('font-size', size); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$( window ).resize(function() { |
|
|
|
|
|
pos = $('#type-button').first().position(); |
|
|
|
|
|
left = pos.left-$('#type-menu').width() + 50; |
|
|
|
|
|
if (left < 0) left = 0; |
|
|
|
|
|
$('#type-menu').css({top: pos.top+30, left: left}); |
|
|
|
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
{% endblock %} |
|
|
{% endblock %} |