Testseite für das Basis-Layout implementiert
authorKai Moritz <km@feder-software.de>
Sun, 22 Dec 2013 07:37:00 +0000 (08:37 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 19 Jan 2016 16:45:40 +0000 (17:45 +0100)
Dafür die neue Tile "htmlhead" eingeführt, die als Vorgabe die
vollständige Einbindung von CSS-Styles und JavaScript inklusive
Media-Queries usw. enthält.

src/main/webapp/WEB-INF/spring/tiles.xml
src/main/webapp/WEB-INF/templates/html-head.jsp [new file with mode: 0644]
src/main/webapp/WEB-INF/templates/html5page.jsp
src/main/webapp/WEB-INF/views/projects/html-experimente.jsp
src/main/webapp/WEB-INF/views/test/basis-layout.jsp [new file with mode: 0644]

index 697c3e4..64c0d95 100644 (file)
@@ -6,6 +6,7 @@
 
   <definition name="BASEPAGE" template="/WEB-INF/templates/html5page.jsp">
     <put-attribute name="title" value="TITLE IS MISSING" type="string"/>
+    <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
     <put-attribute name="breadcrumb" value="BREADCRUMB IS MISSING" type="string"/>
     <put-attribute name="maincontent" value="/WEB-INF/templates/maincontent.jsp" type="template"/>
     <put-attribute name="contentclass" value="cols_2" type="string"/>
@@ -18,4 +19,4 @@
   </definition>
 
 
-</tiles-definitions>
\ No newline at end of file
+</tiles-definitions>
diff --git a/src/main/webapp/WEB-INF/templates/html-head.jsp b/src/main/webapp/WEB-INF/templates/html-head.jsp
new file mode 100644 (file)
index 0000000..1cf205c
--- /dev/null
@@ -0,0 +1,23 @@
+<%@page contentType="text/html;charset=UTF-8"%>
+<%@page pageEncoding="UTF-8"%>
+<%@page session="false" %>
+<%@taglib uri="http://www.springframework.org/tags" prefix="s"%>
+<s:url var="base" value="/" />
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" type="text/css" href="${base}css/base.css" />
+<style type="text/css">
+  @import '${base}css/screen.css' screen and (min-width: 750px);
+  @import '${base}css/tablet.css' screen and (min-width: 750px) and (max-width: 939px);
+  @import '${base}css/phone.css' screen and (max-width: 599px);
+  @import '${base}css/tiny.css' screen and (max-width: 399px);
+</style>
+<script src="${base}js/base.js"></script>
+<!--[if IE 8]>
+  <script src="${base}js/ie8.js"></script>
+<![endif]-->
+<!--[if IE 7]>
+  <script src="${base}js/ie7.js"></script>
+<![endif]-->
+<!--[if lt IE 7]>
+  <script src="${base}js/ie6.js"></script>
+<![endif]-->
index 3a80904..8535b79 100644 (file)
@@ -9,24 +9,7 @@
   <head>
     <title>juplo - <t:getAsString name="title"/></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="${base}css/base.css" />
-    <style type="text/css">
-      @import '${base}css/screen.css' screen and (min-width: 750px);
-      @import '${base}css/tablet.css' screen and (min-width: 750px) and (max-width: 939px);
-      @import '${base}css/phone.css' screen and (max-width: 599px);
-      @import '${base}css/tiny.css' screen and (max-width: 399px);
-    </style>
-    <script src="${base}js/base.js"></script>
-    <!--[if IE 8]>
-      <script src="${base}js/ie8.js"></script>
-    <![endif]-->
-    <!--[if IE 7]>
-      <script src="${base}js/ie7.js"></script>
-    <![endif]-->
-    <!--[if lt IE 7]>
-      <script src="${base}js/ie6.js"></script>
-    <![endif]-->
+    <t:insertAttribute name="htmlhead"/>
   </head>
   <body onload="prettyPrint()">
     <div id="page" class="<t:getAsString name="contentclass"/> cf">
index a273fb6..5216984 100644 (file)
@@ -32,9 +32,9 @@
     </ul>
   </t:putAttribute>
   <t:putAttribute name="maincontent" type="string">
+    <h2>Alle HTML-Experimente</h2>
     <ul>
-      <li>bla</li>
-      <li>blub</li>
+      <li><a href="${base}test/basis-layout.html">Nur das Basis-Layout</a></li>
     </ul>
   </t:putAttribute>
 </t:insertDefinition>
diff --git a/src/main/webapp/WEB-INF/views/test/basis-layout.jsp b/src/main/webapp/WEB-INF/views/test/basis-layout.jsp
new file mode 100644 (file)
index 0000000..071181f
--- /dev/null
@@ -0,0 +1,48 @@
+<%@page contentType="text/html;charset=UTF-8"%>
+<%@page pageEncoding="UTF-8"%>
+<%@page session="false" %>
+<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="t" %>
+<%@taglib uri="http://www.springframework.org/tags" prefix="s"%>
+<s:url var="base" value="/" />
+<t:insertDefinition name="BASEPAGE">
+  <t:putAttribute name="title" value="Nur das Basis-Layout" type="string"/>
+  <t:putAttribute name="htmlhead" type="string">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link rel="stylesheet" type="text/css" href="${base}css/base.css" />
+  </t:putAttribute>
+  <t:putAttribute name="breadcrumb">
+    <li class="b"><a class="b" href="${base}index.html">Home</a></li>
+    <li class="b"><a class="b" href="${base}projects.html">Projects</a></li>
+    <li class="b"><strong class="b">HTML-Experimente</strong></li>
+  </t:putAttribute>
+  <t:putAttribute name="navigation" type="string">
+    <h1 class="nav">Navigation</h1>
+    <h2 class="nav menu">Section-Menu</h2>
+    <ul id="menu">
+      <li class="m blog"><a href="${base}blog.html" class="m">Blog</a></li>
+      <li class="m projects"><a href="${base}projects.html" class="m selected">Projects</a></li>
+    </ul>
+    <h2 class="nav submenu">
+      <span class="s">Submenu for section</span>
+      <a class="s selected" href="${base}projects.html">Projects</a>
+    </h2>
+    <ul id="submenu" class="s active">
+      <li class="s sub"><a href="#" class="s">hibernate4-maven-plugin</a></li>
+      <li class="s sub"><a href="${base}projects/fix-swf.html" class="s">fix-swf</a></li>
+      <li class="s"><a href="#" class="s">jquery.openx</a></li>
+      <li class="s"><strong class="s">HTML-Experimente</strong></li>
+      <li class="s sub"><a href="#" class="s">accelerator</a></li>
+      <li class="s"><a href="${base}projects/typo.html" class="s">Typography</a></li>
+    </ul>
+  </t:putAttribute>
+  <t:putAttribute name="maincontent" type="string">
+    <p>
+      In diese Seite ist nur das Basis-Layout eingebunden
+      (<code>/css/base.css</code>).
+    </p>
+    <h2>Weitere HTML-Experimente</h2>
+    <ul>
+      <li><strong>Basis-Layout</strong></li>
+    </ul>
+  </t:putAttribute>
+</t:insertDefinition>