[geeklog-hg] geeklog: Denim: improved printable format page

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed May 23 14:07:38 EDT 2012


changeset 8707:a7b5f3f50d20
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/a7b5f3f50d20
user: dengen
date: Thu May 24 03:05:08 2012 +0900
description:
Denim: improved printable format page

diffstat:

 public_html/layout/denim/article/printable.thtml |   56 ++----
 public_html/layout/denim/css_ltr/print.css       |  186 +++++++++++++++++++++++
 public_html/layout/denim/css_rtl/print.css       |  186 +++++++++++++++++++++++
 public_html/layout/denim/functions.php           |    2 +-
 public_html/layout/denim/print.css               |   55 ------
 5 files changed, 396 insertions(+), 89 deletions(-)

diffs (truncated from 517 to 300 lines):

diff -r 591fe2c05985 -r a7b5f3f50d20 public_html/layout/denim/article/printable.thtml
--- a/public_html/layout/denim/article/printable.thtml	Mon May 21 12:46:24 2012 +0200
+++ b/public_html/layout/denim/article/printable.thtml	Thu May 24 03:05:08 2012 +0900
@@ -1,39 +1,29 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html{lang_attribute}{xmlns}>
+<html{lang_attribute}>
 <head>
-  <meta name="robots" content="NOINDEX"{xhtml}>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"{xhtml}>
-  <meta http-equiv="Content-Style-Type" content="text/css"{xhtml}>
-  <link rel="stylesheet" type="text/css" href="{layout_url}/print.css"{xhtml}>
-  <link rel="stylesheet" type="text/css" media="print" href="{layout_url}/print.css"{xhtml}>
-  <link rel="canonical" href="{article_url}"{xhtml}>
-
-<title>{page_title}</title>
-
+  <meta name="robots" content="NOINDEX">
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <title>{page_title}</title>
+  <link rel="stylesheet" type="text/css" href="{layout_url}/css_{direction}/print.css">
+  <link rel="stylesheet" type="text/css" media="print" href="{layout_url}/css/print.css">
+  <link rel="shortcut icon" href="{layout_url}/images/favicon.ico">
+  <link rel="canonical" href="{article_url}">
 </head>
-
-<body dir="{direction}">
-
-<!-- article/printable.thtml { -->
-
-  <h1 id="printable-story_title">{story_title}</h1>
-
-  <ul id="printable-author">
-    <li>{story_date}</li>
-    <li>{lang_contributedby}{story_author}</li>
-  </ul>
-
-  {story_text_no_br}
+<body id="print" dir="{direction}">
+  <div id="wrapper">
+    <div id="header">
+      <h2>{story_title}</h2>
+      <p>{lang_contributedby} {story_author} {story_date}</p>
+    </div>
+    <div id="story">
+      {story_text_no_br}
+    </div>
     <p>{comments_with_count}</p>
-
-    <hr{xhtml}>
-
-  <dl id="printable-url">
-    <dt>{site_name}</dt>
-    <dd><a href="{article_url}">{article_url}</a></dd>
-  </dl>
-
-<!-- } article/printable.thtml -->
-
+    <hr class="hidden">
+    <div id="footer">
+      <p>{page_title} - {site_name}<br>{article_url}</p>
+    </div>
+  </div>
 </body>
 </html>
