2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
2024-02-13 15:50:11 +00:00
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
2023-07-27 05:31:52 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-10-17 11:12:00 +00:00
|
|
|
<template>
|
2021-11-19 10:36:12 +00:00
|
|
|
<div v-if="meta" class="rsqzvsbo">
|
2023-02-22 02:00:34 +00:00
|
|
|
<MkFeaturedPhotos class="bg"/>
|
|
|
|
<XTimeline class="tl"/>
|
|
|
|
<div class="shape1"></div>
|
|
|
|
<div class="shape2"></div>
|
2023-12-07 23:22:08 +00:00
|
|
|
<img :src="misskeysvg" class="misskey"/>
|
2023-02-22 02:00:34 +00:00
|
|
|
<div class="emojis">
|
2023-05-19 07:20:53 +00:00
|
|
|
<MkEmoji :normal="true" :noStyle="true" emoji="👍"/>
|
|
|
|
<MkEmoji :normal="true" :noStyle="true" emoji="❤"/>
|
|
|
|
<MkEmoji :normal="true" :noStyle="true" emoji="😆"/>
|
|
|
|
<MkEmoji :normal="true" :noStyle="true" emoji="🎉"/>
|
|
|
|
<MkEmoji :normal="true" :noStyle="true" emoji="🍮"/>
|
2023-02-22 02:00:34 +00:00
|
|
|
</div>
|
|
|
|
<div class="contents">
|
2023-04-22 01:50:54 +00:00
|
|
|
<MkVisitorDashboard/>
|
2020-12-05 09:18:37 +00:00
|
|
|
</div>
|
2023-02-22 02:00:34 +00:00
|
|
|
<div v-if="instances && instances.length > 0" class="federation">
|
|
|
|
<MarqueeText :duration="40">
|
|
|
|
<MkA v-for="instance in instances" :key="instance.id" :class="$style.federationInstance" :to="`/instance-info/${instance.host}`" behavior="window">
|
|
|
|
<!--<MkInstanceCardMini :instance="instance"/>-->
|
2023-11-03 08:38:33 +00:00
|
|
|
<img v-if="instance.iconUrl" class="icon" :src="getInstanceIcon(instance)" alt=""/>
|
2023-02-22 02:00:34 +00:00
|
|
|
<span class="name _monospace">{{ instance.host }}</span>
|
|
|
|
</MkA>
|
|
|
|
</MarqueeText>
|
|
|
|
</div>
|
2020-10-17 11:12:00 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-07-01 06:06:17 +00:00
|
|
|
<script lang="ts" setup>
|
2023-12-07 05:42:09 +00:00
|
|
|
import { ref } from 'vue';
|
2023-09-04 04:33:38 +00:00
|
|
|
import * as Misskey from 'misskey-js';
|
2022-07-01 06:06:17 +00:00
|
|
|
import XTimeline from './welcome.timeline.vue';
|
2022-08-30 15:24:33 +00:00
|
|
|
import MarqueeText from '@/components/MkMarquee.vue';
|
|
|
|
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
2023-12-07 23:22:08 +00:00
|
|
|
import misskeysvg from '/client-assets/misskey.svg';
|
2024-01-04 09:32:46 +00:00
|
|
|
import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js';
|
2023-04-22 01:50:54 +00:00
|
|
|
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
2023-11-03 08:38:33 +00:00
|
|
|
import { getProxiedImageUrl } from '@/scripts/media-proxy.js';
|
2020-10-17 11:12:00 +00:00
|
|
|
|
2023-12-07 05:42:09 +00:00
|
|
|
const meta = ref<Misskey.entities.MetaResponse>();
|
|
|
|
const instances = ref<Misskey.entities.FederationInstance[]>();
|
2020-10-17 11:12:00 +00:00
|
|
|
|
2023-12-02 12:00:05 +00:00
|
|
|
function getInstanceIcon(instance: Misskey.entities.FederationInstance): string {
|
|
|
|
if (!instance.iconUrl) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
return getProxiedImageUrl(instance.iconUrl, 'preview');
|
2023-11-03 08:38:33 +00:00
|
|
|
}
|
|
|
|
|
2024-01-04 09:32:46 +00:00
|
|
|
misskeyApi('meta', { detail: true }).then(_meta => {
|
2023-12-07 05:42:09 +00:00
|
|
|
meta.value = _meta;
|
2022-07-01 06:06:17 +00:00
|
|
|
});
|
2020-12-05 09:18:37 +00:00
|
|
|
|
2024-01-04 09:32:46 +00:00
|
|
|
misskeyApiGet('federation/instances', {
|
2022-07-01 06:06:17 +00:00
|
|
|
sort: '+pubSub',
|
|
|
|
limit: 20,
|
|
|
|
}).then(_instances => {
|
2023-12-07 05:42:09 +00:00
|
|
|
instances.value = _instances;
|
2022-07-01 06:06:17 +00:00
|
|
|
});
|
2020-10-17 11:12:00 +00:00
|
|
|
</script>
|
|
|
|
|
2022-12-27 09:29:39 +00:00
|
|
|
<style lang="scss" scoped>
|
2020-10-17 11:12:00 +00:00
|
|
|
.rsqzvsbo {
|
2023-02-22 02:00:34 +00:00
|
|
|
> .bg {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
width: 80vw; // 100%からshapeの幅を引いている
|
|
|
|
height: 100vh;
|
|
|
|
}
|
2020-12-30 15:22:20 +00:00
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
> .tl {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 64px;
|
|
|
|
margin: auto;
|
|
|
|
padding: 128px 0;
|
|
|
|
width: 500px;
|
|
|
|
height: calc(100% - 256px);
|
|
|
|
overflow: hidden;
|
|
|
|
-webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 128px, rgba(0,0,0,1) calc(100% - 128px), rgba(0,0,0,0) 100%);
|
|
|
|
mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 128px, rgba(0,0,0,1) calc(100% - 128px), rgba(0,0,0,0) 100%);
|
2020-12-30 15:22:20 +00:00
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
@media (max-width: 1200px) {
|
|
|
|
display: none;
|
2021-03-06 03:18:46 +00:00
|
|
|
}
|
2023-02-22 02:00:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
> .shape1 {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
background: var(--accent);
|
|
|
|
clip-path: polygon(0% 0%, 45% 0%, 20% 100%, 0% 100%);
|
|
|
|
}
|
|
|
|
> .shape2 {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
background: var(--accent);
|
|
|
|
clip-path: polygon(0% 0%, 25% 0%, 35% 100%, 0% 100%);
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .misskey {
|
|
|
|
position: fixed;
|
|
|
|
top: 42px;
|
|
|
|
left: 42px;
|
|
|
|
width: 140px;
|
|
|
|
|
|
|
|
@media (max-width: 450px) {
|
|
|
|
width: 130px;
|
2020-12-30 10:24:01 +00:00
|
|
|
}
|
2023-02-22 02:00:34 +00:00
|
|
|
}
|
2020-12-30 10:24:01 +00:00
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
> .emojis {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 32px;
|
|
|
|
left: 35px;
|
2020-12-30 15:22:20 +00:00
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
> * {
|
|
|
|
margin-right: 8px;
|
2020-12-30 15:22:20 +00:00
|
|
|
}
|
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
@media (max-width: 1200px) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2020-12-30 15:22:20 +00:00
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
> .contents {
|
|
|
|
position: relative;
|
|
|
|
width: min(430px, calc(100% - 32px));
|
|
|
|
margin-left: 128px;
|
2023-04-22 01:50:54 +00:00
|
|
|
padding: 100px 0 100px 0;
|
2020-12-30 15:22:20 +00:00
|
|
|
|
2023-02-22 02:00:34 +00:00
|
|
|
@media (max-width: 1200px) {
|
|
|
|
margin: auto;
|
2020-12-30 10:24:01 +00:00
|
|
|
}
|
2020-12-05 09:18:37 +00:00
|
|
|
}
|
2023-02-22 02:00:34 +00:00
|
|
|
|
|
|
|
> .federation {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 16px;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
margin: auto;
|
|
|
|
background: var(--acrylicPanel);
|
|
|
|
-webkit-backdrop-filter: var(--blur, blur(15px));
|
|
|
|
backdrop-filter: var(--blur, blur(15px));
|
|
|
|
border-radius: 999px;
|
|
|
|
overflow: clip;
|
|
|
|
width: 800px;
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
|
|
@media (max-width: 900px) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2020-12-05 07:05:40 +00:00
|
|
|
}
|
2020-10-17 11:12:00 +00:00
|
|
|
</style>
|
2022-07-01 06:06:17 +00:00
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.federationInstance {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
vertical-align: bottom;
|
|
|
|
padding: 6px 12px 6px 6px;
|
|
|
|
margin: 0 10px 0 0;
|
|
|
|
background: var(--panel);
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
|
|
> :global(.icon) {
|
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
margin-right: 5px;
|
|
|
|
border-radius: 999px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|