2
0
mirror of https://github.com/jfmcbrayer/brutaldon synced 2024-12-22 05:23: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?'…':''); 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() { function menuPrepare() {
// Remove is-active from navbar menu // Remove is-active from navbar menu

View File

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