Skip to content

Commit

Permalink
/blog added
Browse files Browse the repository at this point in the history
  • Loading branch information
gurusharan2 committed Apr 17, 2017
1 parent dcb9bc4 commit 28e9710
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 108 deletions.
239 changes: 146 additions & 93 deletions template.py

Large diffs are not rendered by default.

Binary file modified template.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/comment_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<input type="input" name="comment_edit" value="{{a.comment}}">
<input type="submit" name="submit" label="submit">
</form>
<a class ="btn btn-default" href="/">cancel</a>
<a class ="btn btn-default" href="/blog">cancel</a>
</body>
</html>
18 changes: 9 additions & 9 deletions templates/front.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
<h1><center>my blog</center></h1>
</div>
<div class="row">
<div class="col-md-3 addnew"><a href="/Newpage"><h3>add a new post</h3></a></div>
<div class="col-md-3 addnew"><a href="/blog/Newpage"><h3>add a new post</h3></a></div>
<div class="col-md-5"></div>
<div class="col-md-2"><a href="/{{ login }}"><h3 class= "login">{{ login }}</h3></a></div>
<div class="col-md-2"><a href="/signup"><h3 class="right">sign up</h3></a></div>
<div class="col-md-2"><a href="/blog/{{ login }}"><h3 class= "login">{{ login }}</h3></a></div>
<div class="col-md-2"><a href="/blog/signup"><h3 class="right">sign up</h3></a></div>
</div>


Expand All @@ -50,12 +50,12 @@ <h3>{{ i.title }}</h3>
<p>{{ i.post | safe}}</p>
<p>likes: {{ i.likes }}</p>
<div>
<a class="btn btn-default" href="/like/{{i.key().id()}}" role="button">like</a><br>
<a class = "btn btn-default" href="/Post_edit/{{i.key().id()}}" role="button">edit post</a>
<a class = "btn btn-default" href="/Post/{{i.key().id()}}" role="button"> delete post</a>
<a class="btn btn-default" href="/blog/like/{{i.key().id()}}" role="button">like</a><br>
<a class = "btn btn-default" href="/blog/Post_edit/{{i.key().id()}}" role="button">edit post</a>
<a class = "btn btn-default" href="/blog/Post/{{i.key().id()}}" role="button"> delete post</a>
</div>
<br>
<form method="post" id="comment_form" action="/comment/{{i.key().id()}}">
<form method="post" id="comment_form" action="/blog/comment/{{i.key().id()}}">
<div class="row margin-top">
<textarea name="comment_textarea">
</textarea>
Expand All @@ -75,8 +75,8 @@ <h2>comments</h2>
{% if i.key().id() == j.post_id %}
<p>{{ j.comment }}</p>
<p>posted by - {{j.posted_by}}</p>
<a class = "btn btn-default" href="/comment_edit/{{j.key().id()}}" role="button">edit comment</a>
<a class = "btn btn-default" href="/delete/{{j.key().id()}}" role="button"> delete comment</a>
<a class = "btn btn-default" href="/blog/comment_edit/{{j.key().id()}}" role="button">edit comment</a>
<a class = "btn btn-default" href="/blog/delete/{{j.key().id()}}" role="button"> delete comment</a>
{% endif %}
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ <h1>login</h1>
<h2>{{ error }}</h2>
</div>
</form>
<h5><a href="/signup">not a user ?</a></h5>
<h5><a href="/blog/signup">not a user ?</a></h5>
</body>
</html>
4 changes: 2 additions & 2 deletions templates/permalink.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
}
</style>
<body>
<a href="/"><h1><center>my blog</center></h1></a>
<a href="/Newpage"><h3>add a new post</h3></a>
<a href="/blog"><h1><center>my blog</center></h1></a>
<a href="/blog/Newpage"><h3>add a new post</h3></a>

<div >
<hr>
Expand Down
13 changes: 13 additions & 0 deletions templates/post_edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method="post">
<input type="input" name="comment_edit" value="{{a.post}}">
<input type="submit" name="submit" label="submit">
</form>
<a class ="btn btn-default" href="/blog">cancel</a>
</body>
</html>
2 changes: 1 addition & 1 deletion templates/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1> sign up </h1>
</table>
<button>submit</button>
</form>
<h5><a href="/login">already a user ?</a></h5>
<h5><a href="/blog/login">already a user ?</a></h5>
</body>

</html>
2 changes: 1 addition & 1 deletion templates/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
</head>
<body>
<h1>welcome {{ username }}</h1>
<a href="/logout">logout</a>
<a href="/blog/logout">logout</a>
</body>
</html>

0 comments on commit 28e9710

Please sign in to comment.