From 78a0be9e9814af9b8a14b0fa429d82a04beee918 Mon Sep 17 00:00:00 2001 From: wes Date: Wed, 10 May 2017 13:18:32 -0400 Subject: [PATCH] remove commenting feature --- src/comment.py | 28 ---------- src/posts.py | 4 -- src/scripts/blog.tag | 8 +++ src/scripts/comment.tag | 17 ------ src/scripts/comments.tag | 113 --------------------------------------- src/scripts/post.tag | 2 - src/scripts/riotblog.js | 2 - src/styles/riotblog.scss | 50 ----------------- src/website.py | 10 ---- 9 files changed, 8 insertions(+), 226 deletions(-) delete mode 100644 src/comment.py create mode 100644 src/scripts/blog.tag delete mode 100644 src/scripts/comment.tag delete mode 100644 src/scripts/comments.tag diff --git a/src/comment.py b/src/comment.py deleted file mode 100644 index 22c5d6d..0000000 --- a/src/comment.py +++ /dev/null @@ -1,28 +0,0 @@ -from json import dumps -from time import time -from uuid import uuid4 - -def comment(author, title, text, t, uid): - return { - "time" : t, - "id" : uid, - "title" : title, - "author" : author, - "text" : text - } - - -testcomments = { - 1 : dumps( - [ - comment("Person 1", "Two", "A Comment here", 1, str(uuid4())), - comment("Person 2", "One", "Some other comment", 2, str(uuid4())), - comment("Person 3", "Three", "My opinion is correct", 3, str(uuid4())) - ]), - 2 : dumps( - [ - comment("Person 1", "Two", "A cool terrible Comment here", 1, str(uuid4())), - comment("Person 2", "One", "Some other awful comment", 2, str(uuid4())), - comment("Person 3", "Three", "My opinion is not correct", 3, str(uuid4())) - ]) - } diff --git a/src/posts.py b/src/posts.py index 51ac618..9cfa349 100644 --- a/src/posts.py +++ b/src/posts.py @@ -3,7 +3,6 @@ import couchdb from flask import jsonify from flask_marshmallow import Marshmallow -#from comment import comment class Posts: def __init__(self, host=None, port=None): @@ -27,6 +26,3 @@ class Posts: def getposts(self, limit, start): result = self.db.iterview("blogPosts/blog-posts", 10, include_docs=True, limit=limit, skip=start) return jsonify(list(result)) - - def getcomments(self, postID): - return jsonify([]) diff --git a/src/scripts/blog.tag b/src/scripts/blog.tag new file mode 100644 index 0000000..8dc006c --- /dev/null +++ b/src/scripts/blog.tag @@ -0,0 +1,8 @@ + + + + diff --git a/src/scripts/comment.tag b/src/scripts/comment.tag deleted file mode 100644 index 72507f9..0000000 --- a/src/scripts/comment.tag +++ /dev/null @@ -1,17 +0,0 @@ - -
-
-
-

Comment posted by {author}

-
-
- { text } -
- -
-
- -
diff --git a/src/scripts/comments.tag b/src/scripts/comments.tag deleted file mode 100644 index 7381283..0000000 --- a/src/scripts/comments.tag +++ /dev/null @@ -1,113 +0,0 @@ - -
- - - -
- - Your comment is too long! -
- -
diff --git a/src/scripts/post.tag b/src/scripts/post.tag index 1c85f51..fb2a4b4 100644 --- a/src/scripts/post.tag +++ b/src/scripts/post.tag @@ -24,8 +24,6 @@ { this.content }

- -