Permalink
Browse files

Reorg'd CSS into: main.css, web.css, and pdf.css

Making a start on re-organising the CSS. Now we have main.css, which is used
by both the PDF and web versions, web.css which is only used by the web
version, and pdf.css which is only used by `prince`.
  • Loading branch information...
1 parent d9fa895 commit d0faec04ec013ba8e8b36a1d6f841a43a03f7c94 @runpaint committed May 12, 2009
Showing with 146 additions and 161 deletions.
  1. +45 −104 templates/{user.css → main.css}
  2. +66 −57 templates/{layout.css → pdf.css}
  3. +1 −0 templates/recipe.html
  4. +34 −0 templates/web.css
@@ -1,3 +1,47 @@
+html {
+ margin: 0;
+ font: 10pt/1.26 "Gill Sans", sans-serif;
+}
+
+body {
+ margin: 0 0 0 13%;
+}
+
+h2, h3, h4, h5, h6 {
+ font-family: "Gill Sans", sans-serif;
+ margin: 2em 0 0.5em 0;
+ page-break-after: avoid;
+}
+
+/*h1 {
+ page-break-before: always;
+ padding: 2em 0 2em 0;
+ margin: 0;
+ font-size: 2.4em;
+ font-weight: 900;
+}*/
+
+h2 {
+ font-size: 1.2em;
+ text-transform: uppercase;
+ font-weight: bold;
+}
+
+h3 {
+ font-size: 1em;
+ font-weight: bold;
+}
+
+q::before {
+ content: "\201C";
+}
+
+q::after {
+ content: "\201D";
+}
+
+
+pre { margin: 1em 1.3em; color: #600; }
/*
"Dive Into Python 3" stylesheet
@@ -77,11 +121,6 @@ form div,#level{float:right}
/* Hide TODOs .todo{color:#ddd} */
.todo{display: none}
-/* links */
-a{text-decoration:none}
-a:hover{color: steelblue; border-bottom:1px solid}
-a:link,.w a{border-bottom:1px dotted}
-a:visited{color:darkorchid}
/* code blocks */
pre{white-space:pre-wrap;padding-left:2.154em;border-left:1px solid #ddd}
@@ -98,19 +137,8 @@ mark{display:inline-block;width:100%;background:#ff8}
li ol,.q{margin:0}
pre a,.w a,pre a:hover{border:0}
-/* Sidebars
-blockquote.tip, blockquote.callout, blockquote.warning {
- border: thin solid black;
-}
-*/
+/* Sidebars */
-/*blockquote.tip {
- border: thin solid black;
- padding: 3px;
-} */
-/*blockquote.tip p:before {
- content:'\272A';
-} */
blockquote.callout h5:before {
font-size: xx-large;
content: '\21F0 \00a0 ';
@@ -127,69 +155,7 @@ h1 code{font-size:xx-large}
h2,h2 code{font-size:x-large}
h3,h3 code{font-size:large}
h4, h5, h6{font-size: medium}
-/*h1:before{content:"Chapter " counter(h1) ". "}*/
-
-/* Give each chapter its own number */
-/*h2{counter-reset:h2;counter-reset:h3}
-h3:before{counter-increment:h2;content:counter(h2) "." counter(h3)}*/
-/*
-h1{counter-reset:h2}
-h2:before{counter-increment:h2;content:counter(h1) "." counter(h2) ". "}
-h2{counter-reset:h3;border-top:1px dotted;padding-top:1.75em}
-h2,h3{margin-top:1.75em}
-#toc + h2{border:0;margin:0;padding:0}
-#toc + h2:before{content:""}
-h3:before{counter-increment:h3;content:counter(h1) "." counter(h2) "." counter(h3) ". "}
-aside{display:block;float:right;font-style:oblique;font-size:xx-large;width:25%;margin:1.75em 0 .75em 1.75em;background:steelblue;color:white;padding:1.75em;border:1px solid;-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em}
-*/
-
-h2,h3 { page-break-before: always }
-/* previous/next navigation links */
-
-.nav a{text-decoration:none;border:0;display:block}
-.nav a:first-child{float:left}
-.nav a:last-child{float:right}
-/*.nav span{font-size:1000%;line-height:1;margin:0;text-shadow:gainsboro 3px 3px 3px} */
-/* footnotes */
-
-.fn {
- display: none; /* default rule */
-
- display: prince-footnote; /* prince-specific rules */
- position: footnote;
- footnote-style-position: inside;
-
- counter-increment: footnote;
- margin-left: 1.4em;
- font-size: 90%;
- line-height: 1.4;
-}
-
-.fn::footnote-call {
- vertical-align: super;
- font-size: 80%;
-}
-
-.fn::footnote-marker {
- vertical-align: super;
- padding-right: 0.4em;
-}
-
-@page {
- /* margin: 27mm 16mm 27mm 16mm;
- size: 7in 9.25in portrait; */
-
- @footnotes {
- border-top: thin solid black;
- padding-top: 0.3em;
- margin-top: 0.6em;
- }
-}
-/*dl {
- margin: 0;
- padding: 0;
-} */
dt.compact {
margin: 0;
padding-right: 1px;
@@ -200,31 +166,6 @@ dt.compact {
dd.compact {
display:inline;
}
-ul#toc {
- list-style: none;
-}
-ul#toc li a:link,a:hover,a,a:visited {
- border-bottom: 0;
- color: black;
- text-decoration: none;
- }
-ul#toc ul a::after {
- content: leader('.') target-counter(attr(href), page);
-}
-li.frontmatter > a::after {
- content: leader('.') target-counter(attr(href), page, lower-roman);
-}
-ul#toc ul.inline-list {
- margin-bottom: 0;
- border-bottom: 0;
- margin-top: 0;
- border-top: 0;
- margin-left: 2%;
- list-style: none;
-}
-ul#toc li.section > a:link {
- font-size: large;
-}
img {
display: block;
margin: 0 auto;
@@ -1,52 +1,3 @@
-/* Sample style sheet for boom!, the book microformat */
-/* written by Hakon Wium Lie and Bert Bos, November 2005 */
-/* You may reuse this style sheet for any purpose without any fees */
-
-html {
- margin: 0;
- font: 10pt/1.26 "Gill Sans", sans-serif;
-}
-
-body {
- margin: 0 0 0 13%;
-}
-
-h2, h3, h4, h5, h6 {
- font-family: "Gill Sans", sans-serif;
- margin: 2em 0 0.5em 0;
- page-break-after: avoid;
-}
-
-/*h1 {
- page-break-before: always;
- padding: 2em 0 2em 0;
- margin: 0;
- font-size: 2.4em;
- font-weight: 900;
-}*/
-
-h2 {
- font-size: 1.2em;
- text-transform: uppercase;
- font-weight: bold;
-}
-
-h3 {
- font-size: 1em;
- font-weight: bold;
-}
-
-q::before {
- content: "\201C";
-}
-
-q::after {
- content: "\201D";
-}
-
-
-pre { margin: 1em 1.3em; color: #600; }
-
@page {
margin: 27mm 16mm 27mm 16mm;
/*size: 7in 9.25in landscape;*/
@@ -248,14 +199,6 @@ code, pre, span.css, span.value, span.declaration {
}
-@media screen, handheld {
- html { margin: 1em; font: 14px "Gill Sans", sans-serif; }
- h1 { margin-bottom: 0.5em }
- div.frontcover, div.backcover, div.halftitlepage, div.titlepage, div.imprint,
- div.dedication, div.foreword, div.toc, div.index { display: none }
-}
-
-
div.frontcover {
page-break-before: never;
width: 100%;
@@ -277,3 +220,69 @@ div.white_page { page: cover; }
font-size: large;
font-weight: bold;
}
+ul#toc {
+ list-style: none;
+}
+ul#toc li a:link,a:hover,a,a:visited {
+ border-bottom: 0;
+ color: black;
+ text-decoration: none;
+ }
+ul#toc ul a::after {
+ content: leader('.') target-counter(attr(href), page);
+}
+li.frontmatter > a::after {
+ content: leader('.') target-counter(attr(href), page, lower-roman);
+}
+ul#toc ul.inline-list {
+ margin-bottom: 0;
+ border-bottom: 0;
+ margin-top: 0;
+ border-top: 0;
+ margin-left: 2%;
+ list-style: none;
+}
+ul#toc li.section > a:link {
+ font-size: large;
+}
+/* footnotes */
+
+.fn {
+ display: none; /* default rule */
+
+ display: prince-footnote; /* prince-specific rules */
+ position: footnote;
+ footnote-style-position: inside;
+
+ counter-increment: footnote;
+ margin-left: 1.4em;
+ font-size: 90%;
+ line-height: 1.4;
+}
+
+.fn::footnote-call {
+ vertical-align: super;
+ font-size: 80%;
+}
+
+.fn::footnote-marker {
+ vertical-align: super;
+ padding-right: 0.4em;
+}
+
+@page {
+ /* margin: 27mm 16mm 27mm 16mm;
+ size: 7in 9.25in portrait; */
+
+ @footnotes {
+ border-top: thin solid black;
+ padding-top: 0.3em;
+ margin-top: 0.6em;
+ }
+}
+h2,h3 { page-break-before: always }
+/* links */
+a{text-decoration:none}
+a:hover{color: steelblue; border-bottom:1px solid}
+a:link,.w a{border-bottom:1px dotted}
+a:visited{color:darkorchid}
View
@@ -23,5 +23,6 @@
%>/">&#x21A9; &nbsp; <%=
prev_e[:title] %></a> <a rel="next" href="/<%= next_e[:section_id] %>/<%= next_e[:id] %>/"><%=
next_e[:title] %> &nbsp; &#x21AA;</a></div>
+ <script type="text/javascript" src="/js/footnotes.js"></script>
</body>
</html>
View
@@ -17,3 +17,37 @@ table {
margin-left: auto;
margin-right: auto;
}
+
+span.fn {
+ display: always;
+ position: static;
+ color: #f30;
+}
+
+a.footnote {
+ vertical-align: super;
+ font-size: 0.7em;
+}
+
+#footnotes {
+ border-top: 1px solid #ccc;
+ margin: 20px 0 20px 0;
+ padding: 10px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+@media screen, handheld {
+ html { margin: 1em; font: 14px "Gill Sans", sans-serif; }
+ h1 { margin-bottom: 0.5em }
+ div.frontcover, div.backcover, div.halftitlepage, div.titlepage, div.imprint,
+ div.dedication, div.foreword, div.toc, div.index { display: none }
+}
+/* previous/next navigation links */
+
+.nav a{text-decoration:none;border:0;display:block}
+.nav a:first-child{float:left}
+.nav a:last-child{float:right}
+/*.nav span{font-size:1000%;line-height:1;margin:0;text-shadow:gainsboro 3px 3px 3px} */

0 comments on commit d0faec0

Please sign in to comment.