Skip to content
Snippets Groups Projects
Select Git revision
  • 8937057f305f6f1dce8dac5464dfc4d73fe93538
  • main default protected
  • reserve-item-timeframe
  • fix-userprofile-image
  • filter
  • my_communities
  • deploy protected
7 results

ItemCard.vue

Blame
  • ItemCard.vue 1022 B
    <template>
      <!-- Item card, displays title, address, price per day and a picture -->
      <div class="mt-5 px-5">
        <div
          class="w-full h-full rounded bg-gray-100 ring-1 ring-gray-200 overflow-hidden display:inline-block correct-size cursor-pointer"
        >
          <div class="relative h-0 pb-[66.7%]">
            <img
              class="w-full h-full object-contain absolute"
              :src="item.img || require('../../assets/default-product.png')"
              alt="Item image"
            />
          </div>
          <div class="p-1 m-1 bottom-0">
            <p class="font-bold text-sm" id="title">{{ item.title }}</p>
            <p class="text-gray-700 text-xs" id="price">
              {{ item.pricePerDay }} kr
            </p>
            <p class="text-gray-700 text-xs font-bold" id="adress">
              {{ item.address }}
            </p>
          </div>
        </div>
      </div>
    </template>
    
    <script>
    export default {
      props: {
        item: {
          img: String,
          address: String,
          title: String,
          pricePerDay: Number,
        },
      },
    };
    </script>