mirror of
https://github.com/norohind/SquadsActivityMonitor.git
synced 2025-04-13 05:17:12 +03:00
fix css for html views
This commit is contained in:
parent
f41625c160
commit
c51d8a1b3b
12
utils.py
12
utils.py
@ -200,25 +200,27 @@ activity_table_html_template = """
|
||||
document.body.appendChild(buildHtmlTable(JSON.parse({items})));
|
||||
}
|
||||
</script>
|
||||
<link type="text/css" rel="stylesheet" href="/js/table_styles.css">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>"""
|
||||
|
||||
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;
|
||||
}
|
||||
"""
|
||||
|
3
web.py
3
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user