Skip to content

Commit 12c6666

Browse files
author
Jacek Gębal
committed
Changes to shred navigation
1 parent 0963138 commit 12c6666

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/assets/topbar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/* Base URL comes from the MkDocs site_url injected by the template.
1515
Sub-sites that load this script from utplsql.org don't set the variable,
1616
so they fall back to the hardcoded production URL. */
17-
var BASE = (window.utplsqlBaseUrl || 'https://utplsql.org/').replace(/\/+$/, '');
17+
var BASE = (window.utplsqlBaseUrl || 'https://www.utplsql.org/').replace(/\/+$/, '');
1818

1919
var NAV = [
2020
{ label: 'Home', url: BASE + '/' },
@@ -117,6 +117,9 @@
117117

118118
/* Updates the active class on nav links based on the current URL. */
119119
function injectDrawerNav() {
120+
/* Only needed on mobile — desktop shows links in the topbar itself. */
121+
if (!window.matchMedia('(max-width: 76.1875em)').matches) return;
122+
120123
/* Already injected and still in the DOM — nothing to do. */
121124
if (document.getElementById('utplsql-drawer-nav')) return;
122125

0 commit comments

Comments
 (0)