From 83c85b543ba272509e4759604b729e8abcc3aaf7 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sat, 7 Mar 2015 01:09:35 +0100 Subject: Got impressum working, after a multi-hour struggle --- Makefile | 2 +- impressum.osml | 34 ++++++++++++++++++++++++++++++++++ ontology/webpage.osml | 47 ++++++++++++++++++++++++++++++++++++++++------- style/style.less | 11 +++++++++++ style/typography.less | 22 +++++++++++++++++++++- xsl/webpage.xsl | 46 +++++++++++++++++++++++++++++++++++++++++----- 6 files changed, 148 insertions(+), 14 deletions(-) create mode 100644 impressum.osml diff --git a/Makefile b/Makefile index 8e21c8e..396d6a3 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ style/style.css: style/*.less lessc style/style.less style/style.css #--clean-css="--s1" # Compile all osml files to xml -%.xml: %.osml +%.xml: %.osml ontology/*.osml ousia -F xml -o $@ $< # Compile the xml files to html diff --git a/impressum.osml b/impressum.osml new file mode 100644 index 0000000..34d87f7 --- /dev/null +++ b/impressum.osml @@ -0,0 +1,34 @@ +%{ + Ousía Homepage + + (c) Andreas Stöckel, Benjamin Paaßen 2015 + + This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 + International License. +}% + +\import[ontology]{ontology/webpage} + +\begin{webpage}{Ousía Framework -- Impressum} + +\begin{section} + \title{Impressum} + + Angaben gemäß § 5 TMG + + \subsection{Anschrift} + \address{ + \name{Andreas Stöckel} + \street{Arnikastr.} + \number{5} + \plz{33729} + \city{Bielefeld} + } + + \subsection{Kontakt} + \phone[office]{+49 0521 44698871} + \mail{andreas.stoeckel@googlemail.com} +\end{section} + +\end{webpage} + diff --git a/ontology/webpage.osml b/ontology/webpage.osml index d92d652..e413b91 100644 --- a/ontology/webpage.osml +++ b/ontology/webpage.osml @@ -17,6 +17,7 @@ \childRef[ref=section] % Primitve text +\struct#block \struct#primitive \struct#text[isa=primitive,transparent=true] \primitive[type=string] @@ -28,18 +29,20 @@ \field#subtitle[subtree=true,optional=true] \childRef[ref=primitive] \field - \childRef[ref=paragraph] + \childRef[ref=block] \childRef[ref=subsection] -% Paragraph -\struct#paragraph[transparent=true] - \field - \childRef[ref=primitive] - % Subsection \struct#subsection + \field#subtitle[subtree=true,optional=false] + \childRef[ref=primitive] \field - \childRef[ref=paragraph] + \childRef[ref=block] + +% Paragraph +\struct#paragraph[isa=block,transparent=true] + \field + \childRef[ref=primitive] % Masthead, Pitch \struct#masthead[isa=section] @@ -67,5 +70,35 @@ \field \childRef[ref=primitive] +% addresses + +\struct#contact[isa=block,transparent=true] + \field + \childRef[ref=address] + \childRef[ref=phone] + \childRef[ref=mail] + +\struct#address + \primitive#name[type=string,subtree=true] + \primitive#street[type=string,subtree=true] + \primitive#number[type=int,subtree=true] + \primitive#plz[type=string,subtree=true] + \primitive#city[type=string,subtree=true] + +\typesystem#phone{ + \enum#phone-type + \entry{office} + \entry{home} + \entry{mobile} +} + +\struct#phone + \attributes + \attribute#type[type=phone-type] + \primitive#number[type=string] + +\struct#mail + \primitive[type=string] + \end{ontology} diff --git a/style/style.less b/style/style.less index 5b5d2de..3348e93 100644 --- a/style/style.less +++ b/style/style.less @@ -149,6 +149,17 @@ main a.button:hover { color: white; } +/* + * Addresses + */ + +span.address, span.mail, span.phone { + display: block; +} + +span.address > span { + display: block; +} /* * For screen diff --git a/style/typography.less b/style/typography.less index 336cd9b..d104536 100644 --- a/style/typography.less +++ b/style/typography.less @@ -8,7 +8,6 @@ html { } p { - line-height: 1.75; margin-bottom: 0.5rem; } @@ -48,6 +47,10 @@ header, main { background-color: @color-bg; } +dt { + font-weight: bold; +} + /** * Footnotes */ @@ -62,9 +65,14 @@ sup { * Main text */ +main, footer { + line-height: 1.75; +} + main { h1, h2, h3, h4, h5, h6 { + color: @color-main; margin-top: 0.25em; margin-bottom: 0.25em; } @@ -73,6 +81,18 @@ main { font-size: 200%; } + h2 { + font-size: 150%; + } + + h3 { + font-size: 125%; + } + + h4, h5, h6 { + font-weight: bold; + } + } diff --git a/xsl/webpage.xsl b/xsl/webpage.xsl index c6310e2..26a167a 100644 --- a/xsl/webpage.xsl +++ b/xsl/webpage.xsl @@ -104,11 +104,11 @@ - - + +
- - subsection pitch nav first + + column pitch nav first @@ -116,7 +116,7 @@
- +

@@ -128,6 +128,15 @@
+ + + +
+ + +
+
+

@@ -149,6 +158,33 @@ [] + + + +

+ +
+
+ + +
Adresse:
+
+
+
+
+
+
+
+
+ + +
E-Mail:
+
+ + +
Telefon:
+
+ -- cgit v1.2.3