From 5f7b231d604de6f6389c9c4867e168ba88c3f404 Mon Sep 17 00:00:00 2001 From: Jonas Weinz Date: Sat, 23 Mar 2019 16:32:55 +0100 Subject: [PATCH] better theming --- index.html | 1 + main.js | 5 +++-- style.css | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 758e041..3d188ea 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,7 @@ + diff --git a/main.js b/main.js index 09c8b4d..1165331 100644 --- a/main.js +++ b/main.js @@ -24,10 +24,11 @@ b_local_game = create_game_container.create_button("Local Game"); // register container: register_container = main_menu.create_infocontainer(); -register_container.create_label("Register or login to play online"); +register_container.create_label("Login to play online"); i_register_username = register_container.create_input("username"); i_register_pw = register_container.create_input("password", true); b_register = register_container.create_button("register/login"); +register_container.create_label("(creates new account for a new username)"); // logout: logout_container = sub_menu.create_infocontainer(); @@ -239,7 +240,7 @@ login = function(){ connection.close(); } connection = new WebsocketConnection(server_url, server_port, grid, l_status, match_slot_container, match_control, login_callback, on_connection_error); - connection.connect(i_register_username.value, i_register_pw.value); + connection.connect(i_register_username.value.toLowerCase(), i_register_pw.value); } search_match = function() diff --git a/style.css b/style.css index 1a09803..ee17b99 100644 --- a/style.css +++ b/style.css @@ -165,7 +165,7 @@ a:visited { } .infobar-label { - color: white; + color: rgba(224, 217, 235, 0.8); display: flex; flex-direction: column; font-size: calc(2 * var(--border-radius)); @@ -185,7 +185,7 @@ a:visited { border: none; outline: 0; transition-duration: 0.3s; - background: rgba(0, 0, 0, 0.5); + background: rgba(126,87,194, 0.2) ; color: rgb(255, 255, 255); font-size: calc(2.8 * var(--border-radius)); height: calc(4 * var(--border-radius)); @@ -278,11 +278,11 @@ a:visited { .infobar-button:hover { - background: rgba(126,87,194, 0.2); + background: rgba(126,87,194, 0.5); } .infobar-button:active { - background: rgba(126,87,194, 0.4); + background: rgba(126,87,194, 0.8); } .infobar-button:disabled { @@ -296,7 +296,7 @@ a:visited { border: none; outline: 0; transition-duration: 0.3s; - background: rgba(0, 0, 0, 0.2); + background: rgba(126,87,194, 0.2); color: rgb(255, 255, 255); font-size: calc(3 * var(--border-radius)); height: calc(4 * var(--border-radius));