Browse Source

:tada: Make the dropdown list dynamic to the list of projects

Problem : this list exists in the project page only.
DricomDragon 1 year ago
parent
commit
160c507bde
2 changed files with 8 additions and 16 deletions
  1. 5 0
      src/templates/item.html
  2. 3 16
      src/templates/navbar.html

+ 5 - 0
src/templates/item.html

@@ -0,0 +1,5 @@
+<!-- Project dropdown item component -->
+<a class="dropdown-item"
+   href="/projets/$it.target.dir$/$it.target.content$">
+        $it.data.title$
+</a>

+ 3 - 16
src/templates/navbar.html

@@ -28,23 +28,10 @@
                     <a class="dropdown-item active" href="/projets/content.html">
                         Liste des projets
                     </a>
+$if(list)$
                     <div class="dropdown-divider"></div>
-                    <a class="dropdown-item"
-                       href="/projets/static_site/content.html">
-                        Jovian Website
-                    </a>
-                    <a class="dropdown-item"
-                       href="/projets/ascii_space/content.html">
-                        ASCII Space Destroyer
-                    </a>
-                    <a class="dropdown-item"
-                       href="/projets/pulsar/content.html">
-                        Pulsar
-                    </a>
-                    <a class="dropdown-item"
-                       href="/projets/quoridor/content.html">
-                        Quoridor
-                    </a>
+                    $^$${ list:item() }
+$endif$
                 </div>
             </li>
             <li class="nav-item$if(category-contact)$ active$endif$">