diff --git a/utils.py b/utils.py index aa62133..492adf7 100644 --- a/utils.py +++ b/utils.py @@ -200,25 +200,27 @@ activity_table_html_template = """ document.body.appendChild(buildHtmlTable(JSON.parse({items}))); } + """ activity_table_html_styles = """ -.table { - width: 100%; +table { margin-bottom: 20px; border: 1px solid #dddddd; border-collapse: collapse; } -.table th { +table th { font-weight: bold; padding: 5px; background: #efefef; border: 1px solid #dddddd; } -.table td { +table td { border: 1px solid #dddddd; padding: 5px; -}""" # TODO: fix css for table + text-align:center; +} +""" diff --git a/web.py b/web.py index 8efcaee..e1fa227 100644 --- a/web.py +++ b/web.py @@ -66,11 +66,12 @@ class ActivityDiffHtml: class JS: def on_get(self, req: falcon.request.Request, resp: falcon.response.Response, file: str) -> None: - resp.content_type = falcon.MEDIA_JS if file == 'json2htmltable.js': + resp.content_type = falcon.MEDIA_JS resp.text = utils.html_table_generator elif file == 'table_styles.css': + resp.content_type = 'text/css' resp.text = utils.activity_table_html_styles else: