Durchgängig gleicher Abstand zwischen Pfad-Menü und dem aktiven Menü
authorKai Moritz <kai@juplo.de>
Sat, 9 Jul 2016 13:14:03 +0000 (15:14 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 28 Jun 2017 09:23:38 +0000 (11:23 +0200)
dist/less/screen/menu.less
dist/templates/layout.html

index 1dc142e..d35c541 100644 (file)
 }
 #submenu ul.s
 {
-  margin: 1.5em 0 0 0; /** 24px 0 0 0 */
+  margin: 1em 0 0 0; /** 16px 0 0 0 */
   padding: 0;
   list-style-type: none;
 }
+#submenu.selected,
+#submenu ul.s.selected
+{
+  margin-top: 2em; /** 32px */
+}
 #submenu li.s
 {
   margin: 0 0 .5em 0; /** 0 0 10px 0 */
index c464d69..acb20bc 100644 (file)
                   pos=1"
                 id="submenu"
                 class="s"
+                th:class="'s' + (${crumbs.size() == 1 or (crumbs.size() == 2 and page['childs'] == null)} ? ' selected' : '')"
                 >
               <li th:fragment="submenu(submenu, parent, pos)"
                   th:each="entry : ${submenu}"
                     >fix-swf</a>
                 <ul th:if="${selected and childs != null}"
                     class="s active"
-                    th:class="${selected} ? 's active' : 's'"
+                    th:class="'s' + (${selected} ? ' active' : '') + (${entry.key == uri or (crumbs.size() &gt; 1 and entry.key == crumbs.get(crumbs.size()-2).uri and page['childs'] == null)} ? ' selected' : '')"
                     >
                   <li th:replace="templates/layout :: submenu(submenu=${childs}, parent=${entry.key}, pos=${pos + 1})"
                       class="s"