An error occurred while loading the file. Please try again.
BauCard.vue 1.02 KiB
<template>
  <RouterLink :to="`/buildings/${buildingId}`" class="bau-card">
    <div class="card-background" :style="{ backgroundImage: `url(${image})` }"></div>
    <div class="card-content">
      <h3>{{ title }}</h3>
      <p>{{ description }}</p>
    </div>
  </RouterLink>
</template>

<script setup lang="ts">
defineProps<{
  title: string
  description: string
  image: string
  buildingId: string
}>()
</script>

<style scoped>
.bau-card {
  display: block;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.bau-card:hover {
  transform: translateY(-4px);
}

.card-background {
  height: 130px;
  background-size: cover;
  background-position: center;
  background-color: #e0e0e0;
}

.card-content {
  padding: 1rem;
}

.card-content h3 {
  margin: 0;
  color: darkred;
}

.card-content p {
  margin: 0.3rem 0 0;
  color: #555;
  font-size: 0.9rem;
}
</style>