new project cards with modals!
This commit is contained in:
parent
99c911c5d4
commit
d33022ac09
7 changed files with 316 additions and 11 deletions
56
components/ProjectCardContent.vue
Normal file
56
components/ProjectCardContent.vue
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <button @click="$emit('close')"> Close </button> -->
|
||||
<img src="public\img\close.png" class="close-button" @click="$emit('close')">
|
||||
<h2>{{title}}</h2>
|
||||
<p>{{description}}</p>
|
||||
|
||||
<br>
|
||||
<!-- <ClientOnly> -->
|
||||
<div class="buttons">
|
||||
<SmallButton v-for="(data, i) of buttons" :key="i" class="button" :text="data.text"
|
||||
:href="data.link" />
|
||||
</div>
|
||||
<!-- </ClientOnly> -->
|
||||
<br>
|
||||
<p class="multiline-css-fix">{{longDescription}}</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {defineProps, defineEmits} from 'vue'
|
||||
|
||||
export interface ButtonData {
|
||||
text: string,
|
||||
link: string,
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
title: string,
|
||||
description: string,
|
||||
longDescription?: string,
|
||||
buttons?: Array<ButtonData>,
|
||||
}>();
|
||||
|
||||
defineEmits("close")
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.close-button{
|
||||
float:right;
|
||||
/* display: block; */
|
||||
/* margin-left: auto; */
|
||||
width: 32px;
|
||||
|
||||
&:hover{
|
||||
filter: invert();
|
||||
}
|
||||
}
|
||||
|
||||
.multiline-css-fix{
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue