Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Habit Tracker #1

Merged
merged 14 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# habit-tracker
## Link to the deployment of the final project
Final course draft: Habit Tracker
https://mark-artyom.github.io/habit-tracker/

# JavaScript from Scratch - Language basics and practice for beginners

## Link to the course
https://stepik.org/course/122243/

## Link to the teacher's code
https://github.com/AlariCode/7-javascript-1
Binary file added android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions data/demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"id": 1,
"icon": "sport",
"name": "Push-ups",
"target": 21,
"days": [
{ "comment": "The first approach is always difficult"},
{ "comment": "The second day is already easier"}
]
},
{
"id": 2,
"icon": "noodle",
"name": "Proper nutrition",
"target": 16,
"days": [
{ "comment": "The first approach is always difficult"},
{ "comment": "In a year's time, we'll regret not starting today."},
{ "comment": "Self-belief creates heroes."}
]
},
{
"id": 3,
"icon": "water",
"name": "Volume of liquid consumed",
"target": 7,
"days": [
{ "comment": "The most important rival is the reflection in the mirror!"},
{ "comment": "The second day is already easier"},
{ "comment": "In a year's time, we'll regret not starting today."},
{ "comment": "It's never too late to become what you've always dreamed of!"}
]
}
]
Binary file added favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicon.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions img/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions img/comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions img/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions img/delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions img/noodle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions img/sport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions img/water.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="">
<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=Comfortaa:wght@300..700&display=swap" rel="stylesheet">
<link rel="apple-touch-icon" sizes="180x180" href="/habit-tracker/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/habit-tracker/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/habit-tracker/favicon-16x16.png">
<link rel="manifest" href="/habit-tracker/site.webmanifest">
<link rel="stylesheet" href="/habit-tracker/style/styles.css">
<title>Habit Tracker</title>
</head>
<body>
<div class="app">
<div class="panel">
<img src="/habit-tracker/img/logo.svg" alt="logo" class="logo">
<span class="app-name">Habbit</span>
<nav class="menu">
<div class="menu-list"></div>
<button class="menu-add" onclick="togglePopup()">
<img src="/habit-tracker/img/add.svg" alt="add" srcset="">
</button>
</nav>
</div>
<div class="content">
<header class="header">
<h1 class="title-haeder">Push-ups</h1>
<div class="progress">
<div class="progress-text">
<div class="progress-name">Progress</div>
<div class="progress-percent">%</div>
</div>
<div class="progress-bar">
<div class="progress-cover-bar"></div>
</div>
</div>
</header>
<main class="main">
<div class="main-wrapper"></div>
<div class="habit-add">
<div class="habit-day-wrapper">
<div class="habit-day">Day 2</div>
</div>
<form class="habit-coment-form" onsubmit="addDays(event)">
<input class="input-item" type="text" name="comment" id="comment" placeholder="Comment">
<img src="/habit-tracker/img/comment.svg" alt="cmment" srcset="" class="input-icon">
<button class="habit-done">Done</button>
</form>
</div>
</main>
</div>
<div class="cover cover-hidden">
<div class="pop-up">
<button class="close" onclick="togglePopup()">
<img src="/habit-tracker/img/cross.svg" alt="close" srcset="">
</button>
<h2>A new habit</h2>
<div class="icon-label">Icon</div>
<div class="icon-select">
<button class="icon icon-active" onclick="setIcon(this, 'sport')">
<img src="/habit-tracker/img/sport.svg" alt="sport" srcset="">
</button>
<button class="icon" onclick="setIcon(this, 'noodle')">
<img src="/habit-tracker/img/noodle.svg" alt="noodle" srcset="">
</button>
<button class="icon" onclick="setIcon(this, 'water')">
<img src="/habit-tracker/img/water.svg" alt="water" srcset="">
</button>
</div>
<form action="" class="pop-up-form" onsubmit="addHabbit(event)">
<input type="text" name="name" id="title" placeholder="Title" class="input-item-pp" autocomplete="name">
<input type="text" name="icon" id="icon" hidden placeholder="Title" class="input-item-pp" value="sport">
<input type="number" name="target" id="target" placeholder="Target" class="input-item-pp">
<button type="submit" class="button-done">Add</button>
</form>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<script src="/habit-tracker/js/app.js"></script>
</body>
</html>
Loading
Loading