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

Guntoro Yudhy Kusuma #12

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env jangan lupa di ignore

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

siap mas

26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# fancy-todo
# fancy-todo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jika ini untuk API Documentation Server, sebaiknya di folder server saja


## Fancy Todo | Rest API Documentation

**List of User Routes**

| Route | HTTP | Header(s) | Body | Description |
|------------------|---------|-----------|-------------------------------|-------------|
| `/users/signup` | POST | none | `name:string, email:string, password:string` | Register new user
| `/users/signin` | POST | none | ` email:string, password:string` | Sign in with registered user
| `/users/signup/google` | POST | none | ` email:string, password:string` | Signup or Sign in with Google Account. If the email has not been registered, a user will be created with the default password


**List of Todo Routes**

| Route | HTTP | Header(s) | Body | Description |
|------------------|---------|-----------|-------------------------------|-------------|
| `/todos` | GET | `token:string` | none | Get all user's todos (Authenticated users only) |
| `/todos/:id` | GET | `token:string` | none | Get a single todo (Owner only) |
| `/todos` | POST | `token:string` | `name:string, description:string:optional, due_date:date:optional` | Create a todo (Authenticated users only) |
| `/todos/:id` | DELETE | `token:string` | none | Delete a todo (Owner only) |
| `/todos/:id` | PUT | `token:string` | `name:string, description:string, due_date:date:optional, status:boolean` | Update all field of a todo (Owner only) |
| `/todos/:id/done` | PATCH | `token:string` | none | Complete the todo if it hasn't been done before and vice versa (Owner only) |


110 changes: 110 additions & 0 deletions client/css/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@

.form-control {
font-size: 14px;
transition: all 0.4s;
box-shadow: none;
}
.form-control:focus {
border-color: #5cb85c;
}
.form-control, .btn {
border-radius: 50px;
outline: none !important;
}
.signup-form, .signin-form {
width: 480px;
margin: 0 auto;
padding: 30px 0;
}
.signup-form form, .signin-form form {
border-radius: 5px;
margin-bottom: 20px;
background: #fff;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
padding: 40px;
}
.signup-form a, .signin-form a {
color: #5cb85c;
}
.signup-form h2, .signin-form h2 {
text-align: center;
font-size: 34px;
margin: 10px 0 15px;
}
.signup-form .hint-text, .signin-form .hint-text {
color: #999;
text-align: center;
margin-bottom: 20px;
}
.signup-form .form-group, .signin-form .form-group{
margin-bottom: 20px;
}
.signup-form .btn, .signin-form .btn {
font-size: 18px;
line-height: 26px;
font-weight: bold;
text-align: center;
}
.signup-btn, .signin-btn {
text-align: center;
border-color: #5cb85c;
transition: all 0.4s;
}
.signup-btn:hover, .signin-btn:hover {
background: #5cb85c;
opacity: 0.8;
}
.or-seperator {
margin: 50px 0 15px;
text-align: center;
border-top: 1px solid #e0e0e0;
}
.or-seperator b {
padding: 0 10px;
width: 40px;
height: 40px;
font-size: 16px;
text-align: center;
line-height: 40px;
background: #fff;
display: inline-block;
border: 1px solid #e0e0e0;
border-radius: 50%;
position: relative;
top: -22px;
z-index: 1;
}
.social-btn .btn {
color: #fff;
margin: 10px 0 0 15px;
font-size: 15px;
border-radius: 50px;
font-weight: normal;
border: none;
transition: all 0.4s;
}
.social-btn .btn:first-child {
margin-left: 0;
}
.social-btn .btn:hover {
opacity: 0.8;
}
.social-btn .btn-primary {
background: #507cc0;
}
.social-btn .btn-info {
background: #64ccf1;
}
.social-btn .btn-danger {
background: #df4930;
}
.social-btn .btn i {
float: left;
margin: 3px 10px;
font-size: 20px;
}

#btnLoginHere, #btnRegisterHere {
color: #5cb85c;
cursor: pointer;
}
49 changes: 49 additions & 0 deletions client/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
body {
background: #dfe7e9;
font-family: 'Poppins', sans-serif;
margin-top: 50px;
}
.todolist{
background-color:#FFF;
padding:20px 20px 10px 20px;
margin-top:30px;
}
.todolist h1{
margin:0;
padding-bottom:20px;
text-align:center;
}
.form-control{
border-radius:0;
}
li.ui-state-default{
background:#fff;
border:none;
border-bottom:1px solid #ddd;
}

li.ui-state-default:last-child{
border-bottom:none;
}

.todo-footer{
background-color:#F4FCE8;
margin:0 -20px -10px -20px;
padding: 10px 20px;
}
#done-items li{
padding:10px 0;
border-bottom:1px solid #ddd;
text-decoration:line-through;
}
#done-items li:last-child{
border-bottom:none;
}
#checkAll{
margin-top:10px;
}

input:checked + label {
/* background: #d6c349; */
text-decoration: line-through;
}
88 changes: 88 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!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">
<title>Fancy Todo</title>
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/login.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>

<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="1075139297559-k7it3o7qfuvahtvn1n8vd0vbpabvpufg.apps.googleusercontent.com">
</head>
<body>
<!-- untuk bantuan supaya button logout bisa dipencet -->
<div class="g-signin2" data-onsuccess="onSignIn" style="display: none"></div>

<!-- Nav bar -->
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top" id="mainNavbar">
<div class="container">
<a class="navbar-brand" href="#">Fancy Todo</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2">
<li class="nav-item ml-4">
<h5 class="nav-link active" id="userLoggedIn" style="display: none"></h5>
</li>
<li class="nav-item ml-2 mt-2">
<a class="btn btn-sm btn-danger btn-lg text-white" id="btnLogout" onclick="signOut()" style="cursor: pointer; display: none;"><i class="fa fa-sign-out"></i> Sign Out</a>
</li>
</ul>
</div>
</div>
</nav>

<div class="content">

</div>

<!-- Button trigger modal -->
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#messagePrompt">
Launch demo modal
</button> -->

<!-- <button type="button" class="btn btn-primary" onclick="promptMessage('')">
Launch demo modal
</button> -->

<div class="modal fade" id="messagePrompt" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalScrollableTitle">Message</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>


<script src="./js/script.js"></script>
<script src="./js/todoList.js"></script>
<script src="./js/signup-signin.js"></script>
<script src="./js/googleSignIn.js"></script>
<script src="./js/googleCalendar.js"></script>
<script async defer src="https://apis.google.com/js/api.js"
onload="this.onload=function(){};handleClientLoad()"
onreadystatechange="if (this.readyState === 'complete') this.onload()"></script>

</body>
</html>
Loading