diff --git a/query2html.py b/query2html.py index 53a66ea..c1a39b7 100644 --- a/query2html.py +++ b/query2html.py @@ -83,10 +83,9 @@ for answer in site.ask(query): img_local = os.path.join(imgdir, img_info.get('filename')) # render html for that part of the document document_part_html = pub_part_template.render( + printout_dict=printout_dict, imgsrc=os.path.join(imgdir, img_info.get('filename')), - text=pagetext_html, - part=printout_dict.get('Part'), - partof=printout_dict.get('Partof')) + text=pagetext_html) all_document_parts += document_part_html # append resulting html from document part to the previous parts if printout_dict['Part'] == printout_dict['Partof']: # when Part == Partof # pass all_document_parts html to pub_template content diff --git a/static/style.css b/static/style.css index 6c1190a..92c607e 100644 --- a/static/style.css +++ b/static/style.css @@ -1,3 +1,12 @@ body{font-size: 12pt;} -div#content img {width: 50%;} \ No newline at end of file +div.part {border: 1px solid #e5e5e5; + margin-bottom: 10px; + margin-top: 10px; + padding: 20px;} + +div#content img {width: 50%;} + + +div.metadata span.key {color: red; + font-weight: bold;} \ No newline at end of file diff --git a/templates/document.html b/templates/document.html index 4de7ca6..4748c77 100644 --- a/templates/document.html +++ b/templates/document.html @@ -7,7 +7,7 @@

{{ title }}

-

+

{{ content }}
diff --git a/templates/document_part.html b/templates/document_part.html index 1f5be00..ee58f18 100644 --- a/templates/document_part.html +++ b/templates/document_part.html @@ -1,11 +1,28 @@
+
+
{{ text | safe }}
-
- Part {{part}} of {{partof}} + + -
\ No newline at end of file + +