2020-08-18 15:44:21 +02:00
|
|
|
<template>
|
2020-10-24 18:21:41 +02:00
|
|
|
<MkA :to="`/channels/${channel.id}`" class="eftoefju _panel" tabindex="-1">
|
2020-10-30 21:53:02 +01:00
|
|
|
<div class="banner" :style="bannerStyle">
|
2020-08-18 15:44:21 +02:00
|
|
|
<div class="fade"></div>
|
2023-03-11 22:01:04 +01:00
|
|
|
<div class="name"><i class="ph-television ph-bold ph-lg"></i> {{ channel.name }}</div>
|
2020-08-18 15:44:21 +02:00
|
|
|
<div class="status">
|
2020-10-17 13:12:00 +02:00
|
|
|
<div>
|
2023-03-11 22:01:04 +01:00
|
|
|
<i class="ph-users ph-bold ph-lg ph-fw ph-lg"></i>
|
2022-01-28 03:39:49 +01:00
|
|
|
<I18n :src="i18n.ts._channel.usersCount" tag="span" style="margin-left: 4px;">
|
2020-10-17 13:12:00 +02:00
|
|
|
<template #n>
|
|
|
|
<b>{{ channel.usersCount }}</b>
|
|
|
|
</template>
|
2020-12-26 02:01:32 +01:00
|
|
|
</I18n>
|
2020-10-17 13:12:00 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-03-11 22:01:04 +01:00
|
|
|
<i class="ph-pencil ph-bold ph-lg ph-fw ph-lg"></i>
|
2022-01-28 03:39:49 +01:00
|
|
|
<I18n :src="i18n.ts._channel.notesCount" tag="span" style="margin-left: 4px;">
|
2020-10-17 13:12:00 +02:00
|
|
|
<template #n>
|
|
|
|
<b>{{ channel.notesCount }}</b>
|
|
|
|
</template>
|
2020-12-26 02:01:32 +01:00
|
|
|
</I18n>
|
2020-10-17 13:12:00 +02:00
|
|
|
</div>
|
2020-08-18 15:44:21 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<article v-if="channel.description">
|
|
|
|
<p :title="channel.description">{{ channel.description.length > 85 ? channel.description.slice(0, 85) + '…' : channel.description }}</p>
|
|
|
|
</article>
|
|
|
|
<footer>
|
2020-10-17 13:12:00 +02:00
|
|
|
<span v-if="channel.lastNotedAt">
|
2022-01-28 03:39:49 +01:00
|
|
|
{{ i18n.ts.updatedAt }}: <MkTime :time="channel.lastNotedAt"/>
|
2020-08-18 15:44:21 +02:00
|
|
|
</span>
|
|
|
|
</footer>
|
2020-10-24 18:21:41 +02:00
|
|
|
</MkA>
|
2020-08-18 15:44:21 +02:00
|
|
|
</template>
|
|
|
|
|
2022-01-10 16:05:18 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { computed } from 'vue';
|
|
|
|
import { i18n } from '@/i18n';
|
2020-08-18 15:44:21 +02:00
|
|
|
|
2022-01-10 16:05:18 +01:00
|
|
|
const props = defineProps<{
|
|
|
|
channel: Record<string, any>;
|
|
|
|
}>();
|
2020-08-18 15:44:21 +02:00
|
|
|
|
2022-01-10 16:05:18 +01:00
|
|
|
const bannerStyle = computed(() => {
|
|
|
|
if (props.channel.bannerUrl) {
|
|
|
|
return { backgroundImage: `url(${props.channel.bannerUrl})` };
|
|
|
|
} else {
|
|
|
|
return { backgroundColor: '#4c5e6d' };
|
|
|
|
}
|
2020-08-18 15:44:21 +02:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.eftoefju {
|
|
|
|
display: block;
|
2021-03-02 14:57:16 +01:00
|
|
|
overflow: hidden;
|
2020-08-18 15:44:21 +02:00
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .banner {
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
height: 200px;
|
|
|
|
background-position: center;
|
|
|
|
background-size: cover;
|
|
|
|
|
|
|
|
> .fade {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 64px;
|
|
|
|
background: linear-gradient(0deg, var(--panel), var(--X15));
|
|
|
|
}
|
|
|
|
|
|
|
|
> .name {
|
|
|
|
position: absolute;
|
|
|
|
top: 16px;
|
|
|
|
left: 16px;
|
|
|
|
padding: 12px 16px;
|
2022-11-23 06:58:09 +01:00
|
|
|
-webkit-backdrop-filter: var(--blur, blur(8px));
|
|
|
|
backdrop-filter: var(--blur, blur(8px));
|
|
|
|
background: rgba(0, 0, 0, 0.2);
|
2020-08-18 15:44:21 +02:00
|
|
|
color: #fff;
|
|
|
|
font-size: 1.2em;
|
2022-11-23 06:58:09 +01:00
|
|
|
border-radius: 999px;
|
2020-08-18 15:44:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
> .status {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
bottom: 16px;
|
|
|
|
right: 16px;
|
|
|
|
padding: 8px 12px;
|
|
|
|
font-size: 80%;
|
2022-11-23 06:58:09 +01:00
|
|
|
-webkit-backdrop-filter: var(--blur, blur(8px));
|
|
|
|
backdrop-filter: var(--blur, blur(8px));
|
|
|
|
background: rgba(0, 0, 0, 0.2);
|
2020-08-18 15:44:21 +02:00
|
|
|
border-radius: 6px;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> article {
|
|
|
|
padding: 16px;
|
|
|
|
|
|
|
|
> p {
|
|
|
|
margin: 0;
|
|
|
|
font-size: 1em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> footer {
|
|
|
|
padding: 12px 16px;
|
2021-04-10 05:40:50 +02:00
|
|
|
border-top: solid 0.5px var(--divider);
|
2020-08-18 15:44:21 +02:00
|
|
|
|
|
|
|
> span {
|
|
|
|
opacity: 0.7;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 550px) {
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
|
|
|
> .banner {
|
|
|
|
height: 80px;
|
|
|
|
|
|
|
|
> .status {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> article {
|
|
|
|
padding: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> footer {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 500px) {
|
|
|
|
font-size: 0.8em;
|
|
|
|
|
|
|
|
> .banner {
|
|
|
|
height: 70px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> article {
|
|
|
|
padding: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|