Fix pinning on chorus collection page
Previously, the new pinned post link would appear in the site header, instead of the blog header.
This commit is contained in:
parent
954e57897b
commit
8ec25f1fb4
|
@ -174,7 +174,7 @@ function pinPost(e, postID, slug, title) {
|
||||||
// Visibly remove post from collection
|
// Visibly remove post from collection
|
||||||
var $postEl = document.getElementById('post-' + postID);
|
var $postEl = document.getElementById('post-' + postID);
|
||||||
$postEl.parentNode.removeChild($postEl);
|
$postEl.parentNode.removeChild($postEl);
|
||||||
var $header = document.getElementsByTagName('header')[0];
|
var $header = document.querySelector('header:not(.multiuser)');
|
||||||
var $pinnedNavs = $header.getElementsByTagName('nav');
|
var $pinnedNavs = $header.getElementsByTagName('nav');
|
||||||
// Add link to nav
|
// Add link to nav
|
||||||
var link = '<a class="pinned" href="/{{.Alias}}/'+slug+'">'+title+'</a>';
|
var link = '<a class="pinned" href="/{{.Alias}}/'+slug+'">'+title+'</a>';
|
||||||
|
|
Loading…
Reference in New Issue