Fixed blogposts not opening
This commit is contained in:
parent
074020ced7
commit
54dfe2a8cc
@ -28,12 +28,15 @@ function openPage(page, new_url, renew_history) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
slideOpacity(function () {
|
slideOpacity(function () {
|
||||||
document.getElementById(window.currPage + "-link").children[0].className = "";
|
var link = document.getElementById(window.currPage + "-link");
|
||||||
|
if (link) {
|
||||||
|
link.children[0].className = "";
|
||||||
|
link.children[0].className = "active";
|
||||||
|
}
|
||||||
document.getElementById(window.currPage).className = "hiddenarea";
|
document.getElementById(window.currPage).className = "hiddenarea";
|
||||||
window.currPage = page;
|
window.currPage = page;
|
||||||
document.getElementById(page).style.opacity = "0";
|
document.getElementById(page).style.opacity = "0";
|
||||||
document.getElementById(page).className = "";
|
document.getElementById(page).className = "";
|
||||||
document.getElementById(page + "-link").children[0].className = "active";
|
|
||||||
var target = new_url || page;
|
var target = new_url || page;
|
||||||
var targetPg = "/" + target;
|
var targetPg = "/" + target;
|
||||||
if (target == "about") {
|
if (target == "about") {
|
||||||
|
@ -41,12 +41,16 @@ function openPage(page: string, new_url: string = null, renew_history=true) {
|
|||||||
if (page == window.currPage) { return; }
|
if (page == window.currPage) { return; }
|
||||||
|
|
||||||
slideOpacity(() => {
|
slideOpacity(() => {
|
||||||
document.getElementById(window.currPage + "-link").children[0].className = ""
|
let link = document.getElementById(window.currPage + "-link");
|
||||||
|
if (link) {
|
||||||
|
link.children[0].className = ""
|
||||||
|
link.children[0].className = "active"
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById(window.currPage).className = "hiddenarea";
|
document.getElementById(window.currPage).className = "hiddenarea";
|
||||||
window.currPage = page;
|
window.currPage = page;
|
||||||
document.getElementById(page).style.opacity = "0";
|
document.getElementById(page).style.opacity = "0";
|
||||||
document.getElementById(page).className = "";
|
document.getElementById(page).className = "";
|
||||||
document.getElementById(page + "-link").children[0].className = "active"
|
|
||||||
let target = new_url || page;
|
let target = new_url || page;
|
||||||
let targetPg = "/" + target;
|
let targetPg = "/" + target;
|
||||||
if (target == "about") { target = ""; targetPg = ""; };
|
if (target == "about") { target = ""; targetPg = ""; };
|
||||||
|
Loading…
Reference in New Issue
Block a user