From 793d39323efb578a15bfe9b2d979274b6290e1ed Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 6 Mar 2016 16:34:20 +1300 Subject: Underscores suck --- index.html | 14 +++++++------- petrichor.css | 18 +++++++++--------- petrichor.js | 32 ++++++++++++++++---------------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/index.html b/index.html index 067f8ed..5fa7934 100644 --- a/index.html +++ b/index.html @@ -11,16 +11,16 @@
-
+
- - + +
-
- +
+
- - + + diff --git a/petrichor.css b/petrichor.css index 1cb9696..72d1b6e 100644 --- a/petrichor.css +++ b/petrichor.css @@ -13,7 +13,7 @@ body,html width: 100%; } -.ease_opacity +.ease-opacity { transition: opacity ease 0.3s; } @@ -67,7 +67,7 @@ a.user display: block; } -#password_prompt, #password_entry +#password-prompt, #password-entry { display: block; font-size: 20px; @@ -80,12 +80,12 @@ a.user left: 50px; } -#message_container +#message-container { font-size: 20px; } -#password_entry +#password-entry { color: #333; opacity: inherit; @@ -95,7 +95,7 @@ a.user border-radius: 5px; } -#message_container, #password_container +#message-container, #password-container { height: 96px; display: table; @@ -106,14 +106,14 @@ a.user transition: visibility 0s linear 0.15s, opacity 0.15s linear; } -#password_container.shown, #message_container.shown +#password-container.shown, #message-container.shown { visibility: visible; opacity: 1; transition: opacity 0.15s linear 0.05s; } -#message_label, #password_container > form +#message-label, #password-container > form { display: table-cell; vertical-align: middle; @@ -139,7 +139,7 @@ a.user font-size: 240px; } -#session_list +#session-list { font-family: inherit; position: absolute; @@ -156,7 +156,7 @@ a.user -moz-appearance: none; /* only for when testing */ } -#session_list:hover +#session-list:hover { opacity: 1; } diff --git a/petrichor.js b/petrichor.js index f56d450..b5e06ed 100644 --- a/petrichor.js +++ b/petrichor.js @@ -5,23 +5,23 @@ time_remaining = 0 function show_prompt(text, type) { password_prompt = true; - label = document.getElementById('password_label'); + label = document.getElementById('password-label'); label.innerHTML = text; users = document.getElementById('users'); for (i in users.children) { user = users.children[i]; - if (user.id != ('user_' + selected_user) && user.style != null) + if (user.id != ('user-' + selected_user) && user.style != null) user.style.opacity = 0.1; } - entry = document.getElementById('password_entry'); + entry = document.getElementById('password-entry'); entry.value = ''; - var selected = document.getElementById("user_" + selected_user); + var selected = document.getElementById("user-" + selected_user); rect = selected.getBoundingClientRect(); - cont = document.getElementById('password_container'); + cont = document.getElementById('password-container'); cont.style.top = rect.top; if (cont.style.left != rect.right) @@ -33,12 +33,12 @@ function show_prompt(text, type) function show_message(text, type) { - cont = document.getElementById('message_container'); - document.getElementById('message_label').innerHTML = text; + cont = document.getElementById('message-container'); + document.getElementById('message-label').innerHTML = text; if (text.length > 0) { - var selected = document.getElementById("user_" + selected_user); + var selected = document.getElementById("user-" + selected_user); rect = selected.getBoundingClientRect(); cont.style.top = rect.top; @@ -60,13 +60,13 @@ function reset() if (child.style != null) child.style.opacity = 1; } - document.getElementById('password_container').classList.remove("shown"); + document.getElementById('password-container').classList.remove("shown"); password_prompt = false; } function authentication_complete() { - sel = document.getElementById('session_list'); + sel = document.getElementById('session-list'); session = sel.options[sel.selectedIndex].getAttribute('data-sid'); if (lightdm.is_authenticated) lightdm.start_session_sync(lightdm.authentication_user, session); @@ -78,7 +78,7 @@ function authentication_complete() function start_authentication(username) { - document.getElementById('message_container').classList.remove("shown"); + document.getElementById('message-container').classList.remove("shown"); if (!password_prompt) { selected_user = username; @@ -88,7 +88,7 @@ function start_authentication(username) function provide_secret() { - entry = document.getElementById('password_entry'); + entry = document.getElementById('password-entry'); lightdm.respond(entry.value); } @@ -99,7 +99,7 @@ function autologin_timer_expired(username) function countdown() { - label = document.getElementById('countdown_label'); + label = document.getElementById('countdown-label'); label.innerHTML = ' in ' + time_remaining + ' seconds'; time_remaining--; if (time_remaining >= 0) @@ -108,7 +108,7 @@ function countdown() function build_session_list() { - slist = document.getElementById('session_list'); + slist = document.getElementById('session-list'); slist.innerHTML = ""; for (session of lightdm.sessions) { @@ -145,11 +145,11 @@ function start() else image = user.image; - document.write(''); + document.write(''); document.write(''+user.display_name+''); if (user.name == lightdm.autologin_user && lightdm.autologin_timeout > 0) - document.write(''); + document.write(''); document.write(''); } -- cgit v1.1