From a415e75d1868a0e3f6b17b28efb13612d5351665 Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Wed, 29 May 2024 14:41:31 -0400 Subject: [PATCH] Improve markup for contributors Why these changes are being introduced: Authors are currently rendered within a `p` tag. This is not very semantically meaningful. Relevant ticket(s): * [GDT-284](https://mitlibraries.atlassian.net/browse/GDT-284) How this addresses that need: This refactors the contributors section to a partial and renders contributors as an unordered list. It is the same changeset that was introduced in #191, but without displaying the contributor type, which UXWS has deemed unnecessary at this time. Side effects of this change: None. --- app/assets/stylesheets/partials/_results.scss | 1 + app/assets/stylesheets/partials/_shared.scss | 11 ++++++++++- app/views/record/_record_geo.html.erb | 7 ++++--- app/views/search/_result.html.erb | 7 ++++--- app/views/search/_result_geo.html.erb | 7 ++++--- app/views/shared/_contributors.html.erb | 5 +++++ 6 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 app/views/shared/_contributors.html.erb diff --git a/app/assets/stylesheets/partials/_results.scss b/app/assets/stylesheets/partials/_results.scss index 080497cc..fe31c072 100644 --- a/app/assets/stylesheets/partials/_results.scss +++ b/app/assets/stylesheets/partials/_results.scss @@ -107,6 +107,7 @@ display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; + text-overflow: ellipsis; } .inner-heading { diff --git a/app/assets/stylesheets/partials/_shared.scss b/app/assets/stylesheets/partials/_shared.scss index 01ca5628..5957be41 100644 --- a/app/assets/stylesheets/partials/_shared.scss +++ b/app/assets/stylesheets/partials/_shared.scss @@ -1,9 +1,18 @@ .result, .full-record { - .authors { + .contributors { font-size: 1.6rem; font-weight: $fw-bold; margin-bottom: 0.6em; + li { + display: inline; + } + li::after { + content: " ; "; + } + li:last-child:after { + content: ""; + } } .data-info { diff --git a/app/views/record/_record_geo.html.erb b/app/views/record/_record_geo.html.erb index ee9e004e..aa247a62 100644 --- a/app/views/record/_record_geo.html.erb +++ b/app/views/record/_record_geo.html.erb @@ -14,9 +14,10 @@ <% if @record['contributors'].present? %> -
+ Contributors: +