Layout für den Ausdruck
authorKai Moritz <kai@juplo.de>
Tue, 11 Feb 2014 15:39:40 +0000 (16:39 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 19 Jan 2016 16:45:41 +0000 (17:45 +0100)
src/main/webapp/WEB-INF/templates/html-head.jsp
src/main/webapp/WEB-INF/templates/test/experimente.jsp
src/main/webapp/WEB-INF/views/test/druck-layout.jsp [new file with mode: 0644]
src/main/webapp/WEB-INF/wro.xml
src/main/webapp/less/print.less [new file with mode: 0644]
src/main/webapp/less/print/head.less [new file with mode: 0644]
src/main/webapp/less/print/layout.less [new file with mode: 0644]
src/main/webapp/less/print/typo.less [new file with mode: 0644]

index 1b74015..098c372 100644 (file)
@@ -7,6 +7,7 @@
 <link rel="stylesheet" type="text/css" href="${base}css/base.css" />
 <style type="text/css">
   @import '${base}css/screen.css' screen;
+  @import '${base}css/print.css' print;
 </style>
 <script src="${base}js/base.js"></script>
 <!--[if IE 8]>
index cb00a9c..3a9ed9d 100644 (file)
@@ -21,6 +21,7 @@
 <ul>
   <li><a href="${base}test/kein-layout.html">Alle Stylings deaktiviert</a></li>
   <li><a href="${base}test/basis-layout.html">Nur das Basis-Layout</a></li>
+  <li><a href="${base}test/druck-layout.html">Die für den Ausdruck angepasste Ansicht</a></li>
   <li><a href="${base}test/tiny.html">Layout für sehr kleine Bildschirmgrößen</a></li>
   <li><a href="${base}test/phone.html">Layout für Smartphones</a></li>
   <li><a href="${base}test/tablet.html">Layout für Tablets</a></li>
diff --git a/src/main/webapp/WEB-INF/views/test/druck-layout.jsp b/src/main/webapp/WEB-INF/views/test/druck-layout.jsp
new file mode 100644 (file)
index 0000000..fcca5a7
--- /dev/null
@@ -0,0 +1,25 @@
+<%@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="test">
+  <t:putAttribute name="title" value="Die für den Ausdruck angepasste Ansicht" 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" />
+    <link rel="stylesheet" type="text/css" href="${base}css/print.css" />
+  </t:putAttribute>
+  <t:putAttribute name="maincontent" type="string">
+    <p>
+      In diese Seite ist nur das Basis-Layout eingebunden
+      (<code>/css/base.css</code>).
+    </p>
+    <section>
+      <h1>Weitere Experimente</h1>
+      <t:insertTemplate template="/WEB-INF/templates/test/experimente.jsp"/>
+    </section>
+    <t:insertTemplate template="/WEB-INF/templates/maincontent.jsp"/>
+  </t:putAttribute>
+</t:insertDefinition>
index fd17812..2dd6f38 100644 (file)
     <css>/less/variables.less</css>
     <css>/less/screen.less</css>
   </group>
+  <group name="print">
+    <css>/less/variables.less</css>
+    <css>/less/print/typo.less</css>
+    <css>/less/print/layout.less</css>
+    <css>/less/print/head.less</css>
+  </group>
+
 
   <!-- Diese werden nur für die explizite Auswahl eines Stylings benötigt -->
   <group name="tablet">
diff --git a/src/main/webapp/less/print.less b/src/main/webapp/less/print.less
new file mode 100644 (file)
index 0000000..ffcb9c6
--- /dev/null
@@ -0,0 +1,29 @@
+@import 'variables.less';
+
+#breadcrumb
+{
+  .droid;
+  color: @schrift;
+  font-weight: normal;
+}
+#breadcrumb strong.b
+{
+  font-weight: normal;
+}
+#breadcrumb ol.b li.b a.b,
+#breadcrumb ol.b li.b strong.b
+{
+  color: @schrift;
+  border-style: none;
+}
+#breadcrumb a.hide
+{
+  display: none;
+}
+#breadcrumb hr.b
+{
+  display: none;
+}
+@import 'print/typo.less';
+@import 'print/layout.less';
+@import 'print/header.less';
diff --git a/src/main/webapp/less/print/head.less b/src/main/webapp/less/print/head.less
new file mode 100644 (file)
index 0000000..db11a6e
--- /dev/null
@@ -0,0 +1,8 @@
+#logo
+{
+  padding-left: .0625em;
+}
+#slogan
+{
+  display: inline-block;
+}
diff --git a/src/main/webapp/less/print/layout.less b/src/main/webapp/less/print/layout.less
new file mode 100644 (file)
index 0000000..392760e
--- /dev/null
@@ -0,0 +1,54 @@
+body
+{
+  font-size: 75%; /** 12px */
+}
+#header hr.h
+{
+  margin: .5em 0;
+}
+.content
+{
+  clear: both;
+}
+.marginal
+{
+  display: none;
+}
+#breadcrumb
+{
+  .droid;
+  color: @schrift;
+  font-weight: normal;
+}
+#breadcrumb strong.b
+{
+  font-weight: normal;
+}
+#breadcrumb ol.b li.b a.b,
+#breadcrumb ol.b li.b strong.b
+{
+  color: @schrift;
+  border-style: none;
+}
+#breadcrumb a.hide
+{
+  display: none;
+}
+#breadcrumb hr.b
+{
+  display: none;
+}
+#nav
+{
+  display: none;
+}
+#footerlinks li.f
+{
+  display: none;
+}
+#footerlinks li#copyright
+{
+  .droid;
+  font-size: 100%;
+  display: block;
+}
diff --git a/src/main/webapp/less/print/typo.less b/src/main/webapp/less/print/typo.less
new file mode 100644 (file)
index 0000000..58e2ca6
--- /dev/null
@@ -0,0 +1,5 @@
+a
+{
+  color: @schrift;
+  border-style: none;
+}