Skip to content

Commit

Permalink
enhance: explorer tile touchups (#4220)
Browse files Browse the repository at this point in the history
* enhance: add background color to explorer tiles

for when the webp image cannot be loaded (e.g. in Safari 13)

* enhance: add background to explorer tile icons
  • Loading branch information
marcelgerber authored Nov 26, 2024
1 parent 4998e3c commit 5edb37a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions site/gdocs/components/ExplorerTiles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}
}
.explorer-tile {
background-color: $oxford-blue; // show this if the webp image cannot be loaded
background-image: url("https://ourworldindata.org/explorer-thumbnail.webp");
background-size: cover;
background-position: center;
Expand Down
1 change: 1 addition & 0 deletions site/gdocs/components/ExplorerTiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function ExplorerTile({ url }: { url: string }) {
}
const icon = linkedChart.tags[0] ? (
<img
className="explorer-tile__icon"
height={40}
width={40}
src={`${BAKED_BASE_URL}/images/tag-icons/${encodeURIComponent(
Expand Down

0 comments on commit 5edb37a

Please sign in to comment.