From 3eca37afd20bc9a62ceba9d5de35887820b1f3ec Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 22 Oct 2014 20:46:18 -0700 Subject: [PATCH] Added mobile device friendliness --- homeassistant/components/http/__init__.py | 3 +++ .../http/www_static/polymer/event-fire-dialog.html | 7 +++++++ .../http/www_static/polymer/home-assistant-main.html | 9 +++++++-- .../http/www_static/polymer/service-call-dialog.html | 7 +++++++ .../components/http/www_static/polymer/state-card.html | 4 ++++ .../http/www_static/polymer/state-set-dialog.html | 9 ++++++++- 6 files changed, 36 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index b5bf8900356..642d3ab61a4 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -390,6 +390,9 @@ class RequestHandler(BaseHTTPRequestHandler): " src='/static/polymer/bower_components/" "platform/platform.js'>" "" + "" "" "" diff --git a/homeassistant/components/http/www_static/polymer/event-fire-dialog.html b/homeassistant/components/http/www_static/polymer/event-fire-dialog.html index 9a132769329..dff309b6b07 100644 --- a/homeassistant/components/http/www_static/polymer/event-fire-dialog.html +++ b/homeassistant/components/http/www_static/polymer/event-fire-dialog.html @@ -16,6 +16,13 @@ .eventContainer { margin-left: 30px; } + + @media all and (max-width: 620px) { + .eventContainer { + display: none; + } + } + diff --git a/homeassistant/components/http/www_static/polymer/home-assistant-main.html b/homeassistant/components/http/www_static/polymer/home-assistant-main.html index ef4243942e7..721b2daf766 100644 --- a/homeassistant/components/http/www_static/polymer/home-assistant-main.html +++ b/homeassistant/components/http/www_static/polymer/home-assistant-main.html @@ -23,12 +23,17 @@ core-toolbar { background: #03a9f4; - font-size: 1.5rem; + font-size: 1.4rem; color: white; } + .content { + padding-bottom: 75px; + padding-right: 10px; + } + paper-fab { - position: absolute; + position: fixed; bottom: 10px; right: 10px; } diff --git a/homeassistant/components/http/www_static/polymer/service-call-dialog.html b/homeassistant/components/http/www_static/polymer/service-call-dialog.html index 4429623081e..fce95b77a72 100644 --- a/homeassistant/components/http/www_static/polymer/service-call-dialog.html +++ b/homeassistant/components/http/www_static/polymer/service-call-dialog.html @@ -16,6 +16,13 @@ .serviceContainer { margin-left: 30px; } + + @media all and (max-width: 620px) { + .serviceContainer { + display: none; + } + } + diff --git a/homeassistant/components/http/www_static/polymer/state-card.html b/homeassistant/components/http/www_static/polymer/state-card.html index 95470205e61..69a61783c6f 100755 --- a/homeassistant/components/http/www_static/polymer/state-card.html +++ b/homeassistant/components/http/www_static/polymer/state-card.html @@ -23,6 +23,10 @@ font-size: 1.5rem; } + .header .state { + text-align: right; + } + .subheader { margin-top: -5px; color: darkgrey; diff --git a/homeassistant/components/http/www_static/polymer/state-set-dialog.html b/homeassistant/components/http/www_static/polymer/state-set-dialog.html index acdac30b3b8..de04b725afb 100644 --- a/homeassistant/components/http/www_static/polymer/state-set-dialog.html +++ b/homeassistant/components/http/www_static/polymer/state-set-dialog.html @@ -16,6 +16,13 @@ .stateContainer { margin-left: 30px; } + + @media all and (max-width: 620px) { + .stateContainer { + display: none; + } + } + @@ -77,7 +84,7 @@ this.$.inputEntityID.value, this.$.inputState.value, JSON.parse(this.$.inputData.value) - ) + ); } });