|
24 | 24 | }); |
25 | 25 | </script> |
26 | 26 |
|
27 | | -<div class="login" bind:this={loginDiv}> |
28 | | - <div class="background"></div> |
29 | | - <div class="container"> |
30 | | - <h1>Login</h1> |
31 | | - <a href="https://modrinth.com/mod/i-want-to-control-my-server"><img src={icon} alt="IWTCMS logo" /></a> |
32 | | - <form id="loginForm" method="post" bind:this={loginForm}> |
33 | | - <label for="username" id="username">Username:</label> |
34 | | - <input type="text" name="username" required /> |
35 | | - <br /> |
36 | | - <label for="password" id="password">Password:</label> |
37 | | - <input type="password" name="password" required /> |
38 | | - <br /> |
39 | | - <button type="submit">Login</button> |
| 27 | +<div class="absolute flex items-center justify-center w-screen h-screen z-10" bind:this={loginDiv}> |
| 28 | + <div class="absolute w-screen h-screen z-[99] bg-[var(--login-background-color)] backdrop-blur-[20px]"></div> |
| 29 | + <div class="flex z-[100] items-center absolute h-[250px] bg-[var(--login-panel-background-color)] rounded-[10px] pr-[10px] pl-px"> |
| 30 | + <h1 class="absolute top-0 left-[50%] transform-[translateX(-50%)]">Login</h1> |
| 31 | + <a class="h-[110px] w-[110px] block" href="https://modrinth.com/mod/i-want-to-control-my-server"><img class="block h-[110px] w-[110px] transition-[filer 0.3s ease, box-shadow 0.3s ease]" src={icon} alt="IWTCMS logo" /></a> |
| 32 | + <form class="w-[250px]" bind:this={loginForm}> |
| 33 | + <label for="username">Username:</label> |
| 34 | + <input class="bg-[var(--login-input-background-color)] border-none rounded-[5px] focus:outline-none w-full text-[var(--login-text-color)] px-[5px] transition-[filer 0.3s ease, box-shadow 0.3s ease] mb-[10px]" type="text" id="username" name="username" required /> |
| 35 | + |
| 36 | + <label for="password">Password:</label> |
| 37 | + <input class="bg-[var(--login-input-background-color)] border-none rounded-[5px] focus:outline-none w-full text-[var(--login-text-color)] px-[5px] transition-[filer 0.3s ease, box-shadow 0.3s ease] mb-[10px]" type="password" name="password" required /> |
| 38 | + |
| 39 | + <button class="w-full h-[25px] bg-[var(--login-input-background-color)] border-none rounded-[5px] text-[var(--login-text-color)] transition-[filer 0.3s ease, box-shadow 0.3s ease]" type="submit" id="password">Login</button> |
40 | 40 | </form> |
41 | 41 | </div> |
42 | 42 | </div> |
43 | 43 |
|
44 | 44 | <style lang="scss"> |
45 | | - .login { |
46 | | - position: absolute; |
47 | | - display: flex; |
48 | | - align-items: center; |
49 | | - justify-content: center; |
50 | | - width: 100vw; |
51 | | - height: 100vh; |
52 | | -
|
53 | | - z-index: 10; |
54 | | -
|
55 | | - .background { |
56 | | - position: absolute; |
57 | | - width: 100vw; |
58 | | - height: 100vh; |
59 | | - z-index: 99; |
60 | | - background: var(--login-background-color); |
61 | | - backdrop-filter: blur(20px); |
62 | | - -webkit-backdrop-filter: blur(20px); |
63 | | - display: flex; |
64 | | - justify-content: center; |
65 | | - align-items: center; |
66 | | - } |
67 | | -
|
68 | | - .container { |
69 | | - display: flex; |
70 | | - align-items: center; |
71 | | - justify-content: center; |
72 | | - position: absolute; |
73 | | - left: 50%; |
74 | | - top: 50%; |
75 | | - transform: translate(-50%, -50%); |
76 | | - z-index: 100; |
77 | | - width: 400px; |
78 | | - height: 250px; |
79 | | - background-color: var(--login-panel-background-color); |
80 | | - border-radius: 10px; |
81 | | - padding-right: 10px; |
82 | | -
|
83 | | - h1 { |
84 | | - position: absolute; |
85 | | - top: 0; |
86 | | - left: 50%; |
87 | | - transform: translateX(-50%); |
88 | | - } |
89 | | -
|
90 | | - input { |
91 | | - border: none; |
92 | | - border-radius: 5px; |
93 | | -
|
94 | | - &:focus { |
95 | | - outline: none; |
96 | | - } |
97 | | - } |
98 | | -
|
99 | | - label { |
100 | | - display: inline-block; |
101 | | - width: 90px; |
102 | | - } |
103 | | -
|
104 | | - br { |
105 | | - margin-bottom: 10px; |
106 | | - } |
107 | | -
|
108 | | - button { |
109 | | - width: 100%; |
110 | | - height: 20px; |
111 | | - border: none; |
112 | | - border-radius: 5px; |
113 | | - } |
114 | | -
|
115 | | - input, |
116 | | - button, |
117 | | - img { |
118 | | - // hover holo effect |
119 | | - transition: |
120 | | - filter 0.3s ease, |
121 | | - box-shadow 0.3s ease; |
122 | | - &:hover { |
123 | | - filter: drop-shadow(0 0 10px var(--holo-effect-color)); |
124 | | - } |
125 | | - } |
| 45 | + @use "../styles/hover-holo-effect"; |
| 46 | +
|
| 47 | + form > input, |
| 48 | + button, |
| 49 | + img { |
| 50 | + transition: filter 0.3s ease, box-shadow 0.3s ease; |
| 51 | + &:hover { |
| 52 | + @include hover-holo-effect.hover-holo-effect; |
126 | 53 | } |
127 | 54 | } |
128 | 55 | </style> |
0 commit comments