Skip to content

Commit

Permalink
Update hover/no img designs for search results
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Aug 14, 2024
1 parent 5c2f4ea commit 2e0d564
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
3 changes: 0 additions & 3 deletions geniza/corpus/templates/corpus/snippets/document_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ <h3 class="sr-only">{% translate 'Tags' %}</h3>
{% endwith %}
{% endfor %}
</ul>
{% else %}
{# Translators: label for when no image thumbnail is available #}
<span class="no-image">{% translate 'No Image' %}</span>
{% endif %}
<dl class="pgp-metadata">
{# Translators: Date document was first added to the PGP #}
Expand Down
Binary file removed sitemedia/img/ui/all/all/no-image-square-lg.png
Binary file not shown.
2 changes: 2 additions & 0 deletions sitemedia/scss/base/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ $off-white: #f7f7f7;
--jts-logo: #231f20;
// tag background color
--tag-bg: rgba(86, 120, 86, 0.5);
--tag-bg-hover: rgba(86, 120, 86, 0.7);
// selected language background color
--selected-language: #f7f7f7;
// alert message border/text/background colors
Expand Down Expand Up @@ -161,6 +162,7 @@ $off-white: #f7f7f7;
--jts-logo: #f7f7f7;
// tag background color
--tag-bg: rgba(86, 120, 86, 0.5);
--tag-bg-hover: rgba(86, 120, 86, 0.7);
// selected language background color
--selected-language: #161616;
// alert message border/text/background colors
Expand Down
24 changes: 12 additions & 12 deletions sitemedia/scss/components/_results.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ section#document-list {
// single result
.search-result {
background-color: var(--background-light);
transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
padding: spacing.$spacing-md;
display: flex;
justify-content: center;
Expand Down Expand Up @@ -67,6 +68,8 @@ section#document-list {

// document titles
.title {
color: var(--on-background);
transition: color 0.15s ease-in-out;
position: relative;
border-bottom: 1px solid var(--searchresult-separator);
flex: 1 0 90%;
Expand Down Expand Up @@ -297,18 +300,6 @@ section#document-list {
}
}
}
span.no-image {
width: 250px;
height: 250px;
background-image: url("/static/img/ui/all/all/no-image-square-lg.png");
background-size: 250px;
font-weight: 600;
font-size: typography.$text-size-6xl;
margin-top: spacing.$spacing-sm;
@include breakpoints.for-tablet-landscape-up {
margin-top: 0;
}
}
/* use pseudo marker to get transcription line numbers from snippets */
.transcription li,
.translation li {
Expand Down Expand Up @@ -401,6 +392,15 @@ section#document-list {
}
}
}
&:hover {
background-color: var(--background-gray);
box-shadow: 0px 2px 6px 0px #00000040;
}
&:has(a.view-link:hover) {
.title {
color: var(--primary);
}
}
}

// "view document details" link
Expand Down
4 changes: 4 additions & 0 deletions sitemedia/scss/components/_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
text-transform: lowercase;
border-radius: 5px;
background-color: var(--tag-bg);
transition: background-color 0.15s ease-in-out;
&:hover {
background-color: var(--tag-bg-hover);
}
color: var(--on-background-light);
padding: 0 14px;
min-width: 34px; // 48px - 14px for mobile touch target
Expand Down

0 comments on commit 2e0d564

Please sign in to comment.