2021-04-24 06:38:24 -07:00
|
|
|
<template>
|
|
|
|
<MkA :to="`/gallery/${post.id}`" class="ttasepnz _panel" tabindex="-1">
|
|
|
|
<div class="thumbnail">
|
|
|
|
<ImgWithBlurhash class="img" :src="post.files[0].thumbnailUrl" :hash="post.files[0].blurhash"/>
|
|
|
|
</div>
|
|
|
|
<article>
|
|
|
|
<header>
|
|
|
|
<MkAvatar :user="post.user" class="avatar"/>
|
|
|
|
</header>
|
|
|
|
<footer>
|
|
|
|
<span class="title">{{ post.title }}</span>
|
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
</MkA>
|
|
|
|
</template>
|
|
|
|
|
2022-08-31 07:12:22 -07:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2021-11-11 09:02:25 -08:00
|
|
|
import { userName } from '@/filters/user';
|
2022-08-30 08:24:33 -07:00
|
|
|
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
2021-11-11 09:02:25 -08:00
|
|
|
import * as os from '@/os';
|
2021-04-24 06:38:24 -07:00
|
|
|
|
2022-08-31 07:12:22 -07:00
|
|
|
const props = defineProps<{
|
|
|
|
post: any;
|
|
|
|
}>();
|
2021-04-24 06:38:24 -07:00
|
|
|
</script>
|
|
|
|
|
2022-12-27 01:01:06 -08:00
|
|
|
<style lang="scss">
|
2021-04-24 06:38:24 -07:00
|
|
|
.ttasepnz {
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
height: 200px;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
color: var(--accent);
|
|
|
|
|
|
|
|
> .thumbnail {
|
|
|
|
transform: scale(1.1);
|
|
|
|
}
|
|
|
|
|
|
|
|
> article {
|
|
|
|
> footer {
|
|
|
|
&:before {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .thumbnail {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
transition: all 0.5s ease;
|
|
|
|
|
|
|
|
> .img {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
object-fit: cover;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> article {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
> header {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
padding: 12px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
margin-left: auto;
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> footer {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
padding: 16px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: #fff;
|
|
|
|
text-shadow: 0 0 8px #000;
|
|
|
|
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
z-index: -1;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: linear-gradient(rgba(0, 0, 0, 0.4), transparent);
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity 0.5s ease;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .title {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|