added in stock background

This commit is contained in:
Hazel Noack 2025-07-10 14:46:36 +02:00
parent 3c04714fec
commit f4bd2a69e4
2 changed files with 10 additions and 1 deletions

View File

@ -85,6 +85,15 @@ body {
padding: 1em; padding: 1em;
} }
#listings .card {
background-color: rgba(255, 0, 0, 0.5);
}
#listings .in-stock {
background-color: rgba(125, 255, 125, 0.5);
}
.card-image { .card-image {
width: 100%; width: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;

View File

@ -25,7 +25,7 @@
<div class="cards" id="listings"> <div class="cards" id="listings">
{{range $Listing := .Listings }} {{range $Listing := .Listings }}
<a target="_blank" href="{{ $Listing.Url }}" class="card"> <a target="_blank" href="{{ $Listing.Url }}" class="card {{ if $Listing.InStock }}in-stock{{ end }}">
<h3>{{ $Listing.ProductName }}</h3> <h3>{{ $Listing.ProductName }}</h3>
<p>{{ $Listing.StoreName }} - {{ $Listing.Price }}</p> <p>{{ $Listing.StoreName }} - {{ $Listing.Price }}</p>
</a> </a>