diff --git a/helios/media/main.css b/helios/media/main.css index 43f4dd73d..cfbdeb52e 100644 --- a/helios/media/main.css +++ b/helios/media/main.css @@ -66,3 +66,40 @@ table.pretty th, td { padding: 0.3em; } +/* Mobile responsive styles */ +@media screen and (max-width: 768px) { + body { + overflow-x: hidden; + } + + #content { + position: relative; + width: 100%; + margin-left: 0; + padding: 10px 15px; + box-sizing: border-box; + border-left: none; + border-right: none; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } + + #header, #footer { + position: sticky; + left: 0; + width: 100%; + background: #eee; + } + + /* Keep table as normal table, let content scroll */ + table.pretty { + width: auto; + min-width: 100%; + } + + table.pretty th, + table.pretty td { + white-space: nowrap; + } +} + diff --git a/helios/templates/base.html b/helios/templates/base.html index 075739f40..247ca7d53 100644 --- a/helios/templates/base.html +++ b/helios/templates/base.html @@ -7,6 +7,7 @@ xml:lang="{% firstof LANGUAGE_CODE 'en' %}" lang="{% firstof LANGUAGE_CODE 'en' %}">
+