diff --git a/packages/lightdm-webkit-greeter-hamara/src/css/style.css b/packages/lightdm-webkit-greeter-hamara/src/css/style.css index 71f2b4e6801f177c1bdfc718d355f86c48a8e82f..8bb1738484ce4c40fb16d3fa9cc9b87ae686dae5 100644 --- a/packages/lightdm-webkit-greeter-hamara/src/css/style.css +++ b/packages/lightdm-webkit-greeter-hamara/src/css/style.css @@ -59,6 +59,7 @@ input:focus { box-shadow: 0 0 5px 2px #7DBEF1; } + a { text-decoration: none; } @@ -74,7 +75,8 @@ a { } .center { - text-align: center; + text-align: center; + margin: 0, auto; } .button { @@ -154,9 +156,7 @@ a { .user { display: inline-block; - margin-left: 20px; - margin-right: 20px; - margin-bottom: 20px; + margin: 0, auto; position: relative; cursor: pointer; font-family: 'Source Sans Pro'; @@ -172,7 +172,7 @@ a { border-radius: 80px; border: 2px solid #000; background: -webkit-radial-gradient(circle, #FFF , #7b7b81 ); - + margin:7px; } .user_image_wrapper:hover { @@ -195,7 +195,8 @@ a { } .footer { - height: 10%; + height: 10%; + margin:0, auto; } @@ -203,6 +204,7 @@ a { width:60; height:60; -webkit-user-drag: none; + margin: 0, auto; } ul { @@ -235,6 +237,7 @@ li a{ text-decoration: none; -webkit-user-drag: none; margin-top: 5px; + margin-bottom:10px; } /* use hover button for poweroff*/ @@ -248,6 +251,7 @@ li a{ dropdown { display: inline-block; + margin-top:10px; } .dropdown-content { @@ -257,27 +261,22 @@ dropdown { z-index: -1; transform: translateY(-2em); transition: all 0.3s ease-in-out 0s, visibility 0s linear 0.3s, z-index 0s linear 0.01s; - margin-left: -40px; + margin-left: -83px; } .dropdown-content a { font-family: 'source sans pro'; font-size: 1rem; - background-color: #F7931E; - color: white; + background-color: inherit; + color: grey; text-decoration: none; - display: block; - text-align: center; - height: 40px; - width: 110px; + text-align:center; + display: inline; + height: 60px; + width: 60px; -webkit-user-drag: none; } -.dropdown-content a:hover { - background-color: #F15A24; - -} - .dropdown:hover .dropdown-content { visibility: visible; opacity: 1; @@ -286,42 +285,39 @@ dropdown { transition-delay: 0s, 0s, 0.3s; } -.icon_sleep { - margin-top: 20px; -} - -.icon_restart { - margin-top: 1px; -} - -.icon_shutdown { - margin-top: 1px; -} - .icon_sleep:before{ font-family: "sleepbtn" ; content: '\e900'; position: relative; - top: 5px; - font-size: 25px; + font-size: 40px; + padding:10px; } .icon_restart:before{ font-family: 'restartbtn'; content: '\e900'; position: relative; - top: 5px; - padding-left: 5px; - font-size: 25px; + padding: 10px; + font-size: 40px; } .icon_shutdown:before{ font-family: 'shutdownbtn'; content: '\e900'; - padding-left: 5px; + padding: 10px; position: relative; - top: 4px; - font-size: 25px; + font-size: 40px; +} +.icon_sleep:hover{ + color: #E53A40; +} + +.icon_restart:hover{ + color: #E53A40; +} + +.icon_shutdown:hover{ + color: #E53A40; } .overlay { @@ -373,4 +369,26 @@ dropdown { .popup{ width: 70%; } -} \ No newline at end of file +} +.select-style { + border: 1px solid #ccc; + width: 240px; + border-radius: 3px; + overflow: hidden; + background: #fafafa url("data:image/png;base64,R0lGODlhDwAUAIABAAAAAP///yH5BAEAAAEALAAAAAAPABQAAAIXjI+py+0Po5wH2HsXzmw//lHiSJZmUAAAOw==") no-repeat 90% 50%; + margin: 0 auto; +} + +.select-style select { + padding: 5px 8px; + width: 240px; + border: none; + box-shadow: none; + background: transparent; + background-image: none; + -webkit-appearance: none; +} + +.select-style select:focus { + outline: none; +} diff --git a/packages/lightdm-webkit-greeter-hamara/src/index.html b/packages/lightdm-webkit-greeter-hamara/src/index.html index 244531be504c8b7fe33403a01d6b8ace6a9bd70b..83e2d2f79decc32d71695a6703b113cf592df32d 100644 --- a/packages/lightdm-webkit-greeter-hamara/src/index.html +++ b/packages/lightdm-webkit-greeter-hamara/src/index.html @@ -16,17 +16,20 @@ -
diff --git a/packages/lightdm-webkit-greeter-hamara/src/js/script.js b/packages/lightdm-webkit-greeter-hamara/src/js/script.js index fd2fabb869bb812ca49dc0dea31f8dd58ae48706..d5e79e80bb410ac9fd884cb0052fe1f736369b91 100644 --- a/packages/lightdm-webkit-greeter-hamara/src/js/script.js +++ b/packages/lightdm-webkit-greeter-hamara/src/js/script.js @@ -1,5 +1,6 @@ selected_user= null; valid_image=/.*\.(png|svg|jpg|jpeg|bmp)$/i; +var selectedsession = lightdm.default_session; function show_prompt(text) { var password_container= document.getElementById("password_container"); @@ -48,7 +49,7 @@ function show_error(text) { function authentication_complete() { if (lightdm.is_authenticated) - lightdm.login (lightdm.authentication_user, lightdm.default_session); + lightdm.login (lightdm.authentication_user, selectedsession); else { show_error("Authentication Failed"); start_authentication(selected_user); @@ -118,6 +119,27 @@ function isVisible(element) { function initialize() { show_message(""); initialize_users(); + if (lightdm.sessions.length < 2){ + document.getElementById("selectstylediv").style.display = 'none'; + selectedsession = lightdm.default_session; + } + else{ + for (i in lightdm.sessions){ + session = lightdm.sessions[i]; + var sessiondropdown = document.getElementById("sessionlist"); + var sessionoption = document.createElement('option'); + if (session.key == selectedsession){ + sessionoption.value = session.key; + sessionoption.innerHTML = session.key; + sessiondropdown.appendChild(sessionoption); + } + else{ + sessionoption.value = session.key; + sessionoption.innerHTML = session.key; + sessiondropdown.appendChild(sessionoption); + } + } + } } function initialize_users() { @@ -134,12 +156,12 @@ function initialize_users() { name.innerHTML= user.display_name; if (user.image) { - image.src = user.image + image.src = user.image; image.onerror = function(e) { - e.currentTarget.src= "img/avatar.png" - } + e.currentTarget.src= "img/avatar.png"; + }; } else { - image.src = "img/avatar.png" + image.src = "img/avatar.png"; } userNode.id= user.name; @@ -166,4 +188,8 @@ function shutdown_clicked(event){ if (lightdm.can_shutdown) { lightdm.shutdown(); } -} \ No newline at end of file +} + +function selectSession(event){ + selectedsession = document.getElementById("sessionlist").value; +}