diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-10-29 15:08:21 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-10-29 15:08:21 +0200 |
| commit | 08d189a8582f91ce917755a335e1dcb77aeaa0c5 (patch) | |
| tree | 6d05e41a61f0a64b57f109a4f9e45d39e28412a6 /htdocs/src/js | |
| parent | 15541b1c9b23a2caf490446bc7be08d66ef10e99 (diff) | |
chore: keep projects url consistent
Since I added legal notice, project hash could be added to legal notice
page. Instead I make sure it is only added to website root.
Diffstat (limited to 'htdocs/src/js')
| -rw-r--r-- | htdocs/src/js/app.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/htdocs/src/js/app.js b/htdocs/src/js/app.js index 57ac458..38aee0e 100644 --- a/htdocs/src/js/app.js +++ b/htdocs/src/js/app.js @@ -246,7 +246,7 @@ function showProject(id) { name: currentProject.name, }); detailsBtn.addEventListener('click', toggleProjectDetails); - window.history.pushState({}, currentProject.name, `#${id}`); + window.history.pushState({}, currentProject.name, `/#${id}`); document.title = `${currentProject.name} | Demo | Armand Philippot`; main.replaceChildren(preview, details); } @@ -276,7 +276,7 @@ function getProjectsNavItem(id, name) { const item = document.createElement('li'); const link = document.createElement('a'); link.classList.add('nav__link'); - link.href = `#${id}`; + link.href = `/#${id}`; link.id = id; link.textContent = name; link.addEventListener('click', (e) => { |
