This repository was archived by the owner on Nov 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +44
-4
lines changed Expand file tree Collapse file tree 4 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 99 const isActive = (tabName : string ) => {
1010 return tabName === pageName ? " active" : " " ;
1111 };
12+
13+ import type { ComponentType } from " svelte" ;
14+
15+ const modules = import .meta .glob <Object >(" ../routes/games/*/+page.svelte" , {
16+ eager: true ,
17+ });
1218 </script >
1319
1420<ul id =" navbar" >
1824 <!-- margin left auto to move to the right, also moves all children after to the right -->
1925 <li style =" margin-left: auto;" >
2026 <Menu >
21- <a class ={isActive (" Games" )} href =" /" id =" games" slot =" toggle"
27+ <a class ={isActive (" Games" )} href =" /games " id =" games" slot =" toggle"
2228 >Games</a
2329 >
24- <MenuItem class =" menu-item"
25- ><a href =" /FarmingDragons" >Farming Dragons</a ></MenuItem
26- >
30+
31+ {#each Object .entries (modules ) as [_path, module ]}
32+ <MenuItem class =" menu-item" >
33+ <a
34+ href ="/games/ {_path
35+ .replace (' ../routes/games/' , ' ' )
36+ .replace (' /+page.svelte' , ' ' )}"
37+ >{_path
38+ .replace (" ../routes/games/" , " " )
39+ .replace (" /+page.svelte" , " " )}</a
40+ >
41+ </MenuItem >;
42+ {/each }
2743 </Menu >
2844 </li >
2945 <li class ="navbar-item {isActive (' About' )}" >
Original file line number Diff line number Diff line change 1+ <script >
2+ import " $lib/global.css" ;
3+ import Navbar from " $lib/navbar.svelte" ;
4+ </script >
5+
6+ <navbar-component pageName =" Games" ></navbar-component >
7+
8+ <h1 >GAMES!!</h1 >
Original file line number Diff line number Diff line change 1+ <script >
2+ import " $lib/global.css" ;
3+ import Navbar from " $lib/navbar.svelte" ;
4+ </script >
5+
6+ <navbar-component pageName =" Games" ></navbar-component >
7+
8+ <h1 >EAC Go</h1 >
Original file line number Diff line number Diff line change 1+ <script >
2+ import " $lib/global.css" ;
3+ import Navbar from " $lib/navbar.svelte" ;
4+ </script >
5+
6+ <navbar-component pageName =" Games" ></navbar-component >
7+
8+ <h1 >Farming dragons!!</h1 >
You can’t perform that action at this time.
0 commit comments