From 7aba204a2e61828574fa490b222c2be260a7a5bf Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 29 Jun 2014 13:18:09 +0300 Subject: [PATCH] hostname appears in the top bar now --- src/handlers.py | 4 +++- static/css/main.css | 10 ++++++++++ templates/main.html | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/handlers.py b/src/handlers.py index 8e35d79..e29c8b6 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -19,6 +19,7 @@ import base64 import json import logging import os +import socket from tornado.web import RequestHandler, HTTPError, asynchronous @@ -142,7 +143,8 @@ class NotFoundHandler(BaseHandler): class MainHandler(BaseHandler): @BaseHandler.auth() def get(self): - self.render('main.html') + self.render('main.html', + hostname=socket.gethostname()) class ConfigHandler(BaseHandler): diff --git a/static/css/main.css b/static/css/main.css index 702d5e2..62b5e04 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -178,6 +178,12 @@ div.add-camera-message { margin-top: 30px; } +div.hostname { + vertical-align: middle; + display: inline-block; + font-size: 27px; +} + /* settings */ @@ -755,6 +761,10 @@ img.camera-progress { box-shadow: 0px 0px 10px rgba(0,0,0,0.5); background-color: rgba(40, 40, 40, 0.9); } + + div.hostname { + display: none; + } } @media all and (max-width: 400px) { diff --git a/templates/main.html b/templates/main.html index 8f18eaf..dd541e9 100644 --- a/templates/main.html +++ b/templates/main.html @@ -21,6 +21,7 @@
Apply
+ {% if hostname %}
{{hostname}}
{% endif %} {% endif %}