Fixed opening nav items in new tab/window
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This commit is contained in:
parent
e2fd291e8f
commit
b6d683014d
|
@ -71,7 +71,7 @@
|
||||||
if (page_href === '/') {
|
if (page_href === '/') {
|
||||||
page_href = '/home.html';
|
page_href = '/home.html';
|
||||||
} else if (blog_page_regexp.test(page_href)) {
|
} else if (blog_page_regexp.test(page_href)) {
|
||||||
if (page_href === "/blog.html") {
|
if (page_href === "/blog.html" || page_href === "/pages/blog.html") {
|
||||||
page_href = "/blog1.html";
|
page_href = "/blog1.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,8 +84,10 @@
|
||||||
$('a.menuitem[rel="address:' + page_href + '"]').closest('ul').find('li.active').removeClass('active');
|
$('a.menuitem[rel="address:' + page_href + '"]').closest('ul').find('li.active').removeClass('active');
|
||||||
$('a.menuitem[rel="address:' + page_href + '"]').closest('li').addClass('active');
|
$('a.menuitem[rel="address:' + page_href + '"]').closest('li').addClass('active');
|
||||||
|
|
||||||
// set page_href of full url for ajax call
|
// set page_href of full url for ajax call when pages/ isn't specified
|
||||||
page_href = "pages" + page_href;
|
if (! /\/?pages\/.*/.test(page_href)) {
|
||||||
|
page_href = "pages" + page_href;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the ajax request for the new page-content (whether it be a page or a post) *could change*
|
// Make the ajax request for the new page-content (whether it be a page or a post) *could change*
|
||||||
|
|
|
@ -243,7 +243,7 @@ main = do
|
||||||
makeItem "loading"
|
makeItem "loading"
|
||||||
>>= applyAsTemplate indexCtx
|
>>= applyAsTemplate indexCtx
|
||||||
>>= loadAndApplyTemplate "templates/default.html" indexCtx
|
>>= loadAndApplyTemplate "templates/default.html" indexCtx
|
||||||
>>= relativizeUrls
|
-- >>= relativizeUrls
|
||||||
|
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
-- NOJS Version -----------------------------------------------------------------------------------------
|
-- NOJS Version -----------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<ul class='container' id='nav-menu'>
|
<ul class='container' id='nav-menu'>
|
||||||
$for(pages)$
|
$for(pages)$
|
||||||
<li>
|
<li>
|
||||||
<a class='menuitem' href='$url$' rel='address:$virtualpath$'>$title$</a>
|
<a class='menuitem' href='/#$url$' rel='address:$virtualpath$'>$title$</a>
|
||||||
</li>
|
</li>
|
||||||
$endfor$
|
$endfor$
|
||||||
<a class='rss-icon' href='atom.xml'></a>
|
<a class='rss-icon' href='atom.xml'></a>
|
||||||
|
|
Loading…
Reference in New Issue