mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 06:55:06 -04:00
62 lines
1.1 KiB
Vue
62 lines
1.1 KiB
Vue
![]() |
<template>
|
||
|
<n-card class="colored-card">
|
||
|
<n-space justify="space-between" align="center">
|
||
|
<n-icon class="icon" size="40" :component="icon" />
|
||
|
</n-space>
|
||
|
<n-h3 class="title">
|
||
|
<n-ellipsis>{{ title }}</n-ellipsis>
|
||
|
</n-h3>
|
||
|
|
||
|
<div class="description">
|
||
|
<n-ellipsis :line-clamp="2" :tooltip="false">
|
||
|
<slot />
|
||
|
</n-ellipsis>
|
||
|
</div>
|
||
|
</n-card>
|
||
|
</template>
|
||
|
|
||
|
<script setup lang="ts">
|
||
|
import { toRefs, type Component } from 'vue';
|
||
|
|
||
|
const props = defineProps<{ icon: Component; title: string }>();
|
||
|
const { icon, title } = toRefs(props);
|
||
|
</script>
|
||
|
|
||
|
<style lang="less" scoped>
|
||
|
.colored-card {
|
||
|
background: rgb(37, 99, 108);
|
||
|
background: linear-gradient(48deg, rgba(37, 99, 108, 1) 0%, rgba(59, 149, 111, 1) 60%, rgba(20, 160, 88, 1) 100%);
|
||
|
color: #fff;
|
||
|
|
||
|
&:hover {
|
||
|
border-color: var(--n-color-target);
|
||
|
}
|
||
|
|
||
|
.icon {
|
||
|
opacity: 0.7;
|
||
|
}
|
||
|
|
||
|
.title {
|
||
|
color: #fff;
|
||
|
|
||
|
margin: 5px 0;
|
||
|
}
|
||
|
|
||
|
.description {
|
||
|
opacity: 0.8;
|
||
|
|
||
|
margin: 5px 0;
|
||
|
|
||
|
::v-deep(a) {
|
||
|
color: inherit;
|
||
|
text-decoration: underline;
|
||
|
font-weight: bold;
|
||
|
|
||
|
&:hover {
|
||
|
color: rgb(20, 20, 20);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</style>
|