Skip to content

Commit

Permalink
feat: game cover sizing and hover
Browse files Browse the repository at this point in the history
  • Loading branch information
tothlp committed Jun 24, 2024
1 parent 735a4ff commit f27a3b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
gap: 16px; /* adjust as needed */
}

@media screen and (max-width: 1230px) {
.grid-container {
grid-template-columns: repeat(2, 1fr); /* Display 2 items per row on smaller screens */
}
}

.grid-item {
background-color: #1f1f1f; /* adjust as needed */
background-size: cover;
Expand Down Expand Up @@ -48,7 +54,9 @@
}


.grid-item:hover .overlay {
.grid-item:hover .overlay,
.grid-item:focus .overlay,
.grid-item:active .overlay {
opacity: 1;
}

Expand Down
2 changes: 1 addition & 1 deletion pages/Games.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ format: list

<div class="grid-container">
{% for game in year.items %}
<div class="grid-item" style="background-image: url('{{'/assets/img/covers/' | append: game.cover | relative_url }}');">
<div class="grid-item" style="background-image: url('{{'/assets/img/covers/' | append: game.cover | relative_url }}');" tabindex="0">
<!-- <img src="{{'/assets/img/covers/' | append: game.cover | relative_url }}" alt="{{game.cover}}"> -->
<div class="overlay">
<p class="item-title">{{ game.title }} </p>
Expand Down

0 comments on commit f27a3b3

Please sign in to comment.