WIP: Logo
[website] / dist / thymeleaf / templates / layout.html
index 2351163..fce27a9 100644 (file)
@@ -3,31 +3,40 @@
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:th="http://www.thymeleaf.org"
     xmlns:layout="http://www.thymeleaf.org"
-    juplo:variables="templates/variables"
+    thymeproxy:variables="SET:/thymeleaf/sitemap.json"
     >
   <head th:fragment="head" layout:fragment="head">
     <title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE" th:text="'juplo'">juplo - BASISTEMPLATE</title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <link rel="stylesheet" type="text/css" href="../../css/base.min.css" th:href="@{/css/base.min.css}"/>
-    <style type="text/css" th:remove="all">
-      @import '../../css/screen.min.css' screen;
-      @import '../../css/print.min.css' print;
-    </style>
-    <style type="text/css" th:inline="text">
-      @import '[[@{/css/screen.min.css}]]' screen;
-      @import '[[@{/css/print.min.css}]]' print;
-    </style>
+    <!-- Default / Responsive -->
+    <link rel="stylesheet" th:rel="stylesheet" media="all" title="Responsive" type="text/css" href="../../css/base.css" th:href="@{/css/base.min.css}"/>
+    <link rel="stylesheet" th:rel="stylesheet" media="only screen" title="Responsive" type="text/css" href="../../css/screen.css" th:href="@{/css/screen.min.css}"/>
+    <link rel="stylesheet" th:rel="stylesheet" media="print" title="Responsive" type="text/css" href="../../css/print.css" th:href="@{/css/print.min.css}"/>
+    <!-- Legacy -->
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Legacy" type="text/css" href="../../css/base.css" th:href="@{/css/base.min.css}"/>
+    <!-- Tablet -->
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Tablet" type="text/css" href="../../css/base.css" th:href="@{/css/base.min.css}"/>
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Tablet" type="text/css" href="../../css/tablet.css" th:href="@{/css/tablet.min.css}"/>
+    <!-- Phone -->
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Phone" type="text/css" href="../../css/base.css" th:href="@{/css/base.min.css}"/>
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Phone" type="text/css" href="../../css/phone.css" th:href="@{/css/phone.min.css}"/>
+    <!-- Tiny -->
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Tiny" type="text/css" href="../../css/base.css" th:href="@{/css/base.min.css}"/>
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Tiny" type="text/css" href="../../css/tiny.css" th:href="@{/css/tiny.min.css}"/>
+    <!-- Print -->
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Print" type="text/css" href="../../css/base.css" th:href="@{/css/base.min.css}"/>
+    <link rel="alternate stylesheet" th:rel="alternate stylesheet" title="Print" type="text/css" href="../../css/print.css" th:href="@{/css/print.min.css}"/>
     <script src="../../js/prettify.js" th:src="@{/js/prettify.js}"></script>
     <!--[if lt IE 9]>
       <script src="../../js/html5shiv.js" th:src="@{/js/html5shiv.js}"></script>
     <![endif]-->
     <!--[if IE 8]>
-      <link rel="stylesheet" type="text/css" href="../../css/ie8.min.css" th:href="@{/css/ie8.min.css}"/>
+      <link rel="stylesheet" th:rel="stylesheet" type="text/css" href="../../css/ie8.css" th:href="@{/css/ie8.min.css}"/>
     <![endif]-->
   </head>
   <body
-      th:with="crumbs=${crumbs.get(uri)}"
+      th:with="page=${pages.get(uri)},crumbs=${page['crumbs']}"
       id="top"
       class="menu"
       th:class="${contentclass}?:'menu'"
       >
     <div id="page" class="cf">
       <header id="header">
-        <h1 id="logo" layout:fragment="header"><a href="../index.html" th:href="@{/}" title="Home" class="l">juplo</a></h1>
+        <h1 id="logo" layout:fragment="header"><a href="../index.html" th:href="@{/}" title="Home" class="l"><img class="l" src="/img/logo.svg" alt="juplo"/></a></h1>
         <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span>
         <hr class="h" />
       </header>
       <div id="breadcrumb">
         <strong class="b title">You are here:</strong>
         <ol class="b" layout:fragment="breadcrumb">
-          <li class="b"><a class="b" href="../../index.html" th:href="@{/index.html}">Home</a></li>
+          <li class="b"><a class="b" href="../index.html" th:href="@{/index.html}">Home</a></li>
           <li class="b" th:each="crumb: ${crumbs}">
-            <a class="b" href="../../projects.html" th:href="@{${crumb.uri}}" th:text="${crumb.name}">Projects</a>
+            <a class="b" href="../projects.html" th:href="@{${crumb.uri}}" th:text="${crumb.name}">Projects</a>
           </li>
           <!--/*-->
-          <li class="b"><strong class="b" th:text="${title}"">Fix SWF</strong></li>
+          <li class="b"><strong class="b" th:text="${title}">Fix SWF</strong></li>
           <!--*/-->
         </ol>
         <a class="hide" href="#nav" title="Show navigation menu">Jump to navigation</a>
             <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>
+              <li class="m projects"><a href="../projects.html" class="m selected">Projects</a></li>
               <li class="m about"><a href="../about.html" class="m">About</a></li>
               <!--*/-->
             </ul>
               <a class="s selected" href="../projects.html" th:href="@{${section.uri}}" th:text="${section.name}">Projects</a>
             </h2>
             <ul layout:fragment="submenu"
-                th:with="parent=${(crumbs.size() == 2 and submenu.get(uri)['childs'] == null) ? crumbs[0].uri : null}, pos=1"
+                th:with="
+                  submenu=${pages[section.uri]['childs']},
+                  parent=${crumbs[0].uri},
+                  pos=1"
                 id="submenu"
                 class="s"
                 >
                   th:with="
                       child=${pos == crumbs.size()},
                       selected=${!child and crumbs.get(pos).uri == entry.key},
-                      last=${crumbs.get(pos-1).uri == parent and crumbs.size() &gt; pos},
-                      childs=${entry.value['childs']}
+                      sibling=${pos + 1 == crumbs.size() and (page['childs'] == null or uri == parent)},
+                      childs=${entry.key == parent ? null : pages[entry.key]['childs']}
                       "
                   class="s sub"
-                  th:class="'s' + (${childs} ? ' sub' : '') + (${selected or last or child} ? '' : ' off')"
+                  th:class="'s' + (${childs} ? ' sub' : '') + (${selected or sibling or child} ? '' : ' off')"
                   >
                 <a  href="../projects/fix-swf.html"
                     th:href="@{${entry.key}}"
                     class="s selected"
                     th:class="${selected} ? 's selected' : 's'"
-                    th:text="${entry.value.name}"
+                    th:text="${entry.value}"
                     >fix-swf</a>
                 <ul th:if="${selected and childs != null}"
                     class="s active"
-                    th:class="${selected} ? 's active' : 's'"
+                    th:class="${selected && pos == crumbs.size()-1} ? 's active' : 's'"
                     >
                   <li th:replace="templates/layout :: submenu(submenu=${childs}, parent=${entry.key}, pos=${pos + 1})"
                       class="s"