aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generate_html.py20
-rw-r--r--screen.css12
-rw-r--r--test_generate_html.py4
3 files changed, 19 insertions, 17 deletions
diff --git a/generate_html.py b/generate_html.py
index 8c6a637..e1b931e 100644
--- a/generate_html.py
+++ b/generate_html.py
@@ -73,21 +73,11 @@ def parse_file(filename):
"name": "viewport",
"content": "width=device-width, initial-scale=1.0, " + \
" maximum-scale=2.0, user-scalable=yes"})
- style = et.SubElement(head, "style")
- style.text = """
- body {
- font-size: 120%;
- }
- h1 {
- font-size: 1em;
- }
- article {
- display: none;
- }
- .reference {
- text-align: right;
- }
- """
+ style = et.SubElement(head, "link", attrib={
+ "rel": "stylesheet",
+ "type": "text/css",
+ "href": "screen.css"
+ })
script = et.SubElement(head, "script",
attrib={
"type": "text/javascript",
diff --git a/screen.css b/screen.css
new file mode 100644
index 0000000..8af2360
--- /dev/null
+++ b/screen.css
@@ -0,0 +1,12 @@
+body {
+ font-size: 120%;
+}
+h1 {
+ font-size: 1em;
+}
+article {
+ display: none;
+}
+.reference {
+ text-align: right;
+}
diff --git a/test_generate_html.py b/test_generate_html.py
index eb5a0f8..05e956e 100644
--- a/test_generate_html.py
+++ b/test_generate_html.py
@@ -44,8 +44,8 @@ class TestProcessLosungen(unittest.TestCase):
script_element = root.xpath("//head/script")
self.assertEqual(len(script_element), 1)
self.assertEqual(script_element[0].attrib["src"], "hesla.js")
- script_element = root.xpath("//head/style")
- self.assertEqual(len(script_element), 1)
+ style_element = root.xpath("//head/link[@rel='stylesheet']")
+ self.assertEqual(len(style_element), 1)
meta_element = root.xpath("//head/meta[@content]")
self.assertEqual(unicode(meta_element[0].attrib["content"]),
"width=device-width, initial-scale=1.0, " + \