summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-04-15 15:21:01 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:24:19 +0200
commit2ef782a9f9394b1872a22ee70f6d5c0fb093a863 (patch)
tree0f93b5b75d09954af4b1b95c768bfdefc37f828f /src
parentba2fcfbb0e16112e4989a2466fa635a6f9561cff (diff)
added some style to the DemoHTMLOutput.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/html/DemoOutput.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/html/DemoOutput.cpp b/src/plugins/html/DemoOutput.cpp
index 42c4080..6c62a6b 100644
--- a/src/plugins/html/DemoOutput.cpp
+++ b/src/plugins/html/DemoOutput.cpp
@@ -375,6 +375,16 @@ void DemoHTMLTransformer::writeHTML(Handle<Document> doc, std::ostream &out,
head->addChild(title);
title->addChild(
new xml::Text(mgr, title, "Test HTML Output for " + doc->getName()));
+ // add some stylish styles
+ Rooted<xml::Element> style{
+ new xml::Element{mgr, head, "style", {{"type", "text/css"}}}};
+ head->addChild(style);
+ Rooted<xml::Text> css{new xml::Text{mgr, style,
+ "body { font-family: 'CMU Serif', "
+ "serif;}\n p { text-align: justify; "
+ "hyphens: auto; }"}};
+ style->addChild(css);
+
// add the body Element
Rooted<xml::Element> body{new xml::Element{mgr, html, "body"}};
html->addChild(body);
@@ -396,4 +406,4 @@ void DemoHTMLTransformer::writeHTML(Handle<Document> doc, std::ostream &out,
html->serialize(out, "<!DOCTYPE html>", pretty);
}
}
-}
+} \ No newline at end of file