]> juplo.de Git - website/commitdiff
Section-Handling überarbeitet: URI ist generell der Key für Map-Zugriffe!
authorKai Moritz <kai@juplo.de>
Tue, 5 Jul 2016 09:08:51 +0000 (11:08 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 17 Jul 2016 15:05:04 +0000 (17:05 +0200)
dist/thymeleaf/templates/layout.html
dist/thymeleaf/templates/variables.json

index 2ff02556f3bd8fd3bef9843bc21d010a1e133463..23511638bf61dbec7029299c780cfc9636f38199 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.key}">
-                <a href="../blog.html" th:href="@{${entry.value.uri}}" class="m" th:class="${entry.value.uri == section.uri} ? 'm selected' : 'm'" th:text="${entry.value.name}">Blog</a>
+              <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>
               <!--/*-->
               <li class="m projects"><a href="../projects" class="m selected">Projects</a></li>
index 8b192f53195f026ab3c7f6bfda56500dd9131002..612be66f8f380c477d6e025af6d55394cba2aa1f 100644 (file)
     ]
   },
   "sections": {
-    "blog": { "name": "Blog", "uri": "/blog.html" },
-    "projects": { "name": "Projects", "uri": "/projects.html" },
-    "about": { "name": "About", "uri": "/about.html" }
+    "/blog.html": { "name": "Blog", "key": "blog" },
+    "/projects.html": { "name": "Projects", "key": "projects" },
+    "/about.html": { "name": "About", "key": "about" }
   },
   "submenu": {
     "#": { "name": "hibernate4-maven-plugin" },