From: Jan Szejko Date: Mon, 6 Nov 2017 15:09:01 +0000 (+0100) Subject: add tag ramka X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/266af096e1dda491ca52be4875bdec5a3315298d?hp=25d4f6d349acfd3dc8bebd2469dd84cde3b5927d add tag ramka (cherry picked from commit 8a57745) --- diff --git a/librarian/epub/style.css b/librarian/epub/style.css index 622c8da..176614d 100644 --- a/librarian/epub/style.css +++ b/librarian/epub/style.css @@ -30,14 +30,14 @@ body, p, h1, h2, h3, h4 { body { - line-height: 1.5em; - margin: 0; + line-height: 1.5em; + margin: 0; } a { - text-decoration: none; - color: #00e; + text-decoration: none; + color: #00e; } a img { @@ -57,11 +57,11 @@ a img { .h2 { - font-size: 2em; - margin: 0; - margin-top: 1.5em; - font-weight: bold; - line-height: 1.5em; + font-size: 2em; + margin: 0; + margin-top: 1.5em; + font-weight: bold; + line-height: 1.5em; } .h3 @@ -75,15 +75,15 @@ a img { .h4 { - font-size: 1em; + font-size: 1em; margin: 0; margin-top: 1.5em; - line-height: 1.5em; + line-height: 1.5em; } p { - margin: 0; + margin: 0; } /* ======================== */ @@ -92,19 +92,19 @@ p .theme-begin { - border-left: 0.1em solid #DDDDDD; - color: #777; - padding: 0 0.5em; - width: 7.5em; - font-style: normal; - font-weight: normal; - font-size: 0.875em; - float: right; - margin-right: -9.5em; - clear: both; - left: 40em; - line-height: 1.5em; - text-align: left; + border-left: 0.1em solid #DDDDDD; + color: #777; + padding: 0 0.5em; + width: 7.5em; + font-style: normal; + font-weight: normal; + font-size: 0.875em; + float: right; + margin-right: -9.5em; + clear: both; + left: 40em; + line-height: 1.5em; + text-align: left; } .annotation-anchor @@ -207,9 +207,9 @@ p text-align: center; font-weight: bold; - font-size: 1.125em; - line-height: 1.5em; - margin-bottom: -0.25em; + font-size: 1.125em; + line-height: 1.5em; + margin-bottom: -0.25em; } .subtitle @@ -282,6 +282,11 @@ div.dedication div.paragaph } +.frame +{ + border: 1px darkgray solid; +} + hr.spacer { height: 3em; diff --git a/librarian/epub/xsltScheme.xsl b/librarian/epub/xsltScheme.xsl index 01870e6..73faf5d 100644 --- a/librarian/epub/xsltScheme.xsl +++ b/librarian/epub/xsltScheme.xsl @@ -67,6 +67,12 @@ + +
+ +
+
+
diff --git a/librarian/fb2/paragraphs.xslt b/librarian/fb2/paragraphs.xslt index 68c6257..d292bee 100644 --- a/librarian/fb2/paragraphs.xslt +++ b/librarian/fb2/paragraphs.xslt @@ -39,6 +39,9 @@

————————

+ + + diff --git a/librarian/html.py b/librarian/html.py index 70fc6e5..c634874 100644 --- a/librarian/html.py +++ b/librarian/html.py @@ -208,7 +208,7 @@ def any_ancestor(element, test): def add_anchors(root): counter = 1 for element in root.iterdescendants(): - if any_ancestor(element, lambda e: e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication') + if any_ancestor(element, lambda e: e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication', 'frame') or e.get('id') == 'nota_red' or e.tag == 'blockquote'): continue diff --git a/librarian/pdf/wl.cls b/librarian/pdf/wl.cls index 76f8530..a747754 100644 --- a/librarian/pdf/wl.cls +++ b/librarian/pdf/wl.cls @@ -350,6 +350,13 @@ Letters={Uppercase} \end{em}% } +\newcommand{\ramka}[1]{% +\noindent\fbox{% +\parbox{\textwidth}{% +#1% +}}% +} + \newcommand{\dlugicytat}[1]{% \begin{quotation}% %\raggedright% diff --git a/librarian/pdf/wl2tex.xslt b/librarian/pdf/wl2tex.xslt index 985847f..024b2e0 100644 --- a/librarian/pdf/wl2tex.xslt +++ b/librarian/pdf/wl2tex.xslt @@ -207,7 +207,7 @@ + match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny|nota|dedykacja|dlugi_cytat|poezja_cyt|motto|ramka"> diff --git a/librarian/xslt/book2html.xslt b/librarian/xslt/book2html.xslt index 9e914c5..778202e 100644 --- a/librarian/xslt/book2html.xslt +++ b/librarian/xslt/book2html.xslt @@ -470,6 +470,10 @@
+ +
+
+
diff --git a/librarian/xslt/book2txt.xslt b/librarian/xslt/book2txt.xslt index 317e581..f41d154 100644 --- a/librarian/xslt/book2txt.xslt +++ b/librarian/xslt/book2txt.xslt @@ -39,6 +39,10 @@ + + + + diff --git a/librarian/xslt/config.xml b/librarian/xslt/config.xml index e9e999c..0ce90e7 100644 --- a/librarian/xslt/config.xml +++ b/librarian/xslt/config.xml @@ -26,6 +26,7 @@ + @@ -131,6 +132,8 @@ + + diff --git a/scripts/master.css b/scripts/master.css index 44fe927..a222548 100644 --- a/scripts/master.css +++ b/scripts/master.css @@ -175,6 +175,10 @@ div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph { font-style: italic; } +div.frame { + border: 1px darkgray solid; +} + hr.spacer { height: 3em; visibility: hidden; diff --git a/tests/files/example-wl.xml b/tests/files/example-wl.xml index d2fd87b..ca17e7b 100644 --- a/tests/files/example-wl.xml +++ b/tests/files/example-wl.xml @@ -92,6 +92,10 @@ autor_utworu, dzielo_nadrzedne, nazwa_utworu, podtytul, tłumacz (z DC)] Cytowany akapit powinien wyglądać jak cytowany akapit. Znaczy, może mieć jakieś dodatkowe wcięcie, jakiś rodzaj wyróżnienia czy coś. +[ramka/akap] + +To jest ramka. W ramce są akapity i inne takie. + [poezja_cyt/strofa] To jest poezja/