Skip to content

Commit

Permalink
enhance(search): smaller "Explore all indicators" link
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber committed Apr 15, 2024
1 parent ea6bf0b commit 1457e36
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
13 changes: 9 additions & 4 deletions site/search/Search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
}

.search-results__explorer-hit-link-mobile {
@include body-3-medium;
@include owid-link-60;
margin-top: 16px;
display: block;
Expand Down Expand Up @@ -285,20 +286,24 @@
}

.search-results__explorer-hit-link {
@include owid-link-60;
margin-top: 0;
flex: 1 0 auto;
flex: 0 0 auto;
text-align: right;

a {
@include body-3-medium;
@include owid-link-60;
}
}
}

.search-results__explorer-views-list {
margin-left: 20px;
margin-top: 5px;
margin-top: 16px;
list-style: none;
gap: 16px;

.search-results__explorer-view {
margin-left: 24px;
overflow: hidden;

.search-results__explorer-view-title-container {
Expand Down
16 changes: 8 additions & 8 deletions site/search/SearchPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ function ExplorerHit({
href: `${BAKED_BASE_URL}/${EXPLORERS_ROUTE_FOLDER}/${groupedHit.explorerSlug}${queryStr}`,
"data-algolia-index": getIndexName(SearchIndexName.ExplorerViews),
"data-algolia-object-id": firstHit.objectID,
"data-algolia-position": firstHit.hitPositionOverall,
"data-algolia-card-position": cardPosition,
"data-algolia-position": firstHit.hitPositionOverall + 1,
"data-algolia-card-position": cardPosition + 1,
"data-algolia-position-within-card": 0,
"data-algolia-event-name": "click_explorer",
}
Expand All @@ -270,12 +270,12 @@ function ExplorerHit({
</p>
</div>

<a
className="search-results__explorer-hit-link hide-sm-only"
{...exploreAllProps}
>
Explore all {groupedHit.numViewsWithinExplorer} indicators
</a>
<div className="search-results__explorer-hit-link hide-sm-only">
<a {...exploreAllProps}>
Explore all {groupedHit.numViewsWithinExplorer}{" "}
indicators
</a>
</div>
</div>
<ul className="search-results__explorer-views-list grid grid-cols-2 grid-sm-cols-1">
{groupedHit.views.map((view) => {
Expand Down

0 comments on commit 1457e36

Please sign in to comment.