Skip to content

Commit 666e99a

Browse files
Added views folder
1 parent 0405483 commit 666e99a

File tree

8 files changed

+98
-0
lines changed

8 files changed

+98
-0
lines changed

views/about.ejs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<%- include("partials/header"); -%>
2+
<h1>About</h1>
3+
<p> <%= aboutContent %> </p>
4+
<%- include("partials/footer"); -%>

views/compose.ejs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
<%- include("partials/header"); -%>
3+
<h1>Compose</h1>
4+
<form class="" action="/compose" method="post">
5+
<div class="form-group">
6+
<label>Title</label>
7+
<input class="form-control" type="text" name="postTitle">
8+
<label>Post</label>
9+
<textarea class="form-control" name="postBody" rows="5" cols="30"></textarea>
10+
</div>
11+
<button class="btn btn-primary" type="submit" name="button">Publish</button>
12+
</form>
13+
14+
<%- include("partials/footer"); -%>

views/contact.ejs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<%- include("partials/header"); -%>
2+
<h1>Contact</h1>
3+
<p> <%= contactContent %> </p>
4+
<%- include("partials/footer"); -%>

views/home.ejs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<%- include("partials/header"); -%>
2+
<h1>Home</h1>
3+
<p> <%= startingContent %> </p>
4+
5+
6+
<% posts.forEach(function(post){ %>
7+
8+
<h1><%=post.title%></h1>
9+
<p>
10+
<%=post.content.substring(0, 100) + " ..."%>
11+
<a href="/posts/<%=post.title%>">Read More</a>
12+
</p>
13+
14+
15+
<% }) %>
16+
17+
18+
<%- include("partials/footer"); -%>

views/partials/footer.ejs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
</div>
3+
<div class="footer-padding"></div>
4+
<div class="footer">
5+
<p>Made with ❤️ by The App Brewery</p>
6+
</div>
7+
</div>
8+
</body>
9+
</html>

views/partials/header.ejs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Daily Journal</title>
7+
<meta charset="utf-8">
8+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
9+
<link rel="stylesheet" href="/css/styles.css">
10+
<nav class="navbar navbar-default">
11+
<div class="container">
12+
<div class="navbar-header">
13+
<p class="navbar-brand">DAILY JOURNAL</p>
14+
</div>
15+
<ul class="nav navbar-nav navbar-right">
16+
<li id="home"><a href="/">HOME</a></li>
17+
<li id="about"><a href="/about">ABOUT US</a></li>
18+
<li id="contact"><a href="/contact">CONTACT US</a></li>
19+
</ul>
20+
</div>
21+
</nav>
22+
23+
<body>
24+
<div class="container">

views/post.ejs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
<%- include("partials/header"); -%>
3+
4+
5+
<h1><%=title%></h1>
6+
<p><%=content%></p>
7+
8+
9+
10+
<%- include("partials/footer"); -%>

views/test.ejs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<%- include("partials/header"); -%>
2+
<h1>Home</h1>
3+
<p> <%= startingContent %> </p>
4+
5+
6+
<% posts.forEach(function(post){ %>
7+
8+
<h1><%=post.title%></h1>
9+
<p>
10+
<%=post.content.substring(0, 100) + " ..."%>
11+
<a href="/posts/<%=post.title%>">Read More</a>
12+
</p>
13+
14+
15+
<% }) %>

0 commit comments

Comments
 (0)