Skip to content

Commit

Permalink
Done.
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterGetman committed Jun 29, 2024
1 parent e42b892 commit d4a7d43
Show file tree
Hide file tree
Showing 13 changed files with 414 additions and 33 deletions.
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^4.5.2",
"glob": "^8.1.0"
"glob": "^8.1.0",
"vite": "^4.5.2"
},
"author": "me",
"license": "ISC",
"dependencies": {
"flatpickr": "^4.6.13",
"izitoast": "^1.4.0",
"vite-plugin-full-reload": "^1.0.5",
"vite-plugin-html-inject": "^1.0.1"
}
Expand Down
39 changes: 39 additions & 0 deletions src/1-timer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1-timer</title>
<link rel="stylesheet" href="./css/styles.css" />
<link rel="stylesheet" href="./css/1-timer.css" />
</head>
<body>
<a href="./2-snackbar.html">2-snackbar</a>
<div class="wrapper">
<input type="text" id="datetime-picker" />
<button type="button" data-start>Start</button>

<div class="timer">
<div class="field">
<span class="value" data-days>00</span>
<span class="label">Days</span>
</div>
<div class="field">
<span class="value" data-hours>00</span>
<span class="label">Hours</span>
</div>
<div class="field">
<span class="value" data-minutes>00</span>
<span class="label">Minutes</span>
</div>
<div class="field">
<span class="value" data-seconds>00</span>
<span class="label">Seconds</span>
</div>
</div>
</div>

<script src="./js/1-timer.js" type="module"></script>
</body>
</html>
37 changes: 37 additions & 0 deletions src/2-snackbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2-snackbar</title>
<link rel="stylesheet" href="./css/styles.css" />
<link rel="stylesheet" href="./css/2-snackbar.css" />
</head>
<body>
<div class="wrapper">
<a href="./1-timer.html">1-timer</a>
<form class="form">
<label>
Delay (ms)
<input type="number" min="1" name="delay" required />
</label>

<fieldset>
<legend>State</legend>
<label>
<input type="radio" name="state" value="fulfilled" required />
Fulfilled
</label>
<label>
<input type="radio" name="state" value="rejected" required />
Rejected
</label>
</fieldset>

<button type="submit">Create notification</button>
</form>
</div>
<script src="./js/2-snackbar.js" type="module"></script>
</body>
</html>
73 changes: 73 additions & 0 deletions src/css/1-timer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.wrapper {
margin: 20px 8px 0px;
}

#datetime-picker {
padding: 8px 16px;
margin-bottom: 32px;
border: 1px solid #808080;
border-radius: 4px;
width: 272px;
font-weight: 400;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.04em;
color: #2e2f42;
cursor: not-allowed;
}

#datetime-picker.inp-enabled {
cursor: pointer;
}

button {
border: none;
border-radius: 8px;
padding: 9px 16px;
min-width: 75px;
background: #cfcfcf;
font-weight: 500;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.04em;
color: #989898;
cursor: not-allowed;
}

.btn-enabled {
background-color: #4e75ff;
color: #fff;
cursor: pointer;
}

.enabled:hover,
.enabled:focus {
background: #6c8cff;
}

.timer {
display: flex;
gap: 24px;
}

.field {
display: flex;
flex-direction: column;
align-items: center;
}

.value {
font-weight: 400;
font-size: 40px;
line-height: 1.2;
letter-spacing: 0.04em;
color: #2e2f42;
}

.label {
font-weight: 400;
font-size: 16px;
line-height: 1.5;
color: #2e2f42;
text-transform: uppercase;
}
80 changes: 80 additions & 0 deletions src/css/2-snackbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.form {
width: 360px;
}

.form > label {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 16px;
}

input {
border: 1px solid #808080;
border-radius: 4px;
height: 40px;
padding-left: 16px;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.04em;
color: #2e2f42;
outline: transparent;
background-color: #fff;
transition: background-color 250ms linear;
}

input:hover,
fieldset:hover {
border: 1px solid #000;
}

label {
font-weight: 400;
font-size: 16px;
line-height: 1.5;
color: #2e2f42;
}

fieldset {
margin-bottom: 24px;
border-radius: 4px;
border: 1px solid #808080;
font-weight: 400;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.04em;
color: #2e2f42;
transition: border 250ms linear;
}

legend {
margin-left: 28px;
}

input[name='state'] {
width: 20px;
height: 20px;
display: inline-block;
margin-left: 48px;
vertical-align: top;
}

button[type='submit'] {
border: none;
border-radius: 8px;
padding: 8px 16px;
min-width: 360px;
height: 40px;
background: #4e75ff;
font-weight: 500;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.04em;
color: #fff;
transition: background-color 250ms linear;
}

button:hover,
button:focus {
background: #6c8cff;
}
9 changes: 9 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
<link rel="stylesheet" href="./css/styles.css" />
</head>
<body>
<ul>
<li>
<a href="./1-timer.html">1-timer</a>
</li>

<li>
<a href="./2-snackbar.html">2-snackbar</a>
</li>
</ul>
<script type="module" src="./main.js"></script>
</body>
</html>
Loading

0 comments on commit d4a7d43

Please sign in to comment.