Merge branch 'master' of ../git/repositories/tcharles/cv-online

This commit is contained in:
Gitea 2018-10-26 23:53:45 +00:00
commit 09b46f2767
1 changed files with 10 additions and 0 deletions

View File

@ -53,8 +53,18 @@ function setPage(path){
window.scrollTo(0, 0);
$("#article-container").empty();
$("#left > a").each((i, elmt) => {
let hrefPath = elmt.attributes["href"].value;
if(hrefPath === "/" || path === "" || path === "/index.html")
hrefPath = "/home";
$(elmt).toggleClass("active", hrefPath === path);
});
$.ajax("/pages"+path+".md")
.done((res) => {
$("#article-container").html(res);
const len = $("#article-container > article").length;