diff options
author | Simon Rettberg | 2019-02-04 15:47:41 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-04 15:47:41 +0100 |
commit | dafa62e4e35c2d432fda97d7561e66f5522ccccd (patch) | |
tree | 40c42bd09dc22e63ab859025209df03293518729 | |
parent | Fix extremely stretched layout with only few items (diff) | |
download | bwlp-monitoring-dafa62e4e35c2d432fda97d7561e66f5522ccccd.tar.gz bwlp-monitoring-dafa62e4e35c2d432fda97d7561e66f5522ccccd.tar.xz bwlp-monitoring-dafa62e4e35c2d432fda97d7561e66f5522ccccd.zip |
Write update timestamp to html output
-rwxr-xr-x | main.py | 3 | ||||
-rw-r--r-- | style.css | 10 | ||||
-rw-r--r-- | template.html | 2 |
3 files changed, 12 insertions, 3 deletions
@@ -261,10 +261,11 @@ for entry in reversed(logEntries[cut_amount:]): + entry.msg + '</div></div></div>') # Replace the %CONTENT% in the template with the actual html code. +now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") html = open('template.html') html2 = open('status.html', 'w') for line in html: - html2.write(line.replace('%CONTENT%', code).replace('%LOG%', log)) + html2.write(line.replace('%CONTENT%', code).replace('%LOG%', log).replace('%NOW%', now)) html.close() html2.close() @@ -1,8 +1,9 @@ html { - background: #ffffff; + background: #fff; font: normal 100%/1.4 sans-serif; margin: unset; height: 100%; + color: #000; } body { @@ -200,3 +201,10 @@ a:hover { .log_item:hover { background-color: #efeeee; } + +.now-footer { + text-align: right; + font-size: 10pt; + color: #999; +} + diff --git a/template.html b/template.html index 3638df5..b0c1d3c 100644 --- a/template.html +++ b/template.html @@ -35,7 +35,7 @@ </div> </div> </div> - + <div class="now-footer">%NOW%</div> </body> </html> |