slidev-theme-narduin/layouts/title-image.vue

36 lines
619 B
Vue
Raw Normal View History

2024-12-13 14:30:22 +01:00
<script setup lang="ts">
import { imageSrc } from '../utils/imageHelper'
const props = defineProps({
image: {
type: String,
required: true
}
})
const image = imageSrc(props.image)
</script>
<template>
<div class="slidev-layout h-full title">
2024-12-17 22:50:34 +01:00
<div class="grid h-full gap-4">
2024-12-13 14:30:22 +01:00
<div class="place-self-center">
<slot />
</div>
<div class="image"></div>
</div>
</div>
</template>
<style scoped>
2024-12-17 22:50:34 +01:00
.grid {
grid-template-columns: 3fr 2fr;
}
2024-12-13 14:30:22 +01:00
.image {
block-size: 100%;
background-image: v-bind(image);
background-size: cover;
background-position: center;
}
</style>