2022-08-08 17:49:35 -04:00
|
|
|
<script setup lang="ts">
|
|
|
|
import type { Color } from "csstype";
|
|
|
|
|
|
|
|
const { href, color = "pink" } = defineProps<{
|
|
|
|
href?: string;
|
|
|
|
color?: Color;
|
|
|
|
title?: string;
|
|
|
|
}>();
|
|
|
|
</script>
|
2022-07-22 16:08:55 -04:00
|
|
|
|
2022-07-22 15:32:00 -04:00
|
|
|
<template>
|
2022-08-08 17:49:35 -04:00
|
|
|
<a class="no-underline" :href="href">
|
|
|
|
<div class="container box">
|
|
|
|
<p class="m-0 w-full title">{{ title }}</p>
|
2022-08-08 18:41:29 -04:00
|
|
|
<div class="main-content">
|
|
|
|
<slot />
|
|
|
|
</div>
|
2022-08-08 17:49:35 -04:00
|
|
|
</div>
|
|
|
|
</a>
|
2022-07-22 15:32:00 -04:00
|
|
|
</template>
|
2022-07-22 16:08:55 -04:00
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.container {
|
2022-08-08 17:49:35 -04:00
|
|
|
/* make sure width is good for fullscreen 1080p,
|
|
|
|
* fullscreen 1080p at 1.25 scaling,
|
|
|
|
* mobile
|
|
|
|
*/
|
|
|
|
width: 28rem;
|
|
|
|
border: 0.5rem solid v-bind(color);
|
|
|
|
border-radius: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.main-content {
|
|
|
|
padding: 1rem;
|
|
|
|
padding-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
background: v-bind(color);
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 600px) {
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2022-07-22 16:08:55 -04:00
|
|
|
}
|
|
|
|
</style>
|