]> juplo.de Git - website/commitdiff
DRY-Prinzip bei Bereichs-Definition angewendet
authorKai Moritz <kai@juplo.de>
Thu, 7 Jul 2016 09:08:35 +0000 (11:08 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 17 Jul 2016 15:05:04 +0000 (17:05 +0200)
dist/templates/layout.html
dist/templates/variables.json

index d1aeef05175d4a1c18965342b1832298db000e4c..fb99305823cc57a3f26d45aa0ea25d647e64c29b 100644 (file)
             <h1 class="nav">Navigation</h1>
             <h2 class="nav menu">Section-Menu</h2>
             <ul id="menu" class="cf">
-              <li class="m blog" th:each="entry : ${sections}" th:class="'m ' + ${entry.value.key}">
-                <a href="../blog.html" th:href="@{${entry.key}}" class="m" th:class="${entry.key == section.uri} ? 'm selected' : 'm'" th:text="${entry.value.name}">Blog</a>
+              <li class="m blog" th:each="entry : ${sections}" th:class="'m ' + ${entry.key}">
+                <a href="../blog.html" th:href="@{${entry.value}}" class="m" th:class="${entry.value == section.uri} ? 'm selected' : 'm'" th:text="${pages.get(entry.value).name}">Blog</a>
               </li>
               <!--/*-->
               <li class="m projects"><a href="../projects" class="m selected">Projects</a></li>
index 2f7172c118ccd24d8768888245119d2ce564298e..d09f0838d1747d4a4730eebe2bdf7a00d002ac09 100644 (file)
@@ -1,8 +1,8 @@
 {
   "sections": {
-    "/blog.html": { "name": "Blog", "key": "blog" },
-    "/projects.html": { "name": "Projects", "key": "projects" },
-    "/about.html": { "name": "About", "key": "about" }
+    "blog": "/blog.html",
+    "projects": "/projects.html",
+    "about": "/about.html"
   },
   "pages": {
     "/index.html": { "name": "Home" },