Added master.css stylesheet for HTML books.
authorMarek Stępniowski <marek@stepniowski.com>
Thu, 28 Aug 2008 17:02:55 +0000 (19:02 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Thu, 28 Aug 2008 17:02:55 +0000 (19:02 +0200)
Added support for autor_utworu, nazwa_utworu and dzielo_nadrzedne tags.

bin/book2html.xslt
bin/master.css [new file with mode: 0644]

index f3223d7..158caeb 100644 (file)
     </html>
 </xsl:template>
 
+
 <xsl:template match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny">
+    <xsl:if test="nazwa_utworu">
+        <h1>
+            <xsl:apply-templates select="autor_utworu|dzielo_nadrzedne|nazwa_utworu" mode="header" />
+        </h1>
+    </xsl:if>
     <xsl:apply-templates />
 </xsl:template>
 
+<xsl:template match="autor_utworu" mode="header">
+    <span class="author"><xsl:apply-templates mode="inline" /></span>
+</xsl:template>
+
+<xsl:template match="nazwa_utworu" mode="header">
+    <span class="title"><xsl:apply-templates mode="inline" /></span>
+</xsl:template>
+
+<xsl:template match="dzielo_nadrzedne" mode="header">
+    <span class="collection"><xsl:apply-templates mode="inline" /></span>
+</xsl:template>
+
 <xsl:template match="naglowek_akt|naglowek_czesc">
     <h2><xsl:apply-templates mode="inline" /></h2>
 </xsl:template>
diff --git a/bin/master.css b/bin/master.css
new file mode 100644 (file)
index 0000000..1922298
--- /dev/null
@@ -0,0 +1,118 @@
+body {
+    font-size: 16px;
+    font: Georgia, "Times New Roman", serif;
+    line-height: 1.5em;
+    margin: 3em;
+    max-width: 36em;
+}
+
+a {
+    color: blue;
+    text-decoration: none;
+}
+
+/* =================================================== */
+/* = Common elements: headings, paragraphs and lines = */
+/* =================================================== */
+h1 {
+    font-size: 3em;
+    margin: 1.5em 0 0;
+    text-align: center;
+    line-height: 1.5em;
+    font-weight: bold;
+}
+
+h2 {
+    font-size: 2em;
+    margin: 1.5em 0 0;
+    font-weight: bold;
+    line-height: 1.5em;
+}
+
+h3 {
+    font-size: 1.5em;
+    margin: 1.5em 0 0;
+    font-weight: normal;
+    line-height: 1.5em;
+}
+
+h4 {
+    font-size: 1em;
+    margin: 1.5em 0 0;
+    line-height: 1.5em;
+}
+
+p {
+    margin: 0;
+}
+
+/* ======================== */
+/* = Footnotes and themes = */
+/* ======================== */
+.theme-begin {
+    border-left: 0.1em solid #DDDDDD;
+    color: #666;
+    float: right;
+    margin: 0 -9.5em 0 0;
+    padding: 0 0.5em;
+    width: 7.5em;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 16px;
+}
+
+.annotation {
+    font-style: normal;
+    font-weight: normal;
+    font-size: 16px;
+}
+
+#footnotes .annotation {
+    display: block;
+    float: left;
+    width: 2.5em;
+    clear: both;
+}
+
+#footnotes div {
+    margin: 1.5em 0 0 0;
+}
+
+#footnotes p {
+    margin-left: 2.5em;
+}
+
+/* =================== */
+/* = Custom elements = */
+/* =================== */
+span.author {
+    font-size: 0.9em;
+    display: block;
+    line-height: 1.5em;
+}
+
+span.collection {
+    font-size: 0.6em;
+    display: block;
+    line-height: 1.5em;
+    margin-bottom: -0.8em;
+}
+
+div.didaskalia {
+    font-style: italic;
+    margin: 0.5em 0 0;
+}
+
+div.kwestia {
+    margin: 0.5em 0 0;
+}
+
+p.paragraph {
+    text-align: justify;
+    margin: 1.5em 0 0;
+}
+
+div.fragment {
+    border-bottom: 0.1em solid #999;
+    padding-bottom: 1.5em;
+}