diff --git a/index.html b/index.html index 2143712..7b59572 100644 --- a/index.html +++ b/index.html @@ -30,6 +30,24 @@ select { margin-top: 10px; margin-bottom: 10px; } + +ul.navbar { + display: flex; + list-style-type: none; + margin: 0; + padding: 0; + justify-content: flex-end; +} + +ul.navbar li { + border-right: 1px solid gray; + margin-right: 8px; + padding-right: 8px; +} + +ul.navbar li:last-child { + border-right: none; +} Alas, you need JavaScript to peruse this page. diff --git a/lib/browser-main.tsx b/lib/browser-main.tsx index 3a5fa04..9d80a46 100644 --- a/lib/browser-main.tsx +++ b/lib/browser-main.tsx @@ -26,6 +26,20 @@ if (!appEl) { throw new Error(`Unable to find #${APP_ID}!`); } +const Navbar: React.FC<{ currPageName: string }> = (props) => ( + + {pageNames.map((pageName) => ( + + {props.currPageName === pageName ? ( + pageName + ) : ( + {pageName} + )} + + ))} + +); + const App: React.FC<{}> = (props) => { const page = new URLSearchParams(window.location.search); const currPageName = toPageName(page.get("p") || "", "vocabulary"); @@ -33,22 +47,13 @@ const App: React.FC<{}> = (props) => { return ( <> + + +
Alas, you need JavaScript to peruse this page.