From 1adee71dbd7936f75a8f11ad9ceb1d7c42191694 Mon Sep 17 00:00:00 2001 From: dropforge <> Date: Tue, 13 Feb 2024 16:58:05 +0100 Subject: [PATCH] feat: add date next to search result headlines Shows the localized date on the right for search results. --- myhpi/search/templates/search/search_result.html | 9 +++++++-- myhpi/static/scss/myHPI.scss | 11 ++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/myhpi/search/templates/search/search_result.html b/myhpi/search/templates/search/search_result.html index 1519e888..7f5f1dc1 100644 --- a/myhpi/search/templates/search/search_result.html +++ b/myhpi/search/templates/search/search_result.html @@ -3,7 +3,12 @@
-
{{ result.title }}
+
+
{{ result.title }}
+ +
{% if result.search_description %} {{ result.search_description }} @@ -12,4 +17,4 @@
{{ result.title }}
{% endif %}
-
\ No newline at end of file + diff --git a/myhpi/static/scss/myHPI.scss b/myhpi/static/scss/myHPI.scss index 29a64017..3d5c6e98 100644 --- a/myhpi/static/scss/myHPI.scss +++ b/myhpi/static/scss/myHPI.scss @@ -170,6 +170,15 @@ h1.toc-title::after { margin: -0.5rem -0.8rem; .search-result { + hgroup { + display: flex; + justify-content: space-between; + + h5 { + hyphens: auto; + } + } + transition: all 0.25s; padding: 0.5rem 0.8rem; @@ -275,4 +284,4 @@ h1.toc-title::after { margin-top: 50px; order: 3; } -} \ No newline at end of file +}