added listings

This commit is contained in:
Hazel Noack 2025-07-10 14:40:26 +02:00
parent 089b9ba218
commit 3c04714fec
2 changed files with 15 additions and 2 deletions

View File

@ -59,7 +59,7 @@ body {
} }
} }
.store-cards { .cards {
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
@ -70,6 +70,10 @@ body {
overflow: auto; overflow: auto;
} }
#stores {
display: none;
}
.card { .card {
background-color: rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.5);
width: 10em; width: 10em;

View File

@ -15,13 +15,22 @@
</div> </div>
<input name="{{ .SearchInputName }}" type="text" class="grid-item" class="search" placeholder="{{ .SearchPlaceholder }}" /> <input name="{{ .SearchInputName }}" type="text" class="grid-item" class="search" placeholder="{{ .SearchPlaceholder }}" />
<div class="store-cards"> <div class="cards" id="stores">
{{range $Store := .Stores }} {{range $Store := .Stores }}
<a target="_blank" href="{{ $Store.Url }}" class="card"> <a target="_blank" href="{{ $Store.Url }}" class="card">
<h3>{{ $Store.Name }}</h3> <h3>{{ $Store.Name }}</h3>
</a> </a>
{{- end }} {{- end }}
</div> </div>
<div class="cards" id="listings">
{{range $Listing := .Listings }}
<a target="_blank" href="{{ $Listing.Url }}" class="card">
<h3>{{ $Listing.ProductName }}</h3>
<p>{{ $Listing.StoreName }} - {{ $Listing.Price }}</p>
</a>
{{- end }}
</div>
</form> </form>
<script> <script>