deguapp/frontend/pages/home/home.php

21 lines
487 B
PHP
Raw Normal View History

2023-11-09 01:36:43 +01:00
<section class="card-wrapper f-center" style="">
<?php
for ($i=0; $i < 8; $i++) {
?>
2023-11-09 17:37:21 +01:00
<div class="card card-beer f-col">
<img width="200px" id="<?= $i ?>" src="https://live.staticflickr.com/65535/49818361653_351771faae_h.jpg" alt="beer image">
2023-11-09 01:36:43 +01:00
<h2>Beer Name</h2>
<p>12 Degree</p>
</div>
<?php
} ?>
2023-10-24 01:28:16 +02:00
2023-11-09 17:37:21 +01:00
<script>
qSA(".card-beer").forEach(el => {
el.addEventListener("click", (e) => {
window.location.href = "/beer/" + el.querySelector("img").id
})
});
</script>
2023-11-09 01:36:43 +01:00
</section>