diff --git a/README.md b/README.md index b6ebd47..c7a8509 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ The main program with html output is executed by entering python survBot.py -html path_for_html_output ``` +There are example stylesheets in the folder *stylesheets* that can be copied into the path_for_html_output if desired. + The GUI can be loaded via ```shell script diff --git a/stylesheets/desktop.css b/stylesheets/desktop.css new file mode 100644 index 0000000..24e8015 --- /dev/null +++ b/stylesheets/desktop.css @@ -0,0 +1,39 @@ +body { + background-color: #ffffff; + place-items: center; + text-align: center; +} + +td { + border-radius: 4px; + padding: 0px; +} + +th { + background-color: #999; + border-radius: 4px; + padding: 3px 1px; +} + +a:link, a:visited { + background-color: #ccc; + color: #000; + text-decoration: none; + display: block; + border-radius: 4px; + border: 1px solid #bbb; +} + +a:hover { + background-color: #aaa; + display: block; +} + +.blink-bg { + animation: blinkingBackground 2s infinite; +} +@keyframes blinkingBackground{ + 0% { background-color: #ffcc00;} + 50% { background-color: #ff3200;} + 100% { background-color: #ffcc00;} +} diff --git a/stylesheets/mobile.css b/stylesheets/mobile.css new file mode 100644 index 0000000..ac7b549 --- /dev/null +++ b/stylesheets/mobile.css @@ -0,0 +1,43 @@ +body { + background-color: #ffffff; + place-items: center; + text-align: center; +} + +td { + border-radius: 4px; + padding: 10px 2px; +} + +th { + background-color: #999; + border-radius: 4px; + padding: 10px, 2px; +} + +a:link { + background-color: #ccc; + color: #000; + text-decoration: none; + display: block; + border-radius: 4px; + border: 1px solid #bbb; +} + +a:hover { + background-color: #aaa; + display: block; +} + +.hidden-mobile { + display: none; +} + +.blink-bg { + animation: blinkingBackground 2s infinite; +} +@keyframes blinkingBackground{ + 0% { background-color: #ffee00;} + 50% { background-color: #ff3200;} + 100% { background-color: #ffee00;} +} diff --git a/write_utils.py b/write_utils.py index b6558fa..785805d 100644 --- a/write_utils.py +++ b/write_utils.py @@ -14,19 +14,13 @@ def write_html_header(fobj, refresh_rate=10): header = ['', '', '
', - '', + ' ', + ' ', '', f'', '', '', - '', - '', ''] - # style = ['',] for item in header: fobj.write(item + '\n')