From 1731d0673c010289adc2b83830565300e5fd0406 Mon Sep 17 00:00:00 2001 From: David Grigg Date: Fri, 18 Aug 2023 16:18:29 +1000 Subject: [PATCH] Added dedication and styling --- src/epub/css/local.css | 39 ++++++++++++++++++++++++++++------ src/epub/text/dedication.xhtml | 15 +++++++++++++ 2 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 src/epub/text/dedication.xhtml diff --git a/src/epub/css/local.css b/src/epub/css/local.css index a516af7..3f1735d 100644 --- a/src/epub/css/local.css +++ b/src/epub/css/local.css @@ -1,6 +1,37 @@ @charset "utf-8"; @namespace epub "http://www.idpf.org/2007/ops"; + +/* Centered dedications */ +section[epub|type~="dedication"]{ + text-align: center; +} + +section[epub|type~="dedication"] > *{ + display: inline-block; + margin: auto; + margin-top: 3em; + max-width: 80%; +} + +@supports(display: flex){ + section[epub|type~="dedication"]{ + align-items: center; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: center; + min-height: calc(98vh - 3em); + padding-top: 3em; + } + + section[epub|type~="dedication"] > *{ + margin: 0; + } +} +/* End centered dedications */ + +/* bridgeheads */ [epub|type~="bridgehead"]{ display: inline-block; font-style: italic; @@ -12,10 +43,4 @@ [epub|type~="bridgehead"] i{ font-style: normal; } - -[epub|type~="z3998:hymn"] [epub|type~="bridgehead"], -[epub|type~="z3998:poem"] [epub|type~="bridgehead"], -[epub|type~="z3998:song"] [epub|type~="bridgehead"], -[epub|type~="z3998:verse"] [epub|type~="bridgehead"]{ - text-align: justify; -} +/* end bridgeheads */ \ No newline at end of file diff --git a/src/epub/text/dedication.xhtml b/src/epub/text/dedication.xhtml new file mode 100644 index 0000000..96436ae --- /dev/null +++ b/src/epub/text/dedication.xhtml @@ -0,0 +1,15 @@ + + + + Dedication + + + + +
+

To
+Charles Lyell, Esq, F.R.S.
+This second edition is dedicated with grateful pleasure, as an acknowledgment that the chief part of whatever scientific merit this journal and the other works of the author may possess, has been derived from studying the well-known and admirable Principles of Geology.

+
+ +