From: Kai Moritz <km@feder-software.de> Date: Sun, 22 Dec 2013 07:37:00 +0000 (+0100) Subject: Testseite für das Basis-Layout implementiert X-Git-Tag: thymeroot-2.0.0~155 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=38a0870d29eec3bad7a82cf7ffd954c1d57f1cdd;p=website Testseite für das Basis-Layout implementiert 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. --- diff --git a/src/main/webapp/WEB-INF/spring/tiles.xml b/src/main/webapp/WEB-INF/spring/tiles.xml index 697c3e41..64c0d953 100644 --- a/src/main/webapp/WEB-INF/spring/tiles.xml +++ b/src/main/webapp/WEB-INF/spring/tiles.xml @@ -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 index 00000000..1cf205c6 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/html-head.jsp @@ -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]--> diff --git a/src/main/webapp/WEB-INF/templates/html5page.jsp b/src/main/webapp/WEB-INF/templates/html5page.jsp index 3a809047..8535b793 100644 --- a/src/main/webapp/WEB-INF/templates/html5page.jsp +++ b/src/main/webapp/WEB-INF/templates/html5page.jsp @@ -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"> diff --git a/src/main/webapp/WEB-INF/views/projects/html-experimente.jsp b/src/main/webapp/WEB-INF/views/projects/html-experimente.jsp index a273fb65..5216984f 100644 --- a/src/main/webapp/WEB-INF/views/projects/html-experimente.jsp +++ b/src/main/webapp/WEB-INF/views/projects/html-experimente.jsp @@ -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 index 00000000..071181ff --- /dev/null +++ b/src/main/webapp/WEB-INF/views/test/basis-layout.jsp @@ -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>