From 2ef782a9f9394b1872a22ee70f6d5c0fb093a863 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 15 Apr 2015 15:21:01 +0200 Subject: added some style to the DemoHTMLOutput. --- src/plugins/html/DemoOutput.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 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 style{ + new xml::Element{mgr, head, "style", {{"type", "text/css"}}}}; + head->addChild(style); + Rooted 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 body{new xml::Element{mgr, html, "body"}}; html->addChild(body); @@ -396,4 +406,4 @@ void DemoHTMLTransformer::writeHTML(Handle doc, std::ostream &out, html->serialize(out, "", pretty); } } -} +} \ No newline at end of file -- cgit v1.2.3