Skip to content

Commit

Permalink
feat: cleanup 2
Browse files Browse the repository at this point in the history
  • Loading branch information
a7v8x committed Feb 16, 2024
1 parent 4a56fa4 commit 371dacd
Show file tree
Hide file tree
Showing 47 changed files with 238 additions and 500 deletions.
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions input-01/material-ui.html → input-01/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Poppins&display=swap"
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
rel="stylesheet"
>
<link rel="stylesheet" href="style.css">
Expand All @@ -33,7 +33,7 @@
<img
alt="Eye Icon"
title="Eye Icon"
src="eye.svg"
src="assets/eye.svg"
class="input__icon"
>
</div>
Expand Down
4 changes: 2 additions & 2 deletions input-01/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ inputIcon.addEventListener("click", (e) => {
inputIcon.setAttribute(
'src',
input.getAttribute('type') === 'password' ?
'eye-off.svg'
'assets/eye-off.svg'
:
'eye.svg'
'assets/eye.svg'
);

input.setAttribute(
Expand Down
45 changes: 21 additions & 24 deletions input-01/style.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@

@import url(https://fonts.googleapis.com/css?family=Roboto);

html {
font-family: 'Roboto', sans-serif;
font-size: 14px;
}

:root {
--primary: #007FFF;
--secondary: #6F7E8C;
--hover: #F5F5F5;
--text: #212121;
}

body {
font-family: 'Roboto', sans-serif;
font-size: 14px;
}

* {
margin: 0;
padding: 0;
Expand All @@ -21,9 +18,9 @@ html {

.box {
background-color: white;
padding: 24px;
padding-top: 12px;
border-radius: 16px;
padding: 1.5rem;
padding-top: 0.75rem;
border-radius: 1rem;
}

.box h2 {
Expand All @@ -44,17 +41,17 @@ html {

.input__wrapper {
position: relative;
padding: 15px 0 0;
padding: 1rem 0 0;
}

.input__field {
border: 0;
border-bottom: 2px solid var(--secondary);
outline: 0;
font-size: 16px;
font-size: 1rem;
color: var(--text);
padding: 4px 0px;
padding-right: 32px;
padding: 0.25rem 0px;
padding-right: 2rem;

background: transparent;
transition: border-color 0.2s;
Expand All @@ -65,19 +62,19 @@ html {
}

.input__field:placeholder-shown ~ .input__label {
font-size: 16px;
font-size: 1rem;
cursor: text;
color: var(--secondary);
top: 20px;
top: 1.25rem;
}

label,
.input__field:focus ~ .input__label {
position: absolute;
top: 0;
display: block;
font-size: 14px;
left: -1px;
font-size: 0.875rem;
left: -0.0625rem;
color: var(--secondary);
transition: 0.3s;
}
Expand All @@ -92,11 +89,11 @@ label,

.input__icon {
position: absolute;
right: -14px;
bottom: -11px;
width: 26px;
height: 26px;
padding: 2px;
right: -0.875rem;
bottom: -0.6875rem;
width: 1.625rem;
height: 1.625rem;
padding: 0.125rem;
transform: translate(-50%,-50%);
transform-origin: center;
cursor: pointer;
Expand Down
File renamed without changes
File renamed without changes
6 changes: 5 additions & 1 deletion input-02/material-ui.html → input-02/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<meta charset="UTF-8">
<title>Material UI Input</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
Expand All @@ -32,7 +36,7 @@
<img
alt="Eye Icon"
title="Eye Icon"
src="eye.svg"
src="assets/eye.svg"
class="input__icon"
>
</div>
Expand Down
4 changes: 2 additions & 2 deletions input-02/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ inputIcon.addEventListener("click", (e) => {
inputIcon.setAttribute(
'src',
input.getAttribute('type') === 'password' ?
'eye-off.svg'
'assets/eye-off.svg'
:
'eye.svg'
'assets/eye.svg'
);

input.setAttribute(
Expand Down
41 changes: 21 additions & 20 deletions input-02/style.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@

@import url("https://fonts.googleapis.com/css?family=Roboto");

html {
font-family: 'Roboto', sans-serif;
font-size: 16px;
}

:root {
--primary: #007FFF;
--secondary: #6F7E8C;
--text: #212121;
}

body {
font-family: 'Roboto', sans-serif;
font-size: 16px;
}

* {
margin: 0;
padding: 0;
Expand All @@ -20,11 +21,11 @@ html {

.box {
background-color: white;
padding: 24px;
padding: 1.5rem;
max-width: fit-content;
width: 100%;
padding-top: 12px;
border-radius: 16px;
padding-top: 0.75rem;
border-radius: 1rem;
}

.box h2 {
Expand All @@ -45,16 +46,16 @@ html {

.input__wrapper {
position: relative;
padding: 15px 0 0;
padding: 1rem 0 0;
}

.input__field {
border: 1px solid var(--secondary);
font-size: 1rem;
border-radius: 8px;
border-radius: 0.5rem;
color: var(--text);
padding: 8px;
padding-right: 32px;
padding: 0.5rem;
padding-right: 2rem;
background: transparent;
transition: border-color 0.2s;
}
Expand All @@ -67,19 +68,19 @@ html {
font-size: 1rem;
cursor: text;
color: var(--secondary);
top: 24px;
top: 1.5rem;
}


label,
.input__field:focus ~ .input__label {
position: absolute;
top: 6px;
padding: 0 4px;
top: 0.375rem;
padding: 0 0.25rem;
background-color: white;
display: block;
font-size: 14px;
left: 8px;
font-size: 0.875rem;
left: 0.5rem;
color: var(--secondary);
transition: 0.3s;
}
Expand All @@ -95,10 +96,10 @@ label,

.input__icon {
position: absolute;
right: -10px;
bottom: -10px;
width: 28px;
height: 28px;
right: -0.625rem;
bottom: -0.625rem;
width: 1.75rem;
height: 1.75rem;
transform: translate(-50%,-50%);
transform-origin: center;
cursor: pointer;
Expand Down
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion input-03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</label>
<img
alt="Eye Icon" title="Eye Icon"
src="eye.svg" class="input__icon"
src="assets/eye.svg" class="input__icon"
>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions input-03/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ inputIcon.addEventListener("click", (e) => {
inputIcon.setAttribute(
'src',
input.getAttribute('type') === 'password' ?
'eye-off.svg'
'assets/eye-off.svg'
:
'eye.svg'
'assets/eye.svg'
);

input.setAttribute(
Expand Down
36 changes: 18 additions & 18 deletions input-03/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
body {
font-family: 'Roboto', sans-serif;
height: 100vh;
display: flex;
background-color: var(--background);
display: flex;
justify-content: center;
align-items: center;
}

.box {
background-color: var(
background: var(
--box-background);
padding: 24px;
padding: 1.5rem;
max-width: fit-content;
width: 100%;
padding-top: 12px;
border-radius: 16px;
padding-top: 0.75rem;
border-radius: 1rem;
}

.box h2 {
Expand All @@ -40,18 +40,18 @@ body {

.input__wrapper {
position: relative;
padding: 15px 0 0;
padding: 1rem 0 0;
}

.input__field {
outline: 1.5px solid var(
--secondary);
font-size: 1rem;
border-radius: 8px;
border-radius: 0.5rem;
color: var(--secondary);
padding: 8px;
padding: 0.5rem;
border: none;
padding-right: 32px;
padding-right: 2rem;
background: transparent;
transition: all 0.2s;
}
Expand All @@ -65,19 +65,19 @@ body {
font-size: 1rem;
cursor: text;
color: var(--secondary);
top: 24px;
top: 1.5rem;
}

label,
.input__field:focus~.input__label {
position: absolute;
top: 6px;
padding: 0 4px;
top: 0.375rem;
padding: 0 0.25rem;
background-color: var(
--box-background);
display: block;
font-size: 14px;
left: 8px;
font-size: 0.875rem;
left: 0.5rem;
color: var(--secondary);
transition: 0.3s;
}
Expand All @@ -92,10 +92,10 @@ label,

.input__icon {
position: absolute;
right: -10px;
bottom: -10px;
width: 28px;
height: 28px;
right: -0.625rem;
bottom: -0.625rem;
width: 1.75rem;
height: 1.75rem;
transform: translate(-50%, -50%);
transform-origin: center;
cursor: pointer;
Expand Down
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion input-04/my-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<label for="password" class="input__label">
Password
</label>
<img alt="Eye Icon" title="Eye Icon" src="eye.svg" class="input__icon">
<img alt="Eye Icon" title="Eye Icon" src="assets/eye.svg" class="input__icon">
</div>
</form>
<script src="script.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions input-04/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ inputIcon.addEventListener("click", (e) => {
inputIcon.setAttribute(
'src',
input.getAttribute('type') === 'password' ?
'eye-off.svg'
'assets/eye-off.svg'
:
'eye.svg'
'assets/eye.svg'
);

input.setAttribute(
Expand Down
Loading

0 comments on commit 371dacd

Please sign in to comment.