Nav: move Wiki to right-side menu (desktop + hamburger); fix missing element when PUBLIC_WIKI_URL unset in rebuilds
This commit is contained in:
@@ -221,10 +221,6 @@ try {
|
||||
<a href={`${baseUrl}convert/`} class="text-sm text-zinc-400 hover:text-white transition-colors shrink-0">Convert</a>
|
||||
)}
|
||||
<a href={`${baseUrl}segments/`} class="text-sm text-zinc-400 hover:text-white transition-colors shrink-0">Segments</a>
|
||||
{wikiUrl && (
|
||||
<a id="nav-wiki" href={wikiUrl} style="display:none"
|
||||
class="text-sm text-zinc-400 hover:text-white transition-colors shrink-0">Wiki</a>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -239,6 +235,15 @@ try {
|
||||
title=""
|
||||
class="hidden sm:flex text-xs px-2 py-0.5 rounded-full bg-amber-900/60 text-amber-300 border border-amber-700/50 animate-pulse cursor-default"
|
||||
></span>
|
||||
<!-- Wiki — visible only to users with wiki_access -->
|
||||
{wikiUrl && (
|
||||
<a
|
||||
id="nav-wiki"
|
||||
href={wikiUrl}
|
||||
style="display:none"
|
||||
class="hidden sm:inline text-xs text-zinc-500 hover:text-white transition-colors px-1"
|
||||
>Wiki</a>
|
||||
)}
|
||||
<!-- Ideas / About — always visible on desktop -->
|
||||
<a
|
||||
href={`${baseUrl}ideas/`}
|
||||
@@ -302,6 +307,11 @@ try {
|
||||
<a href={`${baseUrl}segments/`}
|
||||
class="text-sm px-2 py-1.5 rounded hover:bg-zinc-800 transition-colors"
|
||||
style="color: var(--text-4)">Segments</a>
|
||||
{wikiUrl && (
|
||||
<a id="nav-wiki-m" href={wikiUrl}
|
||||
style="display:none; color: var(--text-4)"
|
||||
class="text-sm px-2 py-1.5 rounded hover:bg-zinc-800 transition-colors">Wiki</a>
|
||||
)}
|
||||
<a href={`${baseUrl}ideas/`}
|
||||
class="text-sm px-2 py-1.5 rounded hover:bg-zinc-800 transition-colors"
|
||||
style="color: var(--text-4)">Ideas</a>
|
||||
@@ -622,6 +632,8 @@ try {
|
||||
if (user.wiki_access) {
|
||||
const wikiEl = document.getElementById('nav-wiki');
|
||||
if (wikiEl) wikiEl.style.display = '';
|
||||
const wikiElM = document.getElementById('nav-wiki-m');
|
||||
if (wikiElM) wikiElM.style.display = '';
|
||||
}
|
||||
|
||||
// Admin: show admin link and poll for active jobs
|
||||
|
||||
Reference in New Issue
Block a user