2023-07-26 22:31:52 -07:00
|
|
|
<!--
|
2024-02-13 07:59:27 -08:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-26 22:31:52 -07:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2022-06-20 22:12:39 -07:00
|
|
|
<template>
|
|
|
|
<MkStickyContainer>
|
2022-06-20 01:38:49 -07:00
|
|
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
2024-03-18 02:21:27 -07:00
|
|
|
<MkSpacer :contentMax="800">
|
|
|
|
<Transition
|
|
|
|
:enterActiveClass="defaultStore.state.animation ? $style.fadeEnterActive : ''"
|
|
|
|
:leaveActiveClass="defaultStore.state.animation ? $style.fadeLeaveActive : ''"
|
|
|
|
:enterFromClass="defaultStore.state.animation ? $style.fadeEnterFrom : ''"
|
|
|
|
:leaveToClass="defaultStore.state.animation ? $style.fadeLeaveTo : ''"
|
2024-04-16 18:48:42 -07:00
|
|
|
mode="out-in"
|
2024-03-18 02:21:27 -07:00
|
|
|
>
|
|
|
|
<div v-if="page" :key="page.id" class="_gaps">
|
|
|
|
<div :class="$style.pageMain">
|
|
|
|
<div :class="$style.pageBanner">
|
|
|
|
<div :class="$style.pageBannerBgRoot">
|
|
|
|
<MkImgWithBlurhash
|
|
|
|
v-if="page.eyeCatchingImageId"
|
|
|
|
:class="$style.pageBannerBg"
|
|
|
|
:hash="page.eyeCatchingImage?.blurhash"
|
|
|
|
:cover="true"
|
|
|
|
:forceBlurhash="true"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
v-else-if="instance.backgroundImageUrl || instance.bannerUrl"
|
|
|
|
:class="[$style.pageBannerBg, $style.pageBannerBgFallback1]"
|
|
|
|
:src="getStaticImageUrl(instance.backgroundImageUrl ?? instance.bannerUrl!)"
|
|
|
|
/>
|
|
|
|
<div v-else :class="[$style.pageBannerBg, $style.pageBannerBgFallback2]"></div>
|
|
|
|
</div>
|
|
|
|
<div v-if="page.eyeCatchingImageId" :class="$style.pageBannerImage">
|
|
|
|
<MkMediaImage
|
|
|
|
:image="page.eyeCatchingImage!"
|
|
|
|
:cover="true"
|
|
|
|
:disableImageLink="true"
|
|
|
|
:class="$style.thumbnail"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div :class="$style.pageBannerTitle" class="_gaps_s">
|
|
|
|
<h1>{{ page.title || page.name }}</h1>
|
2024-04-16 18:48:42 -07:00
|
|
|
<div :class="$style.pageBannerTitleSub">
|
|
|
|
<div v-if="page.user" :class="$style.pageBannerTitleUser">
|
|
|
|
<MkAvatar :user="page.user" :class="$style.avatar" indicator link preview/> <MkA :to="`/@${username}`"><MkUserName :user="page.user" :nowrap="false"/></MkA>
|
|
|
|
</div>
|
|
|
|
<div :class="$style.pageBannerTitleSubActions">
|
|
|
|
<MkA v-if="page.userId === $i?.id" v-tooltip="i18n.ts._pages.editThisPage" :to="`/pages/edit/${page.id}`" class="_button" :class="$style.generalActionButton"><i class="ti ti-pencil ti-fw"></i></MkA>
|
2024-04-17 02:29:35 -07:00
|
|
|
<button v-tooltip="i18n.ts.share" class="_button" :class="$style.generalActionButton" @click="share"><i class="ti ti-share ti-fw"></i></button>
|
2024-04-16 18:48:42 -07:00
|
|
|
</div>
|
2024-03-18 02:21:27 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-14 02:51:15 -07:00
|
|
|
</div>
|
2024-03-18 02:21:27 -07:00
|
|
|
<div :class="$style.pageContent">
|
2022-06-20 22:12:39 -07:00
|
|
|
<XPage :page="page"/>
|
2021-10-14 02:51:15 -07:00
|
|
|
</div>
|
2024-03-18 02:21:27 -07:00
|
|
|
<div :class="$style.pageActions">
|
|
|
|
<div>
|
2023-05-19 00:20:53 -07:00
|
|
|
<MkButton v-if="page.isLiked" v-tooltip="i18n.ts._pages.unlike" class="button" asLike primary @click="unlike()"><i class="ti ti-heart-off"></i><span v-if="page.likedCount > 0" class="count">{{ page.likedCount }}</span></MkButton>
|
|
|
|
<MkButton v-else v-tooltip="i18n.ts._pages.like" class="button" asLike @click="like()"><i class="ti ti-heart"></i><span v-if="page.likedCount > 0" class="count">{{ page.likedCount }}</span></MkButton>
|
2022-06-20 22:12:39 -07:00
|
|
|
</div>
|
2024-03-18 02:21:27 -07:00
|
|
|
<div :class="$style.other">
|
2024-08-16 23:01:08 -07:00
|
|
|
<MkA v-if="page.userId === $i?.id" v-tooltip="i18n.ts._pages.editThisPage" :to="`/pages/edit/${page.id}`" class="_button" :class="$style.generalActionButton"><i class="ti ti-pencil ti-fw"></i></MkA>
|
2024-03-18 02:21:27 -07:00
|
|
|
<button v-tooltip="i18n.ts.copyLink" class="_button" :class="$style.generalActionButton" @click="copyLink"><i class="ti ti-link ti-fw"></i></button>
|
|
|
|
<button v-tooltip="i18n.ts.share" class="_button" :class="$style.generalActionButton" @click="share"><i class="ti ti-share ti-fw"></i></button>
|
2024-08-16 23:01:08 -07:00
|
|
|
<button v-if="$i" v-click-anime class="_button" :class="$style.generalActionButton" @mousedown="showMenu"><i class="ti ti-dots ti-fw"></i></button>
|
2022-06-20 22:12:39 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-18 02:21:27 -07:00
|
|
|
<div :class="$style.pageUser">
|
|
|
|
<MkAvatar :user="page.user" :class="$style.avatar" link preview/>
|
|
|
|
<MkA :to="`/@${username}`">
|
|
|
|
<MkUserName :user="page.user" :class="$style.name"/>
|
|
|
|
<MkAcct :user="page.user" :class="$style.acct"/>
|
|
|
|
</MkA>
|
|
|
|
<MkFollowButton v-if="!$i || $i.id != page.user.id" :user="page.user!" :inline="true" :transparent="false" :full="true" :class="$style.follow"/>
|
2022-06-20 22:12:39 -07:00
|
|
|
</div>
|
2024-03-18 02:21:27 -07:00
|
|
|
<div :class="$style.pageDate">
|
|
|
|
<div><i class="ti ti-clock"></i> {{ i18n.ts.createdAt }}: <MkTime :time="page.createdAt" mode="detail"/></div>
|
|
|
|
<div v-if="page.createdAt != page.updatedAt"><i class="ti ti-clock-edit"></i> {{ i18n.ts.updatedAt }}: <MkTime :time="page.updatedAt" mode="detail"/></div>
|
|
|
|
</div>
|
2021-04-24 23:14:26 -07:00
|
|
|
</div>
|
2022-06-20 22:12:39 -07:00
|
|
|
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
|
|
|
<MkContainer :max-height="300" :foldable="true" class="other">
|
2023-01-14 15:30:29 -08:00
|
|
|
<template #icon><i class="ti ti-clock"></i></template>
|
|
|
|
<template #header>{{ i18n.ts.recentPosts }}</template>
|
2023-09-10 02:40:20 -07:00
|
|
|
<MkPagination v-slot="{items}" :pagination="otherPostsPagination" :class="$style.relatedPagesRoot" class="_gaps">
|
|
|
|
<MkPagePreview v-for="page in items" :key="page.id" :page="page" :class="$style.relatedPagesItem"/>
|
2022-06-20 22:12:39 -07:00
|
|
|
</MkPagination>
|
|
|
|
</MkContainer>
|
2021-04-24 23:14:26 -07:00
|
|
|
</div>
|
2022-06-20 22:12:39 -07:00
|
|
|
<MkError v-else-if="error" @retry="fetchPage()"/>
|
|
|
|
<MkLoading v-else/>
|
2022-12-29 20:37:14 -08:00
|
|
|
</Transition>
|
2022-06-20 22:12:39 -07:00
|
|
|
</MkSpacer>
|
|
|
|
</MkStickyContainer>
|
2019-07-06 14:56:13 -07:00
|
|
|
</template>
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
<script lang="ts" setup>
|
2024-08-16 23:01:08 -07:00
|
|
|
import { computed, watch, ref, defineAsyncComponent } from 'vue';
|
2023-12-25 21:19:35 -08:00
|
|
|
import * as Misskey from 'misskey-js';
|
2021-11-11 09:02:25 -08:00
|
|
|
import XPage from '@/components/page/page.vue';
|
2022-09-06 02:21:49 -07:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2023-09-19 00:37:43 -07:00
|
|
|
import * as os from '@/os.js';
|
2024-01-04 01:32:46 -08:00
|
|
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
2024-09-10 02:39:53 -07:00
|
|
|
import { url } from '@@/js/config.js';
|
2023-09-10 02:40:20 -07:00
|
|
|
import MkMediaImage from '@/components/MkMediaImage.vue';
|
2024-03-18 02:21:27 -07:00
|
|
|
import MkImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
2022-08-30 08:24:33 -07:00
|
|
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
2022-09-06 02:21:49 -07:00
|
|
|
import MkContainer from '@/components/MkContainer.vue';
|
2023-12-26 22:55:09 -08:00
|
|
|
import MkPagination from '@/components/MkPagination.vue';
|
2022-08-30 08:24:33 -07:00
|
|
|
import MkPagePreview from '@/components/MkPagePreview.vue';
|
2023-09-19 00:37:43 -07:00
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
|
|
|
import { pageViewInterruptors, defaultStore } from '@/store.js';
|
|
|
|
import { deepClone } from '@/scripts/clone.js';
|
|
|
|
import { $i } from '@/account.js';
|
2023-11-29 15:15:13 -08:00
|
|
|
import { isSupportShare } from '@/scripts/navigator.js';
|
2024-03-18 02:21:27 -07:00
|
|
|
import { instance } from '@/instance.js';
|
|
|
|
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
|
2024-07-17 05:52:05 -07:00
|
|
|
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js';
|
2024-08-16 23:01:08 -07:00
|
|
|
import { useRouter } from '@/router/supplier.js';
|
2024-09-23 05:50:30 -07:00
|
|
|
import type { MenuItem } from '@/types/menu.js';
|
2024-08-16 23:01:08 -07:00
|
|
|
|
|
|
|
const router = useRouter();
|
2022-06-20 01:38:49 -07:00
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
pageName: string;
|
|
|
|
username: string;
|
|
|
|
}>();
|
|
|
|
|
2023-12-25 21:19:35 -08:00
|
|
|
const page = ref<Misskey.entities.Page | null>(null);
|
|
|
|
const error = ref<any>(null);
|
2022-06-20 01:38:49 -07:00
|
|
|
const otherPostsPagination = {
|
|
|
|
endpoint: 'users/pages' as const,
|
|
|
|
limit: 6,
|
|
|
|
params: computed(() => ({
|
2023-12-06 21:42:09 -08:00
|
|
|
userId: page.value.user.id,
|
2022-06-20 01:38:49 -07:00
|
|
|
})),
|
2023-12-26 22:55:09 -08:00
|
|
|
};
|
2023-12-06 21:42:09 -08:00
|
|
|
const path = computed(() => props.username + '/' + props.pageName);
|
2022-06-20 01:38:49 -07:00
|
|
|
|
|
|
|
function fetchPage() {
|
2023-12-06 21:42:09 -08:00
|
|
|
page.value = null;
|
2024-01-04 01:32:46 -08:00
|
|
|
misskeyApi('pages/show', {
|
2022-06-20 01:38:49 -07:00
|
|
|
name: props.pageName,
|
|
|
|
username: props.username,
|
2023-03-14 18:44:24 -07:00
|
|
|
}).then(async _page => {
|
2023-12-06 21:42:09 -08:00
|
|
|
page.value = _page;
|
2023-03-14 18:44:24 -07:00
|
|
|
|
|
|
|
// plugin
|
|
|
|
if (pageViewInterruptors.length > 0) {
|
|
|
|
let result = deepClone(_page);
|
|
|
|
for (const interruptor of pageViewInterruptors) {
|
|
|
|
result = await interruptor.handler(result);
|
|
|
|
}
|
2023-12-06 21:42:09 -08:00
|
|
|
page.value = result;
|
2023-03-14 18:44:24 -07:00
|
|
|
}
|
2022-06-20 01:38:49 -07:00
|
|
|
}).catch(err => {
|
2023-12-06 21:42:09 -08:00
|
|
|
error.value = err;
|
2022-06-20 01:38:49 -07:00
|
|
|
});
|
|
|
|
}
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
function share(ev: MouseEvent) {
|
|
|
|
if (!page.value) return;
|
|
|
|
|
2024-09-23 05:50:30 -07:00
|
|
|
const menuItems: MenuItem[] = [];
|
|
|
|
|
|
|
|
menuItems.push({
|
|
|
|
text: i18n.ts.shareWithNote,
|
|
|
|
icon: 'ti ti-pencil',
|
|
|
|
action: shareWithNote,
|
|
|
|
});
|
|
|
|
|
|
|
|
if (isSupportShare()) {
|
|
|
|
menuItems.push({
|
2024-03-18 02:21:27 -07:00
|
|
|
text: i18n.ts.share,
|
|
|
|
icon: 'ti ti-share',
|
|
|
|
action: shareWithNavigator,
|
2024-09-23 05:50:30 -07:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
os.popupMenu(menuItems, ev.currentTarget ?? ev.target);
|
2022-06-20 01:38:49 -07:00
|
|
|
}
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2023-11-29 15:15:13 -08:00
|
|
|
function copyLink() {
|
2024-03-18 02:21:27 -07:00
|
|
|
if (!page.value) return;
|
|
|
|
|
2023-12-06 21:42:09 -08:00
|
|
|
copyToClipboard(`${url}/@${page.value.user.username}/pages/${page.value.name}`);
|
2023-11-29 15:15:13 -08:00
|
|
|
os.success();
|
|
|
|
}
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
function shareWithNote() {
|
2024-03-18 02:21:27 -07:00
|
|
|
if (!page.value) return;
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
os.post({
|
2024-03-18 02:21:27 -07:00
|
|
|
initialText: `${page.value.title || page.value.name}\n${url}/@${page.value.user.username}/pages/${page.value.name}`,
|
|
|
|
instant: true,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function shareWithNavigator() {
|
|
|
|
if (!page.value) return;
|
|
|
|
|
|
|
|
navigator.share({
|
|
|
|
title: page.value.title ?? page.value.name,
|
|
|
|
text: page.value.summary ?? undefined,
|
|
|
|
url: `${url}/@${page.value.user.username}/pages/${page.value.name}`,
|
2022-06-20 01:38:49 -07:00
|
|
|
});
|
|
|
|
}
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
function like() {
|
2024-03-18 02:21:27 -07:00
|
|
|
if (!page.value) return;
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
os.apiWithDialog('pages/like', {
|
2023-12-06 21:42:09 -08:00
|
|
|
pageId: page.value.id,
|
2022-06-20 01:38:49 -07:00
|
|
|
}).then(() => {
|
2024-03-18 02:21:27 -07:00
|
|
|
page.value!.isLiked = true;
|
|
|
|
page.value!.likedCount++;
|
2022-06-20 01:38:49 -07:00
|
|
|
});
|
|
|
|
}
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
async function unlike() {
|
2024-03-18 02:21:27 -07:00
|
|
|
if (!page.value) return;
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
const confirm = await os.confirm({
|
|
|
|
type: 'warning',
|
|
|
|
text: i18n.ts.unlikeConfirm,
|
|
|
|
});
|
|
|
|
if (confirm.canceled) return;
|
|
|
|
os.apiWithDialog('pages/unlike', {
|
2023-12-06 21:42:09 -08:00
|
|
|
pageId: page.value.id,
|
2022-06-20 01:38:49 -07:00
|
|
|
}).then(() => {
|
2024-03-18 02:21:27 -07:00
|
|
|
page.value!.isLiked = false;
|
|
|
|
page.value!.likedCount--;
|
2022-06-20 01:38:49 -07:00
|
|
|
});
|
|
|
|
}
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
function pin(pin) {
|
2024-03-18 02:21:27 -07:00
|
|
|
if (!page.value) return;
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
os.apiWithDialog('i/update', {
|
2023-12-06 21:42:09 -08:00
|
|
|
pinnedPageId: pin ? page.value.id : null,
|
2022-06-20 01:38:49 -07:00
|
|
|
});
|
|
|
|
}
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2024-08-16 23:01:08 -07:00
|
|
|
function reportAbuse() {
|
|
|
|
if (!page.value) return;
|
|
|
|
|
|
|
|
const pageUrl = `${url}/@${props.username}/pages/${props.pageName}`;
|
|
|
|
|
2024-08-17 02:04:52 -07:00
|
|
|
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
|
2024-08-16 23:01:08 -07:00
|
|
|
user: page.value.user,
|
|
|
|
initialComment: `Page: ${pageUrl}\n-----\n`,
|
2024-08-17 02:04:52 -07:00
|
|
|
}, {
|
|
|
|
closed: () => dispose(),
|
|
|
|
});
|
2024-08-16 23:01:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function showMenu(ev: MouseEvent) {
|
|
|
|
if (!page.value) return;
|
|
|
|
|
2024-09-23 05:50:30 -07:00
|
|
|
const menuItems: MenuItem[] = [];
|
|
|
|
|
|
|
|
if ($i && $i.id === page.value.userId) {
|
|
|
|
menuItems.push({
|
|
|
|
icon: 'ti ti-pencil',
|
|
|
|
text: i18n.ts.editThisPage,
|
|
|
|
action: () => router.push(`/pages/edit/${page.value.id}`),
|
|
|
|
});
|
|
|
|
|
|
|
|
if ($i.pinnedPageId === page.value.id) {
|
|
|
|
menuItems.push({
|
2024-08-16 23:01:08 -07:00
|
|
|
icon: 'ti ti-pinned-off',
|
|
|
|
text: i18n.ts.unpin,
|
|
|
|
action: () => pin(false),
|
2024-09-23 05:50:30 -07:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
menuItems.push({
|
2024-08-16 23:01:08 -07:00
|
|
|
icon: 'ti ti-pin',
|
|
|
|
text: i18n.ts.pin,
|
|
|
|
action: () => pin(true),
|
2024-09-23 05:50:30 -07:00
|
|
|
});
|
|
|
|
}
|
|
|
|
} else if ($i && $i.id !== page.value.userId) {
|
|
|
|
menuItems.push({
|
|
|
|
icon: 'ti ti-code',
|
|
|
|
text: i18n.ts._pages.viewSource,
|
|
|
|
action: () => router.push(`/@${props.username}/pages/${props.pageName}/view-source`),
|
|
|
|
}, {
|
|
|
|
icon: 'ti ti-exclamation-circle',
|
|
|
|
text: i18n.ts.reportAbuse,
|
|
|
|
action: reportAbuse,
|
|
|
|
});
|
|
|
|
|
|
|
|
if ($i.isModerator || $i.isAdmin) {
|
|
|
|
menuItems.push({
|
|
|
|
type: 'divider',
|
|
|
|
}, {
|
|
|
|
icon: 'ti ti-trash',
|
|
|
|
text: i18n.ts.delete,
|
|
|
|
danger: true,
|
|
|
|
action: () => os.confirm({
|
|
|
|
type: 'warning',
|
|
|
|
text: i18n.ts.deleteConfirm,
|
|
|
|
}).then(({ canceled }) => {
|
|
|
|
if (canceled || !page.value) return;
|
|
|
|
|
|
|
|
os.apiWithDialog('pages/delete', { pageId: page.value.id });
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
os.popupMenu(menuItems, ev.currentTarget ?? ev.target);
|
2024-08-16 23:01:08 -07:00
|
|
|
}
|
|
|
|
|
2023-12-06 21:42:09 -08:00
|
|
|
watch(() => path.value, fetchPage, { immediate: true });
|
2019-07-06 14:56:13 -07:00
|
|
|
|
2023-12-06 21:42:09 -08:00
|
|
|
const headerActions = computed(() => []);
|
2022-06-20 01:38:49 -07:00
|
|
|
|
2023-12-06 21:42:09 -08:00
|
|
|
const headerTabs = computed(() => []);
|
2022-06-20 01:38:49 -07:00
|
|
|
|
2024-02-15 23:17:09 -08:00
|
|
|
definePageMetadata(() => ({
|
|
|
|
title: page.value ? page.value.title || page.value.name : i18n.ts.pages,
|
|
|
|
...page.value ? {
|
|
|
|
avatar: page.value.user,
|
|
|
|
path: `/@${page.value.user.username}/pages/${page.value.name}`,
|
|
|
|
share: {
|
|
|
|
title: page.value.title || page.value.name,
|
|
|
|
text: page.value.summary,
|
|
|
|
},
|
|
|
|
} : {},
|
|
|
|
}));
|
2019-07-06 14:56:13 -07:00
|
|
|
</script>
|
2020-01-29 11:37:25 -08:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
<style lang="scss" module>
|
|
|
|
.fadeEnterActive,
|
|
|
|
.fadeLeaveActive {
|
2021-04-24 23:14:26 -07:00
|
|
|
transition: opacity 0.125s ease;
|
|
|
|
}
|
2024-03-18 02:21:27 -07:00
|
|
|
.fadeEnterFrom,
|
|
|
|
.fadeLeaveTo {
|
2021-04-24 23:14:26 -07:00
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.generalActionButton {
|
|
|
|
height: 2.5rem;
|
|
|
|
width: 2.5rem;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 99rem;
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
& :global(.ti) {
|
|
|
|
line-height: 2.5rem;
|
|
|
|
}
|
2021-04-10 07:52:45 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
&:hover,
|
|
|
|
&:focus-visible {
|
|
|
|
background-color: var(--accentedBg);
|
|
|
|
color: var(--accent);
|
|
|
|
text-decoration: none;
|
2024-07-12 00:25:44 -07:00
|
|
|
outline: none;
|
2024-03-18 02:21:27 -07:00
|
|
|
}
|
|
|
|
}
|
2021-04-10 07:52:45 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.pageMain {
|
|
|
|
border-radius: var(--radius);
|
|
|
|
padding: 2rem;
|
|
|
|
background: var(--panel);
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pageBanner {
|
|
|
|
width: calc(100% + 4rem);
|
|
|
|
margin: -2rem -2rem 1.5rem;
|
|
|
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
> .pageBannerBgRoot {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
.pageBannerBg {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
object-fit: cover;
|
|
|
|
opacity: .2;
|
|
|
|
filter: brightness(1.2);
|
2021-04-10 07:52:45 -07:00
|
|
|
}
|
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.pageBannerBgFallback1 {
|
|
|
|
filter: blur(20px);
|
2021-04-10 07:52:45 -07:00
|
|
|
}
|
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.pageBannerBgFallback2 {
|
|
|
|
background-color: var(--accentedBg);
|
|
|
|
}
|
2021-04-10 07:52:45 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100px;
|
|
|
|
background: linear-gradient(0deg, var(--panel), transparent);
|
|
|
|
}
|
|
|
|
}
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
> .pageBannerImage {
|
|
|
|
position: relative;
|
|
|
|
padding-top: 56.25%;
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
> .thumbnail {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2021-04-24 23:14:26 -07:00
|
|
|
}
|
2024-03-18 02:21:27 -07:00
|
|
|
}
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
> .pageBannerTitle {
|
|
|
|
position: relative;
|
|
|
|
padding: 1.5rem 2rem;
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
h1 {
|
|
|
|
font-size: 2rem;
|
|
|
|
font-weight: 700;
|
|
|
|
color: var(--fg);
|
|
|
|
margin: 0;
|
|
|
|
}
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-04-16 18:48:42 -07:00
|
|
|
.pageBannerTitleSub {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.pageBannerTitleUser {
|
|
|
|
--height: 32px;
|
2024-04-16 18:48:42 -07:00
|
|
|
flex-shrink: 0;
|
2024-09-06 00:12:14 -07:00
|
|
|
line-height: var(--height);
|
2021-04-24 23:14:26 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.avatar {
|
|
|
|
height: var(--height);
|
|
|
|
width: var(--height);
|
2021-04-24 23:14:26 -07:00
|
|
|
}
|
2020-04-17 04:36:51 -07:00
|
|
|
}
|
2024-04-16 18:48:42 -07:00
|
|
|
|
|
|
|
.pageBannerTitleSubActions {
|
|
|
|
flex-shrink: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
gap: var(--marginHalf);
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
2024-03-18 02:21:27 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.pageContent {
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
}
|
2020-04-17 04:36:51 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.pageActions {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2021-04-10 07:52:45 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
border-top: 1px solid var(--divider);
|
|
|
|
padding-top: 1.5rem;
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
|
|
|
|
> .other {
|
|
|
|
margin-left: auto;
|
|
|
|
display: flex;
|
|
|
|
gap: var(--marginHalf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.pageUser {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
border-top: 1px solid var(--divider);
|
|
|
|
padding-top: 1.5rem;
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
|
|
|
|
.avatar,
|
|
|
|
.name,
|
|
|
|
.acct {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
width: 4rem;
|
|
|
|
height: 4rem;
|
|
|
|
margin-right: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.name {
|
|
|
|
font-size: 110%;
|
|
|
|
font-weight: 700;
|
|
|
|
}
|
|
|
|
|
|
|
|
.acct {
|
|
|
|
font-size: 90%;
|
|
|
|
opacity: 0.7;
|
2020-04-05 01:55:51 -07:00
|
|
|
}
|
2021-04-10 07:52:45 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.follow {
|
|
|
|
margin-left: auto;
|
2021-04-10 07:52:45 -07:00
|
|
|
}
|
2020-01-29 11:37:25 -08:00
|
|
|
}
|
2023-09-10 02:40:20 -07:00
|
|
|
|
2024-03-18 02:21:27 -07:00
|
|
|
.pageDate {
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pageLinks {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
gap: var(--marginHalf);
|
|
|
|
}
|
|
|
|
|
2023-09-10 02:40:20 -07:00
|
|
|
.relatedPagesRoot {
|
|
|
|
padding: var(--margin);
|
|
|
|
}
|
|
|
|
|
|
|
|
.relatedPagesItem > article {
|
|
|
|
background-color: var(--panelHighlight) !important;
|
|
|
|
}
|
|
|
|
</style>
|