From 59c2d761b5e734995afcef00cacb52c2c899a50c Mon Sep 17 00:00:00 2001 From: Misode Date: Tue, 22 Sep 2020 22:35:59 +0200 Subject: [PATCH] Use anchor tags for navigation --- src/app/app.ts | 7 ++++--- src/styles/global.css | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/app.ts b/src/app/app.ts index 8511d00b..df89aa36 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -364,12 +364,13 @@ Promise.all([ const addGen = (output: HTMLElement) => (m: any) => { output.insertAdjacentHTML('beforeend', - `
+ ` ${locale(m.name)} ${m.schema ? '' : ''} -
`) - output.lastChild?.addEventListener('click', evt => { + `) + output.lastChild?.addEventListener('click', evt => { reload(publicPath + m.id) + evt.preventDefault() }) } diff --git a/src/styles/global.css b/src/styles/global.css index 50e794bf..57f0a9d1 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -368,6 +368,7 @@ body { padding: 8px 15px; cursor: pointer; user-select: none; + text-decoration: none; border-radius: 3px; background-color: var(--nav-faded); color: var(--text);