From 25ceb501413d17a272ecb603020509c0f1a409ed Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Tue, 23 Feb 2016 11:04:50 +0100 Subject: [PATCH] Rework search-results markup --- .../stylesheets/objects/_search-result.scss | 17 ++++++++++-- app/views/search/index.html.slim | 27 +++++++------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/app/assets/stylesheets/objects/_search-result.scss b/app/assets/stylesheets/objects/_search-result.scss index dafa78d..ff97374 100644 --- a/app/assets/stylesheets/objects/_search-result.scss +++ b/app/assets/stylesheets/objects/_search-result.scss @@ -1,4 +1,17 @@ .search-result { - border-bottom: 1px solid $table-border-color; - padding-bottom: 0.25em; + margin-bottom: 1.2em; +} + +.search-result article { + line-height: normal; +} + +.search-result h4 { + line-height: normal; + font-size: 1.2rem; + margin-bottom: 0.1rem; +} + +.search-result .metainfo { + font-size: 0.8rem; } diff --git a/app/views/search/index.html.slim b/app/views/search/index.html.slim index 1a947b2..ecf62fa 100644 --- a/app/views/search/index.html.slim +++ b/app/views/search/index.html.slim @@ -1,14 +1,6 @@ div = render 'search/form' - -- if false # params[:q].present? - .row - .small-4.columns - = facet_list(@paper_type_facets) - .small-4.columns.end - = facet_list(@originator_facets) - .clearfix - if params[:q].present? .left @@ -21,15 +13,16 @@ div ul.no-bullet#search_results - @papers.each do |doc| li.search-result - small = doc.paper_type - ' - small = doc.originator - ' - small = l doc.published_at.to_date - ' - small = doc._score - = link_to doc.url, target: '_blank' do - div = doc.name + article + h4 = link_to doc.name, doc.url, target: '_blank' + div.metainfo + span.paper_type = doc.paper_type + ' + span.originator = doc.originator + ' + span.published = l doc.published_at.to_date + ' + span.score = doc._score div = paginate @papers