🚸 Add text if there is no entry for selected day
- Overlay if substitutions / history view is still loading - Overlay if no substitution exists for current day - Overlay if no history exists for current day
This commit is contained in:
73
src/components/info-card.vue
Normal file
73
src/components/info-card.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
icon: {
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="info-card">
|
||||
<div class="content">
|
||||
<component :is="icon" class="icon" />
|
||||
<span class="title">{{ $t(title) }}</span>
|
||||
<span class="description">{{ $t(text) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.info-card {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
margin-top: 50px;
|
||||
width: max-content;
|
||||
height: 50vh;
|
||||
max-width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 3px;
|
||||
max-width: 400px;
|
||||
padding: 30px;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
stroke-width: 1px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
span {
|
||||
word-wrap: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span.title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
span.description {
|
||||
font-weight: 300;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user