1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-23 11:08:22 +09:00
MisskeyIO/packages/frontend/src/components/MkNotePreview.vue

70 lines
1.1 KiB
Vue
Raw Normal View History

<template>
2023-01-15 11:22:58 +09:00
<div :class="$style.root">
2023-01-16 14:18:11 +09:00
<MkAvatar :class="$style.avatar" :user="$i" link preview/>
2023-01-15 11:22:58 +09:00
<div :class="$style.main">
<div :class="$style.header">
2023-02-08 20:07:19 +09:00
<MkUserName :user="$i"/>
</div>
2023-01-15 11:22:58 +09:00
<div>
<div :class="$style.content">
<Mfm :text="text.trim()" :author="$i" :i="$i"/>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { } from 'vue';
const props = defineProps<{
text: string;
}>();
</script>
2023-01-15 11:22:58 +09:00
<style lang="scss" module>
.root {
display: flex;
margin: 0;
padding: 0;
2022-07-13 21:41:06 +09:00
overflow: clip;
font-size: 0.95em;
2023-01-15 11:22:58 +09:00
}
2023-01-15 11:22:58 +09:00
.avatar {
flex-shrink: 0 !important;
display: block !important;
margin: 0 10px 0 0 !important;
width: 40px !important;
height: 40px !important;
border-radius: 8px !important;
pointer-events: none !important;
}
2023-01-15 11:22:58 +09:00
.main {
flex: 1;
min-width: 0;
}
2023-01-15 11:22:58 +09:00
.header {
margin-bottom: 2px;
font-weight: bold;
}
@container (min-width: 350px) {
2023-01-15 11:22:58 +09:00
.avatar {
margin: 0 10px 0 0 !important;
width: 44px !important;
height: 44px !important;
}
}
@container (min-width: 500px) {
2023-01-15 11:22:58 +09:00
.avatar {
margin: 0 12px 0 0 !important;
width: 48px !important;
height: 48px !important;
}
}
</style>