mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 19:46:23 +00:00
homepage coloured as visited in the Graph (#1128)
simplifies slug from FullSlug to SimpleSlug before storing it in the visited pages list in memory this leads to "index" page and "folder/index", "tags/tag/index" being stored a "/", "folder/" and "tags/tag/" respectively in the list of visited pages. this ensures that the homepage is rightfully coloured as a visited page in the "color" function of the graph
This commit is contained in:
parent
63d51a8cc5
commit
0472daa003
1 changed files with 1 additions and 1 deletions
|
@ -361,7 +361,7 @@ function renderGlobalGraph() {
|
||||||
|
|
||||||
document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
|
document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
|
||||||
const slug = e.detail.url
|
const slug = e.detail.url
|
||||||
addToVisited(slug)
|
addToVisited(simplifySlug(slug))
|
||||||
await renderGraph("graph-container", slug)
|
await renderGraph("graph-container", slug)
|
||||||
|
|
||||||
const containerIcon = document.getElementById("global-graph-icon")
|
const containerIcon = document.getElementById("global-graph-icon")
|
||||||
|
|
Loading…
Reference in a new issue