From 04db47913e89ae36af6384fa53ccee6a04566371 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 9 Dec 2016 23:06:07 +0100 Subject: [PATCH] reworked ui --- factoriocp.py | 5 +- static/css/sticky-footer.css | 6 ++ views/default.tpl | 55 +++++++++++++- views/footer.tpl | 2 +- views/login.tpl | 12 ++- views/server.tpl | 141 ++++++++++++++++++++--------------- 6 files changed, 151 insertions(+), 70 deletions(-) diff --git a/factoriocp.py b/factoriocp.py index d23950a..d46c66a 100644 --- a/factoriocp.py +++ b/factoriocp.py @@ -43,8 +43,9 @@ def get_servers(): pass return [{ "name": "Creative fun", "desc": "A creative vanilla server for tests.", "version": "0.14.20", "status": "online", "port": "34197" }, { "name": "Vanilla on the rocks", "desc": "Vanilla map with some mods.", "version": "0.14.19", "status": "offline", "port": "34198" }, - { "name": "Mad enemies", "desc": "Hazardous map. A lot of enemies.", "version": "0.14.19", "status": "online", "port": "34199" }, - { "name": "Mad enemies2", "desc": "Just a copy of Mad enemies.", "version": "0.14.20", "status": "offline", "port": "34200" }] + { "name": "Mad enemies", "desc": "Hazardous map. A lot of enemies.", "version": "0.14.19", "status": "offline", "port": "34199" }, + { "name": "Online Map", "desc": "A modded map for friends.", "version": "0.14.19", "status": "online", "port": "34200" }, + { "name": "Mad enemies2", "desc": "Just a copy of Mad enemies.", "version": "0.14.20", "status": "offline", "port": "34201" }] # routing diff --git a/static/css/sticky-footer.css b/static/css/sticky-footer.css index 46578d1..61f1fad 100644 --- a/static/css/sticky-footer.css +++ b/static/css/sticky-footer.css @@ -8,6 +8,12 @@ body { /* Margin bottom by footer height */ margin-bottom: 60px; } + +a.nounderline { + text-decoration: none; + color: dimgrey; +} + .footer { position: absolute; bottom: 0; diff --git a/views/default.tpl b/views/default.tpl index 56305e1..82127d1 100644 --- a/views/default.tpl +++ b/views/default.tpl @@ -3,7 +3,7 @@
-

Servers

+

Server overview

@@ -12,9 +12,8 @@ @@ -23,7 +22,7 @@

Control your Factorio game servers from here.

- + + +
+ + + +
Addressfactorio.bla.com:{{ server['port'] }}
Version{{ server['version'] }}
Admins0bsidian0rder
+
+
+
+
+ Start + Stop + Edit +
+
+
+
+
+ %end + + + %include('footer.tpl', username=username) diff --git a/views/footer.tpl b/views/footer.tpl index b9f15f9..4689694 100644 --- a/views/footer.tpl +++ b/views/footer.tpl @@ -1,7 +1,7 @@ diff --git a/views/login.tpl b/views/login.tpl index 3cea904..d8c4394 100644 --- a/views/login.tpl +++ b/views/login.tpl @@ -19,7 +19,17 @@ - + +
+

+ %if message: +

+ %end +

+