From 914202e45bfe29ce24f55125d7fe786490345f4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C4=93teris=20Caune?= <cuu508@gmail.com>
Date: Mon, 22 Aug 2022 13:02:58 +0300
Subject: [PATCH] Tweak the search snippet size

---
 hc/front/views.py     | 2 +-
 static/css/search.css | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/hc/front/views.py b/hc/front/views.py
index 3ec53abe..bbdf9144 100644
--- a/hc/front/views.py
+++ b/hc/front/views.py
@@ -404,7 +404,7 @@ def docs_search(request):
         return render(request, "front/docs_search.html", ctx)
 
     query = """
-        SELECT slug, title, snippet(docs, 2, '<span>', '</span>', '&hellip;', 50)
+        SELECT slug, title, snippet(docs, 2, '<span>', '</span>', '&hellip;', 10)
         FROM docs
         WHERE docs MATCH ?
         ORDER BY bm25(docs, 2.0, 10.0, 1.0)
diff --git a/static/css/search.css b/static/css/search.css
index 6f4a9b58..6275e90c 100644
--- a/static/css/search.css
+++ b/static/css/search.css
@@ -16,6 +16,10 @@
     display: none;
 }
 
+#search-results li {
+    margin-bottom: 15px;
+}
+
 #search-results li span {
     background: #ffef82;
     border-radius: 2px;