diff --git a/apiserver/search.py b/apiserver/search.py
index 62db610..3f28f75 100644
--- a/apiserver/search.py
+++ b/apiserver/search.py
@@ -67,9 +67,9 @@ def put_story(story):
logging.error('Problem putting MeiliSearch story: {}'.format(str(e)))
return False
-def search(q):
+def search(q, skip=0, limit=250):
try:
- params = dict(q=q, limit=250)
+ params = dict(q=q, skip=skip, limit=limit)
r = requests.get(MEILI_URL + 'indexes/qotnews/search', params=params, timeout=2)
if r.status_code != 200:
raise Exception('Bad response code ' + str(r.status_code))
diff --git a/apiserver/server.py b/apiserver/server.py
index 29e2c45..ba98f30 100644
--- a/apiserver/server.py
+++ b/apiserver/server.py
@@ -51,8 +51,10 @@ def api():
@flask_app.route('/api/search', strict_slashes=False)
def apisearch():
q = request.args.get('q', '')
+ skip = request.args.get('skip', 0)
+ limit = request.args.get('limit', 20)
if len(q) >= 3:
- results = search.search(q)
+ results = search.search(q, skip=skip, limit=limit)
else:
results = []
return dict(results=results)
diff --git a/webapp/src/components/Comment.svelte b/webapp/src/components/Comment.svelte
index b343949..55c15ef 100644
--- a/webapp/src/components/Comment.svelte
+++ b/webapp/src/components/Comment.svelte
@@ -54,10 +54,6 @@
overflow: hidden;
color: #888;
}
- .comment-text.is-collapsed::after {
- content: "...";
- font-style: italic;
- }
.comment-children {
margin-left: 0.5rem;
padding-left: 0.5rem;
@@ -85,14 +81,15 @@
diff --git a/webapp/src/components/StoryInfo.svelte b/webapp/src/components/StoryInfo.svelte
index 63e41f2..9f2f186 100644
--- a/webapp/src/components/StoryInfo.svelte
+++ b/webapp/src/components/StoryInfo.svelte
@@ -11,7 +11,7 @@
on
{story.source}
{#if story.score}• {story.score} points{/if}
-{#if story.num_comments}
+{#if Number(story.num_comments)}
•
{story.num_comments}
comments
diff --git a/webapp/src/routes/[id].svelte b/webapp/src/routes/[id].svelte
index 30c71a7..957e463 100644
--- a/webapp/src/routes/[id].svelte
+++ b/webapp/src/routes/[id].svelte
@@ -18,8 +18,10 @@
export let story;
export let related;
- let others = related.filter((r) => r.id !== story.id && r.num_comments);
- let hasComments = related.some((r) => r.num_comments);
+ let others = related.filter(
+ (r) => r.id !== story.id && Number(r.num_comments)
+ );
+ let hasComments = related.some((r) => Number(r.num_comments));