2
0
mirror of https://github.com/jfmcbrayer/brutaldon synced 2024-12-21 20:54:03 +01:00

Fix title setting on enhanced navigation

This commit is contained in:
Jason McBrayer 2019-03-29 19:39:25 -04:00
parent 0939e5c1a1
commit 77ba674ffc
2 changed files with 6 additions and 18 deletions

View File

@ -3,20 +3,6 @@ String.prototype.trunc =
return this.substr(0,n-1)+(this.length>n?'…':'');
};
function setTitle(user, page)
{
document.title = `Brutaldon (${user}) ${page}`;
}
function afterPage(user, page)
{
setTitle(user,page);
var menu = document.querySelector('#navMenu');
menu.classList.remove('is-active');
var burger = document.querySelector('.navbar-burger');
burger.classList.remove('is-active');
$('#page-load-indicator').hide();
}
function menuPrepare() {
// Remove is-active from navbar menu

View File

@ -71,7 +71,9 @@
</head>
<body ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
<body ic-enhance="true" ic-target="body"
ic-global-indicator="#page-load-indicator"
ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
<div id="page-load-indicator"></div>
<div id="new-toot-modal" class="modal"></div>
{% block navbar %}
@ -165,8 +167,7 @@
</nav>
{% endblock %}
<main id="main" class="section" ic-enhance="true"
ic-global-indicator="#page-load-indicator">
<main id="main" class="section">
<div class="container">
{% block content %}
<h1 class="title">
@ -212,7 +213,8 @@
{% if preferences.lightbox %}
Intercooler.ready(function ()
{
{
document.title = $("title").html();
$('.attachments').each(function() {
$(this).magnificPopup({
delegate: 'figure.attachment-image a',