Skip to content

Commit 19add4e

Browse files
committed
updated readme.md
1 parent bd16f28 commit 19add4e

File tree

9 files changed

+49
-59
lines changed

9 files changed

+49
-59
lines changed

todolist/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ node app.js
4343

4444
<h3>ScreenShots</h3>
4545
<br>
46-
![main](images/main.PNG)
47-
![work](images/work.PNG)
46+
<img src="images\main.PNG"/>
47+
<img src="images/work.PNG"/>

todolist/app.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,26 @@ const app = express();
88

99
app.set('view engine', 'ejs');
1010

11-
app.use(bodyParser.urlencoded({extended: true}));
11+
app.use(bodyParser.urlencoded({
12+
extended: true
13+
}));
1214
app.use(express.static("public"));
1315

1416
const items = [];
1517
const workItems = [];
1618

1719
app.get("/", function(req, res) {
1820

19-
const day = date.getDate();
21+
const day = date.getDate();
2022

21-
res.render("list", {listTitle: day, newListItems: items});
23+
res.render("list", {
24+
listTitle: day,
25+
newListItems: items
26+
});
2227

2328
});
2429

25-
app.post("/", function(req, res){
30+
app.post("/", function(req, res) {
2631

2732
const item = req.body.newItem;
2833

@@ -35,11 +40,14 @@ app.post("/", function(req, res){
3540
}
3641
});
3742

38-
app.get("/work", function(req,res){
39-
res.render("list", {listTitle: "Work List", newListItems: workItems});
43+
app.get("/work", function(req, res) {
44+
res.render("list", {
45+
listTitle: "Work List",
46+
newListItems: workItems
47+
});
4048
});
4149

42-
app.get("/about", function(req, res){
50+
app.get("/about", function(req, res) {
4351
res.render("about");
4452
});
4553

todolist/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.getDate = function() {
1414

1515
};
1616

17-
exports.getDay = function () {
17+
exports.getDay = function() {
1818

1919
const today = new Date();
2020

todolist/index.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<!DOCTYPE html>
22
<html lang="en" dir="ltr">
3-
<head>
4-
<meta charset="utf-8">
5-
<title>To Do List</title>
6-
</head>
7-
<body>
8-
<h1>It's a weekday!</h1>
9-
<p>Why are you not working!</p>
103

4+
<head>
5+
<meta charset="utf-8">
6+
<title>To Do List</title>
7+
</head>
8+
9+
<body>
10+
<h1>It's a weekday!</h1>
11+
<p>Why are you not working!</p>
12+
</body>
1113

12-
</body>
1314
</html>

todolist/public/css/styles.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ h1 {
1818
}
1919

2020
#heading {
21-
background-color:rgb(72,156,193);
21+
background-color: rgb(72, 156, 193);
2222
text-align: center;
2323
}
2424

@@ -35,7 +35,7 @@ h1 {
3535

3636
input:checked+p {
3737
text-decoration: line-through;
38-
text-decoration-color: rgb(72,156,193);
38+
text-decoration-color: rgb(72, 156, 193);
3939
}
4040

4141
input[type="checkbox"] {
@@ -60,7 +60,7 @@ button {
6060
width: 50px;
6161
border-radius: 50%;
6262
border-color: transparent;
63-
background-color: rgb(72,156,193);
63+
background-color: rgb(72, 156, 193);
6464
color: #fff;
6565
font-size: 30px;
6666
padding-bottom: 6px;
@@ -80,7 +80,7 @@ input[type="text"] {
8080

8181
input[type="text"]:focus {
8282
outline: none;
83-
box-shadow: inset 0 -3px 0 0 rgb(72,156,193);
83+
box-shadow: inset 0 -3px 0 0 rgb(72, 156, 193);
8484
}
8585

8686
::placeholder {

todolist/views/about.ejs

Lines changed: 0 additions & 7 deletions
This file was deleted.

todolist/views/footer.ejs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1-
2-
3-
</body>
4-
5-
<footer>
6-
7-
</footer>
8-
1+
</body>
92
</html>

todolist/views/header.ejs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<!DOCTYPE html>
22
<html lang="en" dir="ltr">
3-
4-
<head>
3+
<head>
54
<meta charset="utf-8">
65
<title>To Do List</title>
76
<link rel="stylesheet" href="css/styles.css">
8-
</head>
9-
7+
</head>
108
<body>

todolist/views/list.ejs

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
<%- include("header") -%>
2+
<div class="box" id="heading">
3+
<h1> <%= listTitle %> </h1>
4+
</div>
25

3-
<div class="box" id="heading">
4-
<h1> <%= listTitle %> </h1>
5-
</div>
6-
7-
<div class="box">
8-
<% for (let i=0; i<newListItems.length; i++) { %>
9-
<div class="item">
10-
<input type="checkbox">
11-
<p><%= newListItems[i] %></p>
12-
</div>
13-
<% } %>
14-
15-
<form class="item" action="/" method="post">
16-
<input type="text" name="newItem" placeholder="New Item" autocomplete="off">
17-
<button type="submit" name="list">+</button>
18-
</form>
19-
</div>
20-
6+
<div class="box">
7+
<% for (let i=0; i<newListItems.length; i++) { %>
8+
<div class="item">
9+
<input type="checkbox">
10+
<p><%= newListItems[i] %></p>
11+
</div>
12+
<% } %>
13+
<form class="item" action="/" method="post">
14+
<input type="text" name="newItem" placeholder="New Item" autocomplete="off">
15+
<button type="submit" name="list">+</button>
16+
</form>
17+
</div>
2118
<%- include("footer") -%>

0 commit comments

Comments
 (0)