diff --git a/lightdm-avdanos-theme/background.png b/lightdm-avdanos-theme/background.png new file mode 100755 index 0000000..1ad0a20 Binary files /dev/null and b/lightdm-avdanos-theme/background.png differ diff --git a/lightdm-avdanos-theme/css/easings.css b/lightdm-avdanos-theme/css/easings.css new file mode 100755 index 0000000..5a8a9c4 --- /dev/null +++ b/lightdm-avdanos-theme/css/easings.css @@ -0,0 +1,26 @@ +:root { + --easeInSine: cubic-bezier(0.47, 0, 0.745, 0.715); + --easeOutSine: cubic-bezier(0.39, 0.575, 0.565, 1); + --easeInOutSine: cubic-bezier(0.445, 0.05, 0.55, 0.95); + --easeInQuad: cubic-bezier(0.55, 0.085, 0.68, 0.53); + --easeOutQuad: cubic-bezier(0.25, 0.46, 0.45, 0.94); + --easeInOutQuad: cubic-bezier(0.455, 0.03, 0.515, 0.955); + --easeInCubic: cubic-bezier(0.55, 0.055, 0.675, 0.19); + --easeOutCubic: cubic-bezier(0.215, 0.61, 0.355, 1); + --easeInOutCubic: cubic-bezier(0.645, 0.045, 0.355, 1); + --easeInQuart: cubic-bezier(0.895, 0.03, 0.685, 0.22); + --easeOutQuart: cubic-bezier(0.165, 0.84, 0.44, 1); + --easeInOutQuart: cubic-bezier(0.77, 0, 0.175, 1); + --easeInQuint: cubic-bezier(0.755, 0.05, 0.855, 0.06); + --easeOutQuint: cubic-bezier(0.23, 1, 0.32, 1); + --easeInOutQuint: cubic-bezier(0.86, 0, 0.07, 1); + --easeInExpo: cubic-bezier(0.95, 0.05, 0.795, 0.035); + --easeOutExpo: cubic-bezier(0.19, 1, 0.22, 1); + --easeInOutExpo: cubic-bezier(1, 0, 0, 1); + --easeInCirc: cubic-bezier(0.6, 0.04, 0.98, 0.335); + --easeOutCirc: cubic-bezier(0.075, 0.82, 0.165, 1); + --easeInOutCirc: cubic-bezier(0.785, 0.135, 0.15, 0.86); + --easeInBack: cubic-bezier(0.6, -0.28, 0.735, 0.045); + --easeOutBack: cubic-bezier(0.175, 0.885, 0.32, 1.275); + --easeInOutBack: cubic-bezier(0.68, -0.55, 0.265, 1.55); +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/css/inter.css b/lightdm-avdanos-theme/css/inter.css new file mode 100755 index 0000000..19409b1 --- /dev/null +++ b/lightdm-avdanos-theme/css/inter.css @@ -0,0 +1,85 @@ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 300; + font-display: swap; + src: url("../fonts/Inter-Light.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-Light.woff?v=3.15") format("woff"); +} + +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 300; + font-display: swap; + src: url("../fonts/Inter-LightItalic.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-LightItalic.woff?v=3.15") format("woff"); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url("../fonts/Inter-Regular.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-Regular.woff?v=3.15") format("woff"); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url("../fonts/Inter-Italic.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-Italic.woff?v=3.15") format("woff"); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url("../fonts/Inter-Medium.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-Medium.woff?v=3.15") format("woff"); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url("../fonts/Inter-MediumItalic.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-MediumItalic.woff?v=3.15") format("woff"); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url("../fonts/Inter-Bold.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-Bold.woff?v=3.15") format("woff"); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url("../fonts/Inter-BoldItalic.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-BoldItalic.woff?v=3.15") format("woff"); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 900; + font-display: swap; + src: url("../fonts/Inter-Black.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-Black.woff?v=3.15") format("woff"); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 900; + font-display: swap; + src: url("../fonts/Inter-BlackItalic.woff2?v=3.15") format("woff2"), + url("../fonts/Inter-BlackItalic.woff?v=3.15") format("woff"); +} diff --git a/lightdm-avdanos-theme/css/lock-dialog.css b/lightdm-avdanos-theme/css/lock-dialog.css new file mode 100755 index 0000000..25c84d8 --- /dev/null +++ b/lightdm-avdanos-theme/css/lock-dialog.css @@ -0,0 +1,33 @@ +.lock { + display: flex; + flex-direction: column; + justify-content: center; + padding-bottom: calc(100px + 48px); + + pointer-events: unset; + transition: all var(--easeOutCubic) var(--animation-speed); +} +.lock.hide { + pointer-events: none; +} + +.lock .date-time { + display: flex; + flex-direction: column; + text-shadow: 0 0 24px hsla(0, 0%, 0%, 0.5); +} +.lock .date-time #time { + font-size: 8rem; + font-weight: 400; + line-height: 1.25; +} +.lock .date-time #time-midday { + font-size: 4rem; + font-weight: 500; + line-height: 1; + margin-left: 24px; +} +.lock .date-time .date { + font-size: 2rem; + font-weight: 500; +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/css/login-dialog.css b/lightdm-avdanos-theme/css/login-dialog.css new file mode 100755 index 0000000..e1c18cf --- /dev/null +++ b/lightdm-avdanos-theme/css/login-dialog.css @@ -0,0 +1,347 @@ +.login .content .dialog { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + + transform: scale(1); + opacity: 1; + + transition: all var(--easeOutCubic) var(--animation-speed); +} +.login .content .fadable { + transition: all var(--easeOutCubic) var(--animation-speed); +} +.login .content.hide .dialog { + transform: scale(0.8); + opacity: 0; +} +.login .content.hide .fadable { + opacity: 0; +} + +.login .content .dialog .slider { + height: 100%; + + display: flex; + align-items: center; + + position: absolute; + left: 50%; + margin-inline: calc(360px / 2 * -1); + + transition: all var(--easeOutCubic) var(--animation-speed); +} + +.login .content .dialog .user { + width: 360px; + + display: flex; + flex-direction: column; + align-items: center; + gap: 24px; + + transition: opacity var(--easeOutCubic) var(--animation-speed); +} +.login .content .dialog .user .user-details { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; +} +.login .content .dialog .user .user-details .user-name { + font-size: 1.75em; + font-weight: 500; +} +.login .content .dialog .user .user-details .user-state { + font-size: 1.05em; +} +.login .content .dialog .user .inputs { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + + transition: all calc(var(--animation-speed) / 2); +} +.login .content .dialog .user .inputs .login-controls { + width: 100%; + display: flex; + justify-content: space-between; +} +.login .content .dialog .user .user-picture { + width: 200px; + height: 200px; + border-radius: 999px; +} +.login .content .dialog .user .user-input, +.login .content .dialog .user .button { + box-sizing: border-box; + + text-align: center; + border-radius: 99px; + padding: 12px; + color: var(--foreground-color); + background: hsla(0, 0%, 0%, 0.2); + border: none; +/* + outline: none; */ + outline: 0px transparent solid; + outline-offset: 4px; + + transition: all calc(var(--animation-speed) / 2); +} +.login .content .dialog .user .user-input, +.login .content .dialog .user .inputs .login-controls { + width: 200px; +} +.login .content .dialog .user .user-input::placeholder { + color: hsla(0, 0%, 100%, 0.6); +} +.login .content .dialog .user .button { + padding: 12px; + line-height: 0; + cursor: pointer; +} +.login .content .dialog .user .user-input.warper { + /* display: flex; */ + padding: 0; + + /* height: fit-content; */ + + position: relative; + + background: transparent; + + /* align-items: center; */ +} +.login .content .dialog .user .user-input.warper .toggle-button { + position: absolute; + right: 0; + top: 50%; + + display: flex; + + padding: 8px; + margin: 0 4px; + + cursor: pointer; + + filter: drop-shadow(0 0 2px black); + + transform: translateY(-50%); +} +.login .content .dialog .user .user-input.warper .toggle-button * { + width: 24px; + height: 24px; +} +.login .content .dialog .user .user-input.warper .toggle-button:not(.active) .onHide { + display: none; +} +.login .content .dialog .user .user-input.warper .toggle-button.active .onShow { + display: none; +} +.login .content .dialog .user .user-message { + line-height: 0; + text-align: center; + + opacity: 0; + overflow: hidden; + + width: 320px; + + transition: all calc(var(--animation-speed) / 2); +} +.login .content .dialog .user .user-message.reveal { + opacity: 1; + + line-height: 2; + margin: .5rem; +} +.login .content .dialog .user .user-input[type=button] { + width: 60%; + cursor: pointer; +} +.login .content .dialog .user .user-input:not(.warper):hover, +.login .content .dialog .user .button:hover { + background: hsla(0, 0%, 0%, 0.4); + box-shadow: transparent; +} +.login .content .dialog .user .user-input:not(.warper):disabled, +.login .content .dialog .user .button:disabled { + opacity: .5; +} +.login .content .dialog .user .user-input[type=button]:not(.warper):active, +.login .content .dialog .user .button:active { + transition-duration: 0s; + box-shadow: inset 0 0 0 999px hsla(0, 0%, 100%, 0.2); +} +.login .content .dialog .user .user-input:not(.warper):focus { + background: hsla(0, 0%, 0%, 0.3); + outline-width: 2px; + outline-color: hsla(0, 0%, 100%, 0.5); + outline-offset: 0px; +} +.login .content .dialog .user .user-input:not(.warper).fail { + box-shadow: inset 0 0 0 999px hsla(0, 100%, 50%, 0.1); +} +.login .content .dialog .user .user-input:not(.warper).shake { + animation: shake var(--animation-speed); +} +.login .content .dialog .user.inactive { + opacity: 0.5; + cursor: pointer; +} +.login .content .dialog .user.inactive .inputs { + visibility: hidden; + opacity: 0; +} +.login .content .dialog .user.inactive:hover { + opacity: 0.8; +} +.login .content .dialog .user .recovery-link { + color: var(--foreground-color); +} + +@keyframes shake { + 0% { transform: translate(0); } + 20% { transform: translate(0.5em); } + 40% { transform: translate(-0.5em); } + 60% { transform: translate(0.5em); } + 80% { transform: translate(-0.5em); } + 100% { transform: translate(0); } +} + + +.login .system-status { + display: flex; + gap: 10px; + + position: absolute; + bottom: 0; +} + +.login .system-item { + display: flex; + align-items: center; + justify-content: center; + + min-width: 32px; + + background: hsla(0, 0%, 0%, 0.4); + + cursor: pointer; + transition: all calc(var(--animation-speed) / 2); + + padding: 8px; + border-radius: 999px; +} +.login .system-item.disabled { + opacity: .5; +} +.login .system-item:not(.disabled):hover { + background: hsla(0, 0%, 0%, 0.5); +} +.login .system-item:not(.disabled):active { + background: hsla(0, 0%, 0%, 0.6); +} +.login .system-item span { + line-height: 2; + padding-inline: 0; + text-align: center; +} +.login .system-item.revealable { + position: relative; +} +.login .system-item.revealable * { + transition: all calc(var(--animation-speed) / 2); +} +.login .system-item.revealable > span { + position: absolute; + left: 0; + opacity: 0; + padding: 8px; +} +.login .system-item:not(.disabled).revealable:hover > img, +.login .system-item:not(.disabled).revealable:hover > div { + opacity: 0; +} +.login .system-item:not(.disabled).revealable:hover > span { + opacity: 1; +} +.login .system-item.layout span { + min-width: 32px; + padding-inline: 8px; +} + +.login .system-info { + display: flex; + gap: 10px; + + position: absolute; + bottom: 0; + right: 0; +} + +.login .system-item.clock { + padding-inline: 16px; + + line-height: 2; +} +.login .system-item.session { + padding-inline: 12px; + gap: 8px; +} +.login .system-item.session .name { + padding-inline-end: 6px; +} +.login .system-item.session .icon, +.menus#session-menu .icon { + width: 32px; + height: 32px; +} + +.login .battery-indicator { + display: inline-block; + + position: relative; +} +.login .battery-indicator * { + position: absolute; + top: 0; + bottom: 0; + + padding: 0 !important; +} +.login .battery-indicator .bar { + background: white; + + transition: all calc(var(--animation-speed) / 2); +} + +.login .system-item.battery .battery-indicator { + width: 32px; + height: 32px; +} +.login .system-item.battery .battery-indicator .bar { + width: 16px; + height: 8px; + + top: 12px; + left: 6px; + + border-radius: 1px; +} +.login #battery-menu .battery-indicator { + width: 64px; + height: 64px; +} +.login #battery-menu .battery-indicator .bar { + width: 32px; + height: 16px; + + top: 24px; + left: 12px; + + border-radius: 2px; +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/css/main.css b/lightdm-avdanos-theme/css/main.css new file mode 100755 index 0000000..f7e3144 --- /dev/null +++ b/lightdm-avdanos-theme/css/main.css @@ -0,0 +1,116 @@ +@import url('normalize.css'); +@import url('inter.css'); +@import url('easings.css'); +@import url('menus.css'); +@import url('screen.css'); +@import url('popup-dialog.css'); +@import url('lock-dialog.css'); +@import url('login-dialog.css'); + +:root { + --background-color: black; + --foreground-color: whitesmoke; + --animation-speed: 0.5s; + --blur-strength: 16px; +} + +html, +body { + margin: 0; + padding: 0; + height: 100%; + position: fixed; + + font-size: 1rem; + font-family: 'Inter', 'Roboto', sans-serif; +} + +body { + top: 0; + left: 0; + + width: 100%; + height: 100%; + + margin: 0; + padding: 0; + + overflow: hidden; + scrollbar-width: none; + + color: var(--foreground-color); + background-color: var(--background-color); +} + +a { + color: #3f79f1; + text-decoration-color: transparent; + + transition: all ease calc(var(--animation-speed) / 2); +} +a:hover { + text-decoration-color: unset; +} + +.switcher { + display: flex; + gap: 2px; + overflow: hidden; + + border-radius: 6px; + + background: hsla(0, 0%, 100%, .1); +} +.switcher .item { + flex: 1; + + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + height: 20px; + min-width: 40px; + + text-align: center; + + border-radius: 0; +} +.switcher .item.active { + background: hsla(0, 0%, 100%, .1); +} + +input[type="range"] { + --webkit-appearance: none; + appearance: none; + + background: hsla(0, 0%, 100%, .1); + height: 6px; + border-radius: 99px; + + cursor: pointer; +} + +input[type="range"]::-moz-range-track { + background: hsla(0, 0%, 100%, .1); + height: 6px; + border-radius: 99px; +} +input[type="range"]::-ms-fill-lower { + appearance: none; + height: 6px; + border-radius: 99px; +} +input[type="range"]::-webkit-slider-thumb, +input[type="range"]::-moz-range-thumb { + --webkit-appearance: none; + appearance: none; + + height: 16px; + width: 16px; + + background: hsla(0, 0%, 100%); + border: none; + + border-radius: 99px; +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/css/menus.css b/lightdm-avdanos-theme/css/menus.css new file mode 100755 index 0000000..3371b4f --- /dev/null +++ b/lightdm-avdanos-theme/css/menus.css @@ -0,0 +1,146 @@ +.menus { + display: flex; + flex-direction: column; + + max-height: 480px; + + z-index: 5; + + background: hsla(0, 0%, 0%, 0.4); + border-radius: 8px; + padding: 8px; + + position: absolute; + bottom: calc(48px + 12px); + + visibility: hidden; + opacity: 0; + + transform: translateY(16px); + + pointer-events: unset; + + transition: all var(--easeOutCubic) calc(var(--animation-speed) / 2); +} +.menus.show { + visibility: visible; + opacity: 1; + transform: translateY(0); +} + +.menus .item { + display: flex; + gap: 12px; + align-items: center; + border-radius: 6px; + padding: 8px; + cursor: pointer; + + transition: all var(--easeOutCubic) var(--animation-speed); +} +.menus .item.disabled { + opacity: .5; + cursor: unset; +} +.menus .item:not(.disabled):hover { + background: hsla(0, 0%, 100%, 0.1); +} +.menus .item:not(.disabled):active { + background: hsla(0, 0%, 100%, 0.2); +} + +.menus#power-menu { + left: 0; +} +.menus#battery-menu { + left: calc((48px + 10px) * 1); + padding: 20px; +} +.menus#battery-menu .list { + display: flex; + align-items: center; + gap: 12px; +} +.menus#battery-menu .details { + display: flex; + flex-direction: column; + gap: 4px; +} +.menus#battery-menu .details .level { + font-size: 2rem; + font-weight: bold; +} +.menus#brightness-menu { + left: calc((48px + 10px) * 2); + padding: 12px; +} +.menus#brightness-menu .list { + display: flex; + align-items: center; + gap: 12px; +} +.menus#layout-menu { + left: calc((48px + 10px) * 3); + overflow-y: overlay; +} +.menus#layout-menu .item { + padding: 8px; +} +.menus#background-menu { + right: 0; + + gap: 16px; + padding: 16px; +} +.menus#background-menu span { + font-weight: bold; + font-size: 1.2rem; +} +.menus#background-menu .list { + display: grid; + grid-template-columns: auto auto; + + gap: 12px; + justify-content: space-between; + + overflow-y: auto; +} +.menus#background-menu .list .item { + width: 128px; + height: 72px; + border-radius: 4px; + + padding: 0; + + background: hsla(0, 0%, 0%, 0.1); + + background-position: center !important; + background-size: cover !important; + + transition: all var(--easeOutCubic) calc(var(--animation-speed) / 2); +} +.menus#session-menu { + width: 240px; + right: 0; +} +.menus#clock-menu { + right: 0; + width: 240px; + padding: 20px; + gap: 8px; +} +.menus#clock-menu .clock { + font-size: 2rem; + font-weight: bold; +} +.menus#clock-menu .date { + font-size: 1.1rem; + font-weight: 500; +} +.menus#clock-menu #format { + display: flex; + align-items: center; + justify-content: space-between; + + margin-top: 8px; +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/css/normalize.css b/lightdm-avdanos-theme/css/normalize.css new file mode 100755 index 0000000..24f41c7 --- /dev/null +++ b/lightdm-avdanos-theme/css/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/lightdm-avdanos-theme/css/popup-dialog.css b/lightdm-avdanos-theme/css/popup-dialog.css new file mode 100755 index 0000000..44ef06b --- /dev/null +++ b/lightdm-avdanos-theme/css/popup-dialog.css @@ -0,0 +1,108 @@ +.screen.popup { + display: flex; + align-items: center; + justify-content: center; + + backdrop-filter: blur(var(--blur-strength)); + + background: hsla(0, 0%, 0%, .4); + + transition: all var(--easeOutCubic) calc(var(--animation-speed) / 2); +} +.screen.popup.hide { + backdrop-filter: blur(0); + background: transparent; + + opacity: 1; + + visibility: hidden; +} + +.screen.popup .dialog { + display: flex; + flex-direction: column; + align-items: center; + gap: 16px; + + position: absolute; + + max-width: 480px; + + padding: 16px; + + background: hsla(0, 0%, 0%, .5); + border-radius: 16px; + + text-align: center; + + transform: scale(1); + opacity: 0; + visibility: hidden; + + transition: all var(--easeOutCubic) calc(var(--animation-speed) / 2); +} +.screen.popup .dialog.show { + opacity: 1; + visibility: visible; +} +.screen.popup.hide .dialog { + transform: scale(.9); + opacity: 0; +} +.screen.popup .dialog .title { + font-size: 2rem; + font-weight: bold; + + margin-top: 16px; + + line-height: 1.5; +} +.screen.popup .dialog .message { + font-size: 1.1rem; + line-height: 1.5; + + margin-block: 0; + margin-inline: 32px; +} +.screen.popup .dialog .bottom { + margin-block: 0; + margin-bottom: 24px; +} +.screen.popup .dialog .popup-close { + position: absolute; + top: 16px; + right: 16px; + + border-radius: 99px; + + cursor: pointer; + + padding: 12px; + + transition: all var(--easeOutCubic) calc(var(--animation-speed) / 2); +} +.screen.popup .dialog .popup-close:hover { + background: hsla(0, 0%, 100%, .1); +} +.screen.popup .dialog .actions { + display: flex; + gap: 8px; + + margin-top: 16px; + + width: 100%; +} +.screen.popup .dialog .actions .action { + flex: 1; + padding: 12px 16px; + + cursor: pointer; + + border-radius: 4px; +} +.screen.popup .dialog .actions .action:hover { + background: hsla(0, 0%, 100%, .1); +} +.screen.popup .dialog .actions .action:active { + background: hsla(0, 0%, 0%, .1); +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/css/screen.css b/lightdm-avdanos-theme/css/screen.css new file mode 100755 index 0000000..05b0cc3 --- /dev/null +++ b/lightdm-avdanos-theme/css/screen.css @@ -0,0 +1,54 @@ +.screen { + width: 100%; + height: 100%; + + box-sizing: border-box; + + position: fixed; + top: 0; + left: 0; + + margin: 0; + padding: 100px; + + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; + + opacity: 1; + transition: all var(--easeOutCubic) var(--animation-speed); +} +.screen.hide { + opacity: 0; +} +.screen .content { + display: flex; + + position: relative; + width: 100%; + height: 100%; +} + +.screen.blank { + background: var(--background-color); +} +.screen.blank.hide { + pointer-events: none; +} + +.screen.menus { + z-index: 10; +} + +.screen.background { + background: url('../background.png'); + background-size: cover !important; + background-repeat: no-repeat !important; + background-position: center !important; + + transition-duration: var(--animation-speed); +} +.screen.background.blur { + filter: blur(var(--blur-strength)) brightness(50%); + transform: scale(1.1); +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/fonts/Inter-Black.woff b/lightdm-avdanos-theme/fonts/Inter-Black.woff new file mode 100755 index 0000000..52af3fe Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Black.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Black.woff2 b/lightdm-avdanos-theme/fonts/Inter-Black.woff2 new file mode 100755 index 0000000..89c204c Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Black.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-BlackItalic.woff b/lightdm-avdanos-theme/fonts/Inter-BlackItalic.woff new file mode 100755 index 0000000..0ad6c7d Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-BlackItalic.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-BlackItalic.woff2 b/lightdm-avdanos-theme/fonts/Inter-BlackItalic.woff2 new file mode 100755 index 0000000..b3f3267 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-BlackItalic.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Bold.woff b/lightdm-avdanos-theme/fonts/Inter-Bold.woff new file mode 100755 index 0000000..80f70f0 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Bold.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Bold.woff2 b/lightdm-avdanos-theme/fonts/Inter-Bold.woff2 new file mode 100755 index 0000000..622e5f1 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Bold.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-BoldItalic.woff b/lightdm-avdanos-theme/fonts/Inter-BoldItalic.woff new file mode 100755 index 0000000..03238dd Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-BoldItalic.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-BoldItalic.woff2 b/lightdm-avdanos-theme/fonts/Inter-BoldItalic.woff2 new file mode 100755 index 0000000..1b2dafb Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-BoldItalic.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Italic.woff b/lightdm-avdanos-theme/fonts/Inter-Italic.woff new file mode 100755 index 0000000..9c21aed Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Italic.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Italic.woff2 b/lightdm-avdanos-theme/fonts/Inter-Italic.woff2 new file mode 100755 index 0000000..734944b Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Italic.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Light.woff b/lightdm-avdanos-theme/fonts/Inter-Light.woff new file mode 100755 index 0000000..0df2bc7 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Light.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Light.woff2 b/lightdm-avdanos-theme/fonts/Inter-Light.woff2 new file mode 100755 index 0000000..b09ea9d Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Light.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-LightItalic.woff b/lightdm-avdanos-theme/fonts/Inter-LightItalic.woff new file mode 100755 index 0000000..ee7ebb5 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-LightItalic.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-LightItalic.woff2 b/lightdm-avdanos-theme/fonts/Inter-LightItalic.woff2 new file mode 100755 index 0000000..3d7774a Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-LightItalic.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Medium.woff b/lightdm-avdanos-theme/fonts/Inter-Medium.woff new file mode 100755 index 0000000..1d50f80 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Medium.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Medium.woff2 b/lightdm-avdanos-theme/fonts/Inter-Medium.woff2 new file mode 100755 index 0000000..ffb4206 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Medium.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-MediumItalic.woff b/lightdm-avdanos-theme/fonts/Inter-MediumItalic.woff new file mode 100755 index 0000000..9eb5b9d Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-MediumItalic.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-MediumItalic.woff2 b/lightdm-avdanos-theme/fonts/Inter-MediumItalic.woff2 new file mode 100755 index 0000000..ebee655 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-MediumItalic.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Regular.woff b/lightdm-avdanos-theme/fonts/Inter-Regular.woff new file mode 100755 index 0000000..7cb4990 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Regular.woff differ diff --git a/lightdm-avdanos-theme/fonts/Inter-Regular.woff2 b/lightdm-avdanos-theme/fonts/Inter-Regular.woff2 new file mode 100755 index 0000000..66691b8 Binary files /dev/null and b/lightdm-avdanos-theme/fonts/Inter-Regular.woff2 differ diff --git a/lightdm-avdanos-theme/fonts/LICENSE.txt b/lightdm-avdanos-theme/fonts/LICENSE.txt new file mode 100755 index 0000000..1cf8910 --- /dev/null +++ b/lightdm-avdanos-theme/fonts/LICENSE.txt @@ -0,0 +1,94 @@ +Copyright (c) 2016-2020 The Inter Project Authors. +"Inter" is a Reserved Font Name. +https://github.com/rsms/inter + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/lightdm-avdanos-theme/img/back.png b/lightdm-avdanos-theme/img/back.png new file mode 100755 index 0000000..025a0d4 Binary files /dev/null and b/lightdm-avdanos-theme/img/back.png differ diff --git a/lightdm-avdanos-theme/img/background.png b/lightdm-avdanos-theme/img/background.png new file mode 100644 index 0000000..b734d7d Binary files /dev/null and b/lightdm-avdanos-theme/img/background.png differ diff --git a/lightdm-avdanos-theme/img/battery.svg b/lightdm-avdanos-theme/img/battery.svg new file mode 100644 index 0000000..a68ce7e --- /dev/null +++ b/lightdm-avdanos-theme/img/battery.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lightdm-avdanos-theme/img/brightness.png b/lightdm-avdanos-theme/img/brightness.png new file mode 100755 index 0000000..b33467f Binary files /dev/null and b/lightdm-avdanos-theme/img/brightness.png differ diff --git a/lightdm-avdanos-theme/img/close.png b/lightdm-avdanos-theme/img/close.png new file mode 100755 index 0000000..bf30521 Binary files /dev/null and b/lightdm-avdanos-theme/img/close.png differ diff --git a/lightdm-avdanos-theme/img/hibernate.png b/lightdm-avdanos-theme/img/hibernate.png new file mode 100755 index 0000000..6acf385 Binary files /dev/null and b/lightdm-avdanos-theme/img/hibernate.png differ diff --git a/lightdm-avdanos-theme/img/hide.png b/lightdm-avdanos-theme/img/hide.png new file mode 100644 index 0000000..8927ad5 Binary files /dev/null and b/lightdm-avdanos-theme/img/hide.png differ diff --git a/lightdm-avdanos-theme/img/power.png b/lightdm-avdanos-theme/img/power.png new file mode 100755 index 0000000..6f4e12d Binary files /dev/null and b/lightdm-avdanos-theme/img/power.png differ diff --git a/lightdm-avdanos-theme/img/restart.png b/lightdm-avdanos-theme/img/restart.png new file mode 100755 index 0000000..0356e95 Binary files /dev/null and b/lightdm-avdanos-theme/img/restart.png differ diff --git a/lightdm-avdanos-theme/img/session-default.png b/lightdm-avdanos-theme/img/session-default.png new file mode 100755 index 0000000..82b7c42 Binary files /dev/null and b/lightdm-avdanos-theme/img/session-default.png differ diff --git a/lightdm-avdanos-theme/img/sessions/awesome.png b/lightdm-avdanos-theme/img/sessions/awesome.png new file mode 100755 index 0000000..49bed8d Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/awesome.png differ diff --git a/lightdm-avdanos-theme/img/sessions/bspwm.png b/lightdm-avdanos-theme/img/sessions/bspwm.png new file mode 100755 index 0000000..50bda17 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/bspwm.png differ diff --git a/lightdm-avdanos-theme/img/sessions/budgie.png b/lightdm-avdanos-theme/img/sessions/budgie.png new file mode 100755 index 0000000..13a64f7 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/budgie.png differ diff --git a/lightdm-avdanos-theme/img/sessions/cinnamon.png b/lightdm-avdanos-theme/img/sessions/cinnamon.png new file mode 100755 index 0000000..4f214dc Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/cinnamon.png differ diff --git a/lightdm-avdanos-theme/img/sessions/deepin.png b/lightdm-avdanos-theme/img/sessions/deepin.png new file mode 100755 index 0000000..c8d8cf9 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/deepin.png differ diff --git a/lightdm-avdanos-theme/img/sessions/elementary.png b/lightdm-avdanos-theme/img/sessions/elementary.png new file mode 100755 index 0000000..c074433 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/elementary.png differ diff --git a/lightdm-avdanos-theme/img/sessions/enlightenment.png b/lightdm-avdanos-theme/img/sessions/enlightenment.png new file mode 100755 index 0000000..aaee5b0 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/enlightenment.png differ diff --git a/lightdm-avdanos-theme/img/sessions/gnome.png b/lightdm-avdanos-theme/img/sessions/gnome.png new file mode 100755 index 0000000..61fdaa5 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/gnome.png differ diff --git a/lightdm-avdanos-theme/img/sessions/i3-with-shmlog.png b/lightdm-avdanos-theme/img/sessions/i3-with-shmlog.png new file mode 100755 index 0000000..f5778f3 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/i3-with-shmlog.png differ diff --git a/lightdm-avdanos-theme/img/sessions/i3.png b/lightdm-avdanos-theme/img/sessions/i3.png new file mode 100755 index 0000000..f5778f3 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/i3.png differ diff --git a/lightdm-avdanos-theme/img/sessions/liri.png b/lightdm-avdanos-theme/img/sessions/liri.png new file mode 100755 index 0000000..416b651 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/liri.png differ diff --git a/lightdm-avdanos-theme/img/sessions/lxde.png b/lightdm-avdanos-theme/img/sessions/lxde.png new file mode 100755 index 0000000..9d2c02a Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/lxde.png differ diff --git a/lightdm-avdanos-theme/img/sessions/mate.png b/lightdm-avdanos-theme/img/sessions/mate.png new file mode 100755 index 0000000..0fd45cc Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/mate.png differ diff --git a/lightdm-avdanos-theme/img/sessions/plasma.png b/lightdm-avdanos-theme/img/sessions/plasma.png new file mode 100755 index 0000000..4288e56 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/plasma.png differ diff --git a/lightdm-avdanos-theme/img/sessions/qtile.png b/lightdm-avdanos-theme/img/sessions/qtile.png new file mode 100755 index 0000000..b67a01a Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/qtile.png differ diff --git a/lightdm-avdanos-theme/img/sessions/session-default.png b/lightdm-avdanos-theme/img/sessions/session-default.png new file mode 100755 index 0000000..7304f04 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/session-default.png differ diff --git a/lightdm-avdanos-theme/img/sessions/sway.png b/lightdm-avdanos-theme/img/sessions/sway.png new file mode 100755 index 0000000..c7ea29d Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/sway.png differ diff --git a/lightdm-avdanos-theme/img/sessions/ubuntu.png b/lightdm-avdanos-theme/img/sessions/ubuntu.png new file mode 100755 index 0000000..e970ba5 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/ubuntu.png differ diff --git a/lightdm-avdanos-theme/img/sessions/xfce.png b/lightdm-avdanos-theme/img/sessions/xfce.png new file mode 100755 index 0000000..54e4298 Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/xfce.png differ diff --git a/lightdm-avdanos-theme/img/sessions/xmonad.png b/lightdm-avdanos-theme/img/sessions/xmonad.png new file mode 100755 index 0000000..ed852bd Binary files /dev/null and b/lightdm-avdanos-theme/img/sessions/xmonad.png differ diff --git a/lightdm-avdanos-theme/img/show.png b/lightdm-avdanos-theme/img/show.png new file mode 100644 index 0000000..e923536 Binary files /dev/null and b/lightdm-avdanos-theme/img/show.png differ diff --git a/lightdm-avdanos-theme/img/shutdown.png b/lightdm-avdanos-theme/img/shutdown.png new file mode 100755 index 0000000..47cd30a Binary files /dev/null and b/lightdm-avdanos-theme/img/shutdown.png differ diff --git a/lightdm-avdanos-theme/img/sleep.png b/lightdm-avdanos-theme/img/sleep.png new file mode 100755 index 0000000..b218838 Binary files /dev/null and b/lightdm-avdanos-theme/img/sleep.png differ diff --git a/lightdm-avdanos-theme/index.html b/lightdm-avdanos-theme/index.html new file mode 100755 index 0000000..774c694 --- /dev/null +++ b/lightdm-avdanos-theme/index.html @@ -0,0 +1,148 @@ + + + + + + + + + +
+ +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+ + +
+ 50% +
+
+ + 50% +
+
+ EN +
+
+ + +
+
+ +
+
+ + Plasma +
+ 12:34 PM +
+ + + + + + + + + + +
+
+ +
+
+ + 12:34 + PM + + Tuesday, June 21 +
+
+ + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lightdm-avdanos-theme/index.theme b/lightdm-avdanos-theme/index.theme new file mode 100755 index 0000000..2fb38c4 --- /dev/null +++ b/lightdm-avdanos-theme/index.theme @@ -0,0 +1,6 @@ +[theme] +name=avdanos +description=Avdan OS login screen theme +engine=lightdm-webkit2-greeter +url=index.html +session=Keywords=avdanos,login diff --git a/lightdm-avdanos-theme/js/auth.js b/lightdm-avdanos-theme/js/auth.js new file mode 100755 index 0000000..3390a8a --- /dev/null +++ b/lightdm-avdanos-theme/js/auth.js @@ -0,0 +1,131 @@ +function wait(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +class Auth { + constructor () { + this.currentAuthenticating = "unknown"; + if (typeof lightdm.authentication_complete == 'object') { + lightdm.authentication_complete.connect(this._onAuthComplete.bind(this)); + } else { + lightdm.authentication_complete = this._onAuthComplete.bind(this); + } + } + + _onAuthComplete() { + if (lightdm.is_authenticated) { + this.setMessage(`Loading session...`, document.getElementById(`user-message_${this.currentAuthenticating}`)); + this.success(); + } else { + this.failed(); + } + } + + async startAuth(username, password) { + console.log("Start authentication"); + lightdm.authenticate(username); + await wait(100); + lightdm.respond(password); + + // Call authentication_complete manually to login to session properly + if (typeof lightdm.authentication_complete != 'object') { + await wait(100); + lightdm.authentication_complete(); + } + } + + failed() { + let passwordInput = document.getElementById(`user-password-field_${this.currentAuthenticating}`); + let loginButton = document.getElementById(`user-login-button_${this.currentAuthenticating}`); + + passwordInput.value = ''; + + // Error messages/UI + this.setMessage("Incorrect password.", document.getElementById(`user-message_${this.currentAuthenticating}`)); + this.animateShake(passwordInput); + + lightdm.cancel_authentication(); + + passwordInput.disabled = false; + loginButton.disabled = false; + } + + setMessage(message = "", userMessageElement) { + if (message) { + userMessageElement.classList.add('reveal'); + userMessageElement.innerText = message; + } else { + userMessageElement.classList.remove('reveal'); + } + + } + + animateShake(element) { + element.classList.add('fail'); + element.classList.add('shake'); + + setTimeout(() => { + element.classList.remove('shake'); + }, 500); + + element.addEventListener('input', () => { + element.classList.remove('fail'); + }) + } + + checkInputAvailability(userData) { + if (userData.password.length == 0) { + this.animateShake(document.getElementById(`user-password-field_${userData.username}`)); + this.setMessage('Password must be filled.', document.getElementById(`user-message_${userData.username}`)); + return false; + } + + return true; + } + + success() { + let passwordInput = document.getElementById(`user-password-field_${this.currentAuthenticating}`); + + // Make password input read-only + passwordInput.readOnly = true; + passwordInput.blur(); + + setTimeout(() => { + Transition.fadeOut(); + }, 500); + + // Add a delay before unlocking + setTimeout(() => { + if (lightdm.start_session) { + lightdm.start_session(Utils.getLastUsedSession().key); + } else { + lightdm.start_session_sync(Utils.getLastUsedSession().key); + } + }, 1000); + } + + async startAuthentication(username) { + const userData = { + username: username, + password: document.getElementById(`user-password-field_${username}`).value + } + + let availability = this.checkInputAvailability(userData); + + if (!availability) { return; } + + document.getElementById(`user-password-field_${userData.username}`).disabled = true; + document.getElementById(`user-login-button_${userData.username}`).disabled = true; + + this.setMessage("", document.getElementById(`user-message_${userData.username}`)); + + if (userData.password.length > 0) { + this.currentAuthenticating = username; + this.startAuth(userData.username, userData.password); + } else { + this.failed(); + } + } +} + +var auth = new Auth(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/backgrounds.js b/lightdm-avdanos-theme/js/backgrounds.js new file mode 100644 index 0000000..fbb3f3e --- /dev/null +++ b/lightdm-avdanos-theme/js/backgrounds.js @@ -0,0 +1,56 @@ +var backgroundScreen = document.getElementById("background-screen"); + +var Backgrounds = { + defaultBackgrounds: ["background.png"], + _defaultBackgroundDir: "/usr/share/backgrounds", + + start() { + if (localStorage.getItem('background') != null) { + this.setBackground(localStorage.getItem('background')); + } else { + this.setBackground(this.defaultBackgrounds[0]); + } + }, + async _getBackgroundsPerDirectory(dirPath, arr) { + let arrayBackground; + + if (Utils.isPromise(theme_utils.dirlist(this._defaultBackgroundDir))) { + arrayBackground = await new Promise((resolve) => { + theme_utils.dirlist(dirPath, false, (result) => { resolve(result);}); + }) + } else { + arrayBackground = theme_utils.dirlist(dirPath); + } + + arrayBackground.forEach((path) => { + if (Utils.isImageFile(path)) { + arr.push(path); + } else { + this._getBackgroundsPerDirectory(path, arr); + } + }) + }, + async getBackgrounds(path, arr) { + if (!greeter_config || !theme_utils) { + if (Utils.isPromise(theme_utils.dirlist(this._defaultBackgroundDir))) { + arr = await new Promise((resolve) => resolve([])); + } else { + arr = []; + } + + return; + } + + this.defaultBackgrounds.forEach((path) => { arr.push(path); }) + + let backgroundPath = path ? path : this._defaultBackgroundDir; + this._getBackgroundsPerDirectory(backgroundPath, arr); + }, + + setBackground(path) { + backgroundScreen.style.background = `url(${path})`; + localStorage.setItem('background', path); + } +} + +Backgrounds.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/clock.js b/lightdm-avdanos-theme/js/clock.js new file mode 100755 index 0000000..afd23ae --- /dev/null +++ b/lightdm-avdanos-theme/js/clock.js @@ -0,0 +1,135 @@ +var time = document.getElementById("time"); +var clocks = document.getElementsByClassName("clock"); +var timeMidday = document.getElementById("time-midday"); +var dates = document.getElementsByClassName("date"); + +var time12hButton = document.getElementById("time-12h-format-button"); +var time24hButton = document.getElementById("time-24h-format-button"); + +const TIME_FORMAT = { + "12": 0, + "24": 1 +} + +var _clockInterval = null; +var _timeFormat = localStorage.getItem('time-format') || TIME_FORMAT['12']; + +function _padZero(data) { + return String(data).padStart(2, "0"); +} + +function _getTime(is12) { + const date = new Date(); + + let hourReminder = date.getHours() % 12; + let hour = (is12) ? ((hourReminder) ? hourReminder : 12) : date.getHours(); + let minute = date.getMinutes(); + let midDay = (date.getHours() >= 12) ? 'PM' : 'AM'; + + if (is12) { + return { + hour: _padZero(hour), + minute: _padZero(minute), + midDay: midDay + } + } else { + return { + hour: _padZero(hour), + minute: _padZero(minute) + } + } +} + +function _getDate() { + const date = new Date(); + + const DAY = [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ]; + + const MONTH = [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December' + ]; + + return { + day: DAY[date.getDay() - 1], + date: date.getDate(), + month: MONTH[date.getMonth() - 1] + } +} + +var Clock = { + start() { + this.startClock(); + + time12hButton.addEventListener('click', () => { + this.setFormat(TIME_FORMAT['12']); + }); + time24hButton.addEventListener('click', () => { + this.setFormat(TIME_FORMAT['24']); + }); + + this.checkFormat(_timeFormat); + }, + + setClock() { + // Time + let timeVal = _getTime(_timeFormat == TIME_FORMAT['12']); + let midday = (timeVal.midDay) ? timeVal.midDay : ''; + time.innerText = `${timeVal.hour}:${timeVal.minute}`; + Array.from(clocks).forEach((clock) => { + clock.innerText = `${timeVal.hour}:${timeVal.minute}${String(midday).padStart(3, ' ')}`; + }) + timeMidday.innerText = midday; + + // Date + let dateVal = _getDate(); + Array.from(dates).forEach((date) => { + date.innerText = `${dateVal.day}, ${dateVal.month} ${dateVal.date}` + }) + }, + startClock() { + this.setClock(); + this._clockInterval = setInterval(this.setClock, 1000); + }, + stopClock() { + clearInterval(this._clockInterval); + }, + setFormat(format) { + this.stopClock(); + + _timeFormat = format; + localStorage.setItem('time-format', format); + + this.checkFormat(format); + this.startClock(); + }, + checkFormat(format) { + if (format == TIME_FORMAT['12']) { + time12hButton.classList.add('active'); + time24hButton.classList.remove('active'); + } else { + time12hButton.classList.remove('active'); + time24hButton.classList.add('active'); + } + } +} + +Clock.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/debug.js b/lightdm-avdanos-theme/js/debug.js new file mode 100755 index 0000000..520745b --- /dev/null +++ b/lightdm-avdanos-theme/js/debug.js @@ -0,0 +1,220 @@ +var Debug = { + start() { + this._debugModePass = 'avdan'; + this._loadDebugObjects(); + }, + _loadDebugObjects() { + if (!window.greeter_config) { + window.greeter_config = {}; + window.greeter_config.branding = { + background_images_dir: "/usr/share/backgrounds", + logo: "/usr/share/web-greeter/themes/default/img/antergos-logo-user.png", + user_image: "/usr/share/web-greeter/themes/default/img/antergos.png", + }; + } + + if (!window.theme_utils) { + window.theme_utils = {}; + window.theme_utils.dirlist = function(path, images_only, callback) { + if ("" === path || "string" !== typeof path) { + console.error(`theme_utils.dirlist(): path must be a non-empty string!`); + return callback([]); + } + if (null !== path.match(/\/\.+(?=\/)/)) { + // No special directory names allowed (eg ../../) + path = path.replace(/\/\.+(?=\/)/g, ""); + } + + if (!callback) { callback = () => {}; } + + try { + // Should be changed here + return callback([]); + } catch (err) { + console.error(`theme_utils.dirlist(): ${err}`); + return callback([]); + } + }; + } + + if (!window.lightdm) { + window.lightdm = { + is_authenticated: false, + authentication_user: null, + default_session: 'awesome', + can_suspend: true, + can_hibernate: true, + can_shutdown: true, + can_restart: true, + batteryData: { + name: "Battery 0", + level: 85, + state: "Discharging" + }, + brightness: 50, + sessions: [ + { + name: 'awesome wm', + key: 'awesome' + }, + { + name: 'bspwm', + key: 'bspwm' + }, + { + name: 'KDE Plasma', + key: 'plasma' + }, + { + name: 'Gnome 3', + key: 'gnome' + }, + { + name: 'XFCE 4', + key: 'xfce' + }, + { + name: 'Cinnamon', + key: 'cinnamon' + }, + { + name: 'i3wm', + key: 'i3' + }, + { + name: 'xmonad', + key: 'xmonad' + }, + { + name: 'Deepin', + key: 'deepin' + }, + { + name: 'Budgie', + key: 'budgie' + } + ], + users: [ + { + display_name: 'Advendra Deswanta', + username: 'adeswanta08', + image: 'user-picture.png' + }, + { + display_name: 'Jeffery Holley', + username: 'jeffrey12', + image: 'user-picture.png' + }, + { + display_name: 'Chris Glasser', + username: 'chris11', + image: 'user-picture.png' + } + ], + languages: [ + { + name: 'American English', + code: 'en_US.utf8' + } + ], + layout: { + name: "us", + description: "English (US)", + short_description: "en" + }, + layouts: [ + { + name: "us", + description: "English (US)", + short_description: "en" + }, + { + name: "at", + description: "German (Austria)", + short_description: "de" + }, + { + name: "uk", + description: "English (UK)", + short_description: "en" + } + ], + language: 'American English', + battery_update: { + connect: (callback) => { lightdm.__battery_update_signal = callback; } + }, + brightness_update: { + connect: (callback) => { lightdm.__brightness_update_signal = callback; } + }, + autologin_timer_expired: { + connect: (callback) => { lightdm.__autologin_timer_expired_signal = callback; } + }, + authentication_complete: { + connect: (callback) => { lightdm.__authentication_complete_signal = callback; } + }, + can_access_battery: true, + can_access_brightness: true, + authenticate: username => { + console.log(`Starting authenticating user: '${username}'`); + }, + cancel_authentication: () => { + console.log('Auth cancelled'); + }, + respond: password => { + console.log(`Password provided: '${password}'`); + if (password === this._debugModePass) { + lightdm.is_authenticated = true; + } + else { + let now = new Date().getTime(); + while (new Date().getTime() < now + 2000); + } + window.lightdm.__authentication_complete_signal(); + }, + start_session: session => { + alert(`Logged with session: '${session}'!`); + location.reload(); + }, + shutdown: () => { + alert('System is shutting down...'); + location.reload(); + }, + restart: () => { + alert('System is rebooting...'); + location.reload(); + }, + hibernate: () => { + alert('System is hibernating...'); + }, + suspend: () => { + alert('System is suspending...'); + } + }; + + window.lightdm = new Proxy(window.lightdm, { + set: function (target, key, value) { + target[key] = value; + + if (key == 'brightness') { + window.lightdm.__brightness_update_signal(); + } + + return true; + } + }); + window.lightdm.batteryData = new Proxy(window.lightdm.batteryData, { + set: function (target, key, value) { + target[key] = value; + + if (key == 'level') { + window.lightdm.__battery_update_signal(); + } + + return true; + } + }); + } + } +} + +Debug.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/key-event.js b/lightdm-avdanos-theme/js/key-event.js new file mode 100755 index 0000000..9f7664f --- /dev/null +++ b/lightdm-avdanos-theme/js/key-event.js @@ -0,0 +1,31 @@ +var KeyEvent = { + start() { + document.addEventListener("keydown", (event) => { + if ( + (event.key === ' ') || (event.code === 'Space') || (event.code === 'Enter') || + (event.code === 'NumpadEnter') || (event.code === 'Tab') + ) { + Transition.showLogin(); + } + + if (event.key === 'Escape') { + event.preventDefault(); + + if (PopupDialog.inShown) { + PopupDialog.hide(); + } else { + Transition.hideLogin(); + } + } + + if (Power.inBlank) { + Transition.fadeIn(); + Transition.hideLogin(); + + Power.inBlank = false; + } + }); + } +} + +window.addEventListener("load", KeyEvent.start); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/lock-dialog.js b/lightdm-avdanos-theme/js/lock-dialog.js new file mode 100755 index 0000000..276ab83 --- /dev/null +++ b/lightdm-avdanos-theme/js/lock-dialog.js @@ -0,0 +1,34 @@ +var lockScreen = document.getElementById("lock-screen"); +var backgroundScreen = document.getElementById("background-screen"); +var blankScreen = document.getElementById("blank-screen"); + +var LockDialog = { + start() { + lockScreen.addEventListener("click", Transition.showLogin); + blankScreen.addEventListener("click", this._unBlank); + blankScreen.addEventListener("mousemove", this._unBlank); + }, + _unBlank() { + if (Power.inBlank) { + Transition.fadeIn(); + Transition.hideLogin(); + + Power.inBlank = false; + + blankScreen.removeEventListener('mousemove', this._unBlank); + } + }, + hide() { + lockScreen.classList.add('hide'); + backgroundScreen.classList.add('blur'); + }, + show() { + lockScreen.classList.remove('hide'); + backgroundScreen.classList.remove('blur'); + + // Close all menus + Menus.closeAllMenus(); + } +} + +LockDialog.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/login-dialog.js b/lightdm-avdanos-theme/js/login-dialog.js new file mode 100755 index 0000000..dd868b9 --- /dev/null +++ b/lightdm-avdanos-theme/js/login-dialog.js @@ -0,0 +1,197 @@ +var lockScreen = document.getElementById("lock-screen"); +var loginScreenContent = document.getElementById("login-content"); + +var usersContainer = document.getElementById("users"); + +var backgroundScreen = document.getElementById("background-screen"); + +var backButton = document.getElementById("back-button"); +var loginButton = document.getElementById("user-input-submit"); + +var userPicture = document.getElementById("user-picture"); + +var batteryButton = document.getElementById("battery-button"); +var batteryData = document.getElementsByClassName("battery-data"); +var batteryState = document.getElementById("battery-state"); + +var brightnessButton = document.getElementById("brightness-button"); +var brightnessData = document.getElementsByClassName("brightness-data"); +var brightnessSlider = document.getElementById("brightness-slider"); + +var batteryBar = document.getElementById("battery-bar"); +var batteryBarLarge = document.getElementById("battery-bar-large"); + +var emailInput = document.getElementById('user-input-email'); +var passwordInput = document.getElementById('user-input-password'); +var apiInput = document.getElementById('user-input-api'); + +var toggleButtons = document.getElementsByClassName('toggle-button'); + +function createElementFromString(data) { + const template = document.createElement("template"); + template.innerHTML = data; + return template.content.firstElementChild; +} + +function createUserItem(user, index) { + let displayName = user.display_name; + let userName = user.username; + let userPicture = user.image; + + let itemContainer = document.createElement("div"); + itemContainer.id = `user_${userName}`; + itemContainer.classList.add("user"); + + + let userPictureElement = document.createElement("img"); + userPictureElement.classList.add("user-picture"); + userPictureElement.src = userPicture; + itemContainer.appendChild(userPictureElement); + + + // User Details Container + let userDetailsContainer = document.createElement("div"); + userDetailsContainer.classList.add("user-details"); + itemContainer.appendChild(userDetailsContainer); + + let userDetailsUserName = document.createElement("span"); + userDetailsUserName.classList.add("user-name"); + userDetailsUserName.innerText = displayName; + userDetailsContainer.appendChild(userDetailsUserName); + + let userDetailsUserState = document.createElement("span"); + userDetailsUserState.classList.add("user-state"); + userDetailsContainer.appendChild(userDetailsUserState); + + + // User Inputs Container + let userInputsContainer = document.createElement("div"); + userInputsContainer.classList.add("inputs"); + itemContainer.appendChild(userInputsContainer); + + let userInputPasswordWarper = document.createElement("div"); + userInputPasswordWarper.classList.add("user-input"); + userInputPasswordWarper.classList.add("warper"); + userInputsContainer.appendChild(userInputPasswordWarper) + + let userInputPasswordField = document.createElement("input"); + userInputPasswordField.id = "user-password-field_" + userName; + userInputPasswordField.classList.add("user-input"); + userInputPasswordField.type = "password"; + userInputPasswordField.placeholder = "Password"; + userInputPasswordField.autocomplete = "off"; + userInputPasswordWarper.appendChild(userInputPasswordField); + + let userInputPasswordToggle = createElementFromString(` + + + + + `); + userInputPasswordWarper.appendChild(userInputPasswordToggle); + + + // User Message Container + let userMessage = document.createElement("span"); + userMessage.classList.add("user-message"); + userMessage.id = "user-message_" + userName; + itemContainer.appendChild(userMessage); + + + // User Login Controls Container + let userLoginControlsContainer = document.createElement("div"); + userLoginControlsContainer.classList.add("login-controls"); + userInputsContainer.appendChild(userLoginControlsContainer); + + let userLoginControlsBackButton = createElementFromString(` +
+ +
+ `); + userLoginControlsBackButton.addEventListener("click", Transition.hideLogin); + userLoginControlsContainer.appendChild(userLoginControlsBackButton); + + let userLoginControlsLoginButton = createElementFromString(` + + `); + userLoginControlsLoginButton.addEventListener( + "click", + auth.startAuthentication.bind(auth, userName) + ); + userLoginControlsContainer.appendChild(userLoginControlsLoginButton); + + usersContainer.appendChild(itemContainer); + + itemContainer.onclick = () => { + console.log("item click"); + usersContainer.style.transform = `translateX(-${parseInt(100 / lightdm.users.length * index)}%)`; + lightdm.users.forEach((user) => { + document.getElementById(`user_${user.username}`).classList.add("inactive"); + }) + itemContainer.classList.remove("inactive") + }; + + return itemContainer; +} + +var LoginDialog = { + start() { + lockScreen.addEventListener("click", Transition.showLogin); + + lightdm.users.forEach((user, index) => { + let userContainer = createUserItem(user, index); + if (index != 0) { + userContainer.classList.add("inactive"); + } + }) + + Array.from(toggleButtons).forEach((button) => { + button.addEventListener("click", () => { + button.classList.toggle('active'); + button.parentElement.children[0].type = + button.classList.contains('active') ? 'text' : 'password'; + }) + }) + + if (lightdm.can_access_battery) { + this.updateBatteryData(); + lightdm.battery_update.connect(this.updateBatteryData); + } else { + batteryButton.classList.add('disabled'); + } + + if (lightdm.can_access_brightness) { + this.updateBrightnessData(); + lightdm.brightness_update.connect(this.updateBrightnessData); + } else { + brightnessButton.classList.add('disabled'); + } + }, + updateBatteryData() { + Array.from(batteryData).forEach((data) => { + data.innerText = `${lightdm.batteryData.level}%`; + }) + + batteryState.innerText = lightdm.batteryData.state; + + batteryBar.style.width = `${16 * (lightdm.batteryData.level / 100)}px`; + batteryBarLarge.style.width = `${32 * (lightdm.batteryData.level / 100)}px`; + }, + updateBrightnessData() { + let value = lightdm.brightness; + + Array.from(brightnessData).forEach((data) => { + data.innerText = `${value}%`; + }); + + brightnessSlider.value = value; + }, + hide() { + loginScreenContent.classList.add('hide'); + }, + show() { + loginScreenContent.classList.remove('hide'); + } +} + +LoginDialog.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/menus.js b/lightdm-avdanos-theme/js/menus.js new file mode 100755 index 0000000..e7fa2b6 --- /dev/null +++ b/lightdm-avdanos-theme/js/menus.js @@ -0,0 +1,193 @@ +var powerMenu = document.getElementById("power-menu"); +var powerButton = document.getElementById("power-button"); + +var batteryMenu = document.getElementById("battery-menu"); +var batteryButton = document.getElementById("battery-button"); + +var brightnessMenu = document.getElementById("brightness-menu"); +var brightnessButton = document.getElementById("brightness-button"); +var brightnessSlider = document.getElementById("brightness-slider"); + +var layoutMenu = document.getElementById("layout-menu"); +var layoutButton = document.getElementById("layout-button"); +var layoutName = document.getElementById("layout-name"); + +var backgroundMenu = document.getElementById("background-menu"); +var backgroundButton = document.getElementById("background-button"); +var backgroundList = document.getElementById("background-list"); + +var sessionMenu = document.getElementById("session-menu"); +var sessionButton = document.getElementById("session-button"); +var sessionName = document.getElementById("session-name"); +var sessionIcon = document.getElementById("session-icon"); + +var clockMenu = document.getElementById("clock-menu"); +var clockButton = document.getElementById("clock-button"); + +var loginScreen = document.getElementById("login-screen"); + +const Menus = { + start() { + loginScreen.addEventListener("click", this.closeAllMenus); + clockMenu.addEventListener("click", (event) => { + event.stopPropagation(); + }); + powerButton.addEventListener("click", (event) => { + event.stopPropagation(); + this.toggleMenus(powerMenu); + }); + batteryButton.addEventListener("click", (event) => { + if (lightdm.can_access_battery) { + event.stopPropagation(); + this.toggleMenus(batteryMenu); + } + }); + brightnessButton.addEventListener('click', (event) => { + if (lightdm.can_access_brightness) { + event.stopPropagation(); + this.toggleMenus(brightnessMenu); + } + }); + layoutButton.addEventListener("click", (event) => { + event.stopPropagation(); + this.toggleMenus(layoutMenu); + }); + + backgroundButton.addEventListener("click", (event) => { + event.stopPropagation(); + this.toggleMenus(backgroundMenu); + }); + sessionButton.addEventListener("click", (event) => { + event.stopPropagation(); + this.toggleMenus(sessionMenu); + }); + clockButton.addEventListener("click", (event) => { + event.stopPropagation(); + this.toggleMenus(clockMenu); + }); + + this._setBrightness(lightdm.brightness, false); + brightnessSlider.addEventListener('input', () => { + this._setBrightness(brightnessSlider.value, true); + }) + brightnessSlider.addEventListener('click', (event) => { + event.stopPropagation(); + }) + + this._loadLayouts(); + this._setLayout( + lightdm.layouts.find((layout) => { + if (typeof lightdm.layout == "object") { + return layout.name == lightdm.layout.name; + } else { + return layout.name == lightdm.layout; + } + }), + false + ); + + this._loadBackgrounds(); + + this._loadSessions(); + this._setSession(Utils.getLastUsedSession(), false); + }, + closeAllMenus() { + powerMenu.classList.remove("show"); + batteryMenu.classList.remove("show"); + brightnessMenu.classList.remove('show'); + layoutMenu.classList.remove("show"); + + backgroundMenu.classList.remove("show"); + sessionMenu.classList.remove("show"); + clockMenu.classList.remove("show"); + }, + toggleMenus(menus) { + if (!menus.classList.contains("show")) { + this.closeAllMenus(); + menus.classList.add("show"); + } else { + menus.classList.remove("show"); + } + }, + + _setBrightness(value, update = true) { + brightnessSlider.value = value; + + if (update) { + lightdm.brightness = value; + } + }, + + _loadLayouts() { + lightdm.layouts.forEach((layout) => { + let item = document.createElement("span"); + item.innerText = `${layout.description} (${layout.name.replace(" ", "_")})`; + item.classList.add("item"); + + item.addEventListener("click", () => { + this.closeAllMenus(); + this._setLayout(layout); + }); + + layoutMenu.appendChild(item); + }); + }, + _setLayout(layout, update = true) { + layoutName.innerText = layout.name.replace(" ", "_").toUpperCase(); + + if (update) { + lightdm.layout = layout; + } + }, + + _loadBackgrounds() { + let backgroundPaths = []; + Backgrounds.getBackgrounds(greeter_config.branding.background_images_dir, backgroundPaths); + + // Load backgrounds when greeter is completely loaded + window.addEventListener("load", () => { + Object.values(backgroundPaths).forEach((path) => { + let item = document.createElement("img"); + item.classList.add('item'); + item.src = path; + + item.addEventListener("click", () => Backgrounds.setBackground(path)) + + backgroundList.appendChild(item); + }) + }); + }, + + _loadSessions() { + lightdm.sessions.forEach((session) => { + let item = document.createElement("div"); + item.classList.add("item"); + + let icon = document.createElement("img"); + icon.classList.add("icon"); + icon.src = `img/sessions/${session.key}.png`; + item.appendChild(icon); + + let name = document.createElement("span"); + name.innerText = session.name; + item.appendChild(name); + + item.addEventListener("click", () => { + this.closeAllMenus(); + this._setSession(session); + }); + + sessionMenu.appendChild(item); + }); + }, + _setSession(session, update = true) { + sessionName.innerText = session.name; + sessionIcon.src = `img/sessions/${session.key}.png`; + + if (update) { + localStorage.setItem('last-used-session', session.key); + } + }, +}; + +Menus.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/popup-dialog.js b/lightdm-avdanos-theme/js/popup-dialog.js new file mode 100755 index 0000000..b6db3db --- /dev/null +++ b/lightdm-avdanos-theme/js/popup-dialog.js @@ -0,0 +1,41 @@ +var popupScreen = document.getElementById("popup-screen"); +var popupCloseButtons = document.getElementsByClassName("popup-close"); + +var PopupDialog = { + inShown: false, + start() { + popupScreen.addEventListener('click', (event) => { + if (event.target.id == "popup-screen") { + this.hide(); + } + }) + Array.from(popupCloseButtons).forEach((button) => { + button.addEventListener('click', (event) => { + event.stopPropagation(); + this.hide(); + }) + }) + }, + hide() { + popupScreen.classList.add('hide'); + this.inactiveAllDialog(); + this.inShown = false; + }, + show() { + popupScreen.classList.remove('hide'); + this.inShown = true; + }, + inactiveAllDialog() { + Array.from(popupScreen.children).forEach((dialog) => { + dialog.classList.remove('show'); + }); + }, + switchDialog(name) { + this.inactiveAllDialog(); + + let selectedDialog = document.getElementById(`${name}-dialog`); + selectedDialog.classList.add('show'); + } +} + +PopupDialog.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/power.js b/lightdm-avdanos-theme/js/power.js new file mode 100755 index 0000000..f1077b5 --- /dev/null +++ b/lightdm-avdanos-theme/js/power.js @@ -0,0 +1,110 @@ +var sleepMenuItem = document.getElementById("sleep-menu-item"); +var hibernateMenuItem = document.getElementById("hibernate-menu-item"); +var restartMenuItem = document.getElementById("restart-menu-item"); +var shutdownMenuItem = document.getElementById("shutdown-menu-item"); + +var leaveGreeterDialogTitle = document.getElementById("leave-greeter-dialog-title"); +var leaveGreeterDialogMessage = document.getElementById("leave-greeter-dialog-message"); +var leaveGreeterDialogConfirmButton = document.getElementById("leave-greeter-dialog-confirm-button"); + +const POWER_ACTION = { + SUSPEND: 0, + HIBERNATE: 1, + RESTART: 2, + SHUTDOWN: 3 +} + +var Power = { + inBlank: false, + start() { + if (lightdm.can_suspend) { + sleepMenuItem.classList.remove('disabled'); + sleepMenuItem.addEventListener('click', () => { + this.startAction(POWER_ACTION.SUSPEND); + this.inBlank = true; + }); + } + + if (lightdm.can_hibernate) { + hibernateMenuItem.classList.remove('disabled'); + hibernateMenuItem.addEventListener('click', () => { + this.showDialog(POWER_ACTION.HIBERNATE); + this.inBlank = true; + }); + } + if (lightdm.can_restart) { + restartMenuItem.classList.remove('disabled'); + restartMenuItem.addEventListener('click', () => { + this.showDialog(POWER_ACTION.RESTART); + }); + } + if (lightdm.can_shutdown) { + shutdownMenuItem.classList.remove('disabled'); + shutdownMenuItem.addEventListener('click', () => { + this.showDialog(POWER_ACTION.SHUTDOWN); + }); + } + }, + showDialog(type) { + PopupDialog.switchDialog('leave-greeter'); + PopupDialog.show(); + + switch (type) { + case POWER_ACTION.HIBERNATE: + leaveGreeterDialogTitle.innerText = 'Hibernate'; + leaveGreeterDialogMessage.innerText = 'Do you really want to restart your hibernate? Hibernate will be save your activity to the disk'; + leaveGreeterDialogConfirmButton.innerText = 'Hibernate'; + leaveGreeterDialogConfirmButton.onclick = (event) => { + event.stopPropagation(); + this.startAction(type); + } + break; + + case POWER_ACTION.RESTART: + leaveGreeterDialogTitle.innerText = 'Restart'; + leaveGreeterDialogMessage.innerText = 'Do you really want to restart your computer?'; + leaveGreeterDialogConfirmButton.innerText = 'Restart'; + leaveGreeterDialogConfirmButton.onclick = (event) => { + event.stopPropagation(); + this.startAction(type); + } + break; + + case POWER_ACTION.SHUTDOWN: + leaveGreeterDialogTitle.innerText = 'Shutdown'; + leaveGreeterDialogMessage.innerText = 'Do you really want to shutdown your computer?'; + leaveGreeterDialogConfirmButton.innerText = 'Shutdown'; + leaveGreeterDialogConfirmButton.onclick = (event) => { + event.stopPropagation(); + this.startAction(type); + } + break; + } + }, + startAction(action) { + Transition.fadeOut(); + + setTimeout(() => { + switch (action) { + case POWER_ACTION.SUSPEND: + lightdm.suspend(); + break; + + case POWER_ACTION.HIBERNATE: + PopupDialog.hide(); + lightdm.hibernate(); + break; + + case POWER_ACTION.RESTART: + lightdm.restart(); + break; + + case POWER_ACTION.SHUTDOWN: + lightdm.shutdown(); + break; + } + }, 1000); + } +} + +Power.start(); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/transition.js b/lightdm-avdanos-theme/js/transition.js new file mode 100755 index 0000000..bf546cb --- /dev/null +++ b/lightdm-avdanos-theme/js/transition.js @@ -0,0 +1,28 @@ +var Transition = { + fadeIn() { + let blankScreen = document.getElementById("blank-screen"); + let backgroundScreen = document.getElementById("background-screen"); + blankScreen.classList.add('hide'); + backgroundScreen.classList.remove('blur'); + }, + fadeOut() { + let blankScreen = document.getElementById("blank-screen"); + let backgroundScreen = document.getElementById("background-screen"); + blankScreen.classList.remove('hide'); + backgroundScreen.classList.add('blur'); + + LockDialog.hide(); + LoginDialog.hide(); + + }, + showLogin() { + LockDialog.hide(); + LoginDialog.show(); + }, + hideLogin() { + LockDialog.show(); + LoginDialog.hide(); + } +} + +window.addEventListener("load", Transition.fadeIn); \ No newline at end of file diff --git a/lightdm-avdanos-theme/js/utils.js b/lightdm-avdanos-theme/js/utils.js new file mode 100644 index 0000000..efbc029 --- /dev/null +++ b/lightdm-avdanos-theme/js/utils.js @@ -0,0 +1,15 @@ +var Utils = { + getLastUsedSession() { + let lastUsedSession = localStorage.getItem('last-used-session'); + return (lastUsedSession != null) ? + lightdm.sessions.filter((session) => { return session.key == lastUsedSession })[0] + : lightdm.sessions[0]; + }, + + isPromise(value) { + return (typeof value === 'object' && typeof value.then === 'function'); + }, + isImageFile(path) { + return path.match(/\.(gif|jpe?g|tiff?|png|webp|bmp|svg)$/i) !== null; + } +} \ No newline at end of file diff --git a/lightdm-avdanos-theme/user-picture.png b/lightdm-avdanos-theme/user-picture.png new file mode 100755 index 0000000..976c815 Binary files /dev/null and b/lightdm-avdanos-theme/user-picture.png differ