diff -r 591fe2c05985 -r a7b5f3f50d20 public_html/layout/denim/css_ltr/print.css
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/denim/css_ltr/print.css	Thu May 24 03:05:08 2012 +0900
@@ -0,0 +1,186 @@
+/* STYLESHEET FOR PRINTOUTS */
+
+body, div,
+p, blockquote, pre, code,
+dl, dt, dd,
+fieldset,
+form, legend {
+  margin: 0;
+  padding: 0;
+  text-align: left; /* rtl */
+}
+
+label {
+  text-align: left; /* rtl */
+}
+
+body {
+  background-color: #FFF;
+  border: none;
+  color: #000;
+  font-size: small; /* 10pt */
+  font-family: verdana, arial, sans-serif;
+  font-weight: normal; 
+  line-height: 1.3em;
+}
+
+img {
+  border: none;
+  text-align: left; /* rtl */
+}
+
+a:link, a:visited, a:active {
+  color: #105CB6;
+  text-decoration: none;
+}
+a:hover {
+  color: #3388ff;
+  text-decoration: underline;
+}
+
+p {
+  padding-bottom: 1em;
+}
+
+ul {
+  margin: 0.5em 0 0.5em 2.5em; /* rtl */
+  padding: 0;
+}
+
+ol {
+  margin: 0.5em 0 0.5em 2.5em; /* rtl */
+  padding-left: 0.5em; /* rtl */
+}
+
+li {
+  margin: 0.5em 0;
+  padding: 0;
+}
+
+dl {
+  margin: 1em 0;
+}
+
+dt {
+  margin: 0.5em 0;
+}
+
+dd {
+  margin: 0.5em 0 0.5em 2.5em; /* rtl */
+}
+
+h1, h2, h3, h4 {
+  font-family: 'Trebuchet MS', sans-serif;
+}
+h1 {
+  font-size: 2em;
+  margin: 16px 0;
+}
+h2 {
+  font-size: 1.5em;
+  margin: 14px 0;
+  font-weight: normal;
+}
+h3 {
+  font-size: 1.2em;
+  margin: 14px 0;
+}
+h4 {
+  font-size: 1em;
+  margin: 15px 0;
+}
+h5 {
+  font-size: 0.8em;
+  margin: 16px 0;
+}
+h6 {
+  font-size: 0.7em;
+  margin: 18px 0;
+}
+
+.hidden {
+  display: none;
+}
+
+table {
+  font-family: verdana, arial, sans-serif;
+  text-align: left; /* rtl */
+  border-collapse: collapse;
+  margin: 1em 0.5em;
+}
+
+tr {
+  margin: 0;
+  padding: 0;
+  vertical-align: middle;
+}
+
+th,
+td {
+  margin: 0;
+  padding: 0.2em 0.6em;
+  vertical-align: middle;
+  line-height: 160%;
+  border: 1px solid #000;
+}
+
+th {
+  text-align: left; /* rtl */
+  font-weight: bold;
+  background: #F5F5F5;
+}
+
+ at media screen {
+  #wrapper {
+    margin: 100px;
+  }
+}
+
+ at media print {
+  #wrapper {
+    margin: 0px;
+  }
+}
+
+#wrapper div#header {
+  width: 100%;
+}
+
+#print div#header h2 {
+  font-size: 1.5em;
+  font-weight: bold; 
+  line-height: 1.5em;
+
+  padding: 5px 0px;
+  border-top: 1px solid #CCC;
+  border-bottom: 1px solid #CCC;
+}
+
+ at media print {
+  #print div#header h2 {
+    border-top: 1px solid #000;
+    border-bottom: 1px solid #000;
+  }
+}
+
+#print div#header p {
+  font-size: 0.9em;
+  text-align: right; /* rtl */
+  padding: 2px 0;
+}
+
+#print div#story {
+  padding: 1em 0;
+}
+
+#print div#footer {
+  font-size: 0.85em;
+  padding: 5px 0px;
+  border-top: 1px solid #CCC;
+}
+
+ at media print {
+  #print div#footer {
+    border-top: 1px solid #000;
+  }
+}
diff -r 591fe2c05985 -r a7b5f3f50d20 public_html/layout/denim/css_rtl/print.css
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/denim/css_rtl/print.css	Thu May 24 03:05:08 2012 +0900
@@ -0,0 +1,186 @@
+/* STYLESHEET FOR PRINTOUTS */
+
+body, div,
+p, blockquote, pre, code,
+dl, dt, dd,
+fieldset,
+form, legend {
+  margin: 0;
+  padding: 0;
+  text-align: right; /* rtl */
+}
+
+label {
+  text-align: right; /* rtl */
+}
+
+body {
+  background-color: #FFF;
+  border: none;
+  color: #000;
+  font-size: small; /* 10pt */
+  font-family: verdana, arial, sans-serif;
+  font-weight: normal; 
+  line-height: 1.3em;
+}
+
+img {
+  border: none;
+  text-align: right; /* rtl */
+}
+
+a:link, a:visited, a:active {
+  color: #105CB6;
+  text-decoration: none;
+}
+a:hover {
+  color: #3388ff;
+  text-decoration: underline;
+}
+



More information about the geeklog-cvs mailing list