diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-06-05 16:13:27 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-06-05 16:13:27 +0200 |
| commit | 697a21610f67f6864c766a5378b873f92862858b (patch) | |
| tree | 7ea2f2967d2f57bfcacd805f59a1f8199c2f3760 | |
| parent | 8332bd1d4f30f43d103176e90d9b2286c698331c (diff) | |
headers
| -rw-r--r-- | client/index.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/index.js b/client/index.js index 59fb5176..c72fd02c 100644 --- a/client/index.js +++ b/client/index.js @@ -139,18 +139,20 @@ function buildWaypoints() { } function main() { - const paras = document.querySelectorAll('section p') + // const paras = document.querySelectorAll('section p') // if (paras.length) { // paras[0].classList.add('first_paragraph') // } let active = '' const { href } = window.location - if (href.match('about/updates')) { - active = 'updates' + if (href.match('news')) { + active = 'news' } else if (href.match('about')) { active = 'about' - } else { + } else if (href.match('datasets')) { active = 'datasets' + } else { + active = href } toArray(document.querySelectorAll('header .links a')).some(tag => { if (tag.href.match(active)) { |
