diff options
-rw-r--r-- | public/img/status-closed.png | bin | 0 -> 6893 bytes | |||
-rw-r--r-- | public/img/status-open.png | bin | 0 -> 6267 bytes | |||
-rw-r--r-- | public/img/status-unknown.png | bin | 0 -> 6081 bytes | |||
-rwxr-xr-x | scripts/status_script.py | 17 | ||||
-rw-r--r-- | template/template/template.html | 3 |
5 files changed, 14 insertions, 6 deletions
diff --git a/public/img/status-closed.png b/public/img/status-closed.png Binary files differnew file mode 100644 index 0000000..80021c3 --- /dev/null +++ b/public/img/status-closed.png diff --git a/public/img/status-open.png b/public/img/status-open.png Binary files differnew file mode 100644 index 0000000..712b36c --- /dev/null +++ b/public/img/status-open.png diff --git a/public/img/status-unknown.png b/public/img/status-unknown.png Binary files differnew file mode 100644 index 0000000..26f04d0 --- /dev/null +++ b/public/img/status-unknown.png diff --git a/scripts/status_script.py b/scripts/status_script.py index 1c229e0..8881735 100755 --- a/scripts/status_script.py +++ b/scripts/status_script.py @@ -31,21 +31,30 @@ class SublabStatus(object): if __name__ == '__main__': s = SublabStatus() if s.door_status() == 'open': - colors = ('#0f0', '#222') + colors = ('#0f0', '#222', 'status-open.png') elif s.door_status() == 'closed': - colors = ('#222', '#f00') + colors = ('#222', '#f00', 'status-closed.png') else: - colors = ('#222', '#222') + colors = ('#222', '#222', 'status-unknown.png') css = ''' span.sublabopen { color: %s; } - span.sublabclosed { color: %s; } + +#statusimage { + background: url(../img/%s) ; + height: 100px; + width: 100px; + position: absolute; + right: 20px; +} + + ''' % colors path = os.path.realpath(os.path.dirname(__file__)) diff --git a/template/template/template.html b/template/template/template.html index 8f502f8..a2f8b78 100644 --- a/template/template/template.html +++ b/template/template/template.html @@ -20,7 +20,6 @@ <link rel="stylesheet" href="/css/trieste.status.css" type="text/css"> <link rel="stylesheet" href="/css/nautilus.status.css" type="text/css"> <link rel="stylesheet" href="/css/sublab.status.css" type="text/css"> - <link rel="stylesheet" href="/css/door.status.css" type="text/css"> <link rel="shortcut icon" href="/img/favicon.png"> <link rel="space-api" href="/status.json" /> </head> @@ -36,7 +35,7 @@ <p class="header"> <span class="box header">[ <a href="/mate">mate</a> und technik ]</span> </p> - <img class="status" src="img/status.png"> + <div id="statusimage"></div> <h1> Das sublab - ein Hackerspace in Leipzig </h1> |