2020-10-17 13:12:00 +02:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<div v-if="meta" class="rsqzvsbo">
|
|
|
|
<div class="top">
|
|
|
|
<MkFeaturedPhotos class="bg" />
|
|
|
|
<XTimeline class="tl" />
|
|
|
|
<div class="shape1"></div>
|
|
|
|
<div class="shape2"></div>
|
|
|
|
<img src="/client-assets/misskey.svg" class="misskey" />
|
|
|
|
<div class="emojis">
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="⭐" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="❤️" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="😆" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="🤔" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="😮" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="🎉" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="💢" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="😥" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="😇" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="🥴" />
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="🍮" />
|
|
|
|
</div>
|
|
|
|
<div class="main">
|
|
|
|
<img
|
|
|
|
:src="
|
|
|
|
$instance.iconUrl ||
|
|
|
|
$instance.faviconUrl ||
|
|
|
|
'/favicon.ico'
|
|
|
|
"
|
|
|
|
alt=""
|
|
|
|
class="icon"
|
|
|
|
/>
|
|
|
|
<button class="_button _acrylic menu" @click="showMenu">
|
|
|
|
<i class="ph-dots-three-outline ph-bold ph-lg"></i>
|
|
|
|
</button>
|
|
|
|
<div class="fg">
|
|
|
|
<h1>
|
|
|
|
<img
|
|
|
|
class="logo"
|
|
|
|
v-if="meta.logoImageUrl"
|
|
|
|
:src="meta.logoImageUrl"
|
|
|
|
/>
|
|
|
|
<span v-else class="text">{{ instanceName }}</span>
|
|
|
|
</h1>
|
|
|
|
<div class="about">
|
|
|
|
<div
|
|
|
|
class="desc"
|
|
|
|
v-html="meta.description || i18n.ts.headlineMisskey"
|
|
|
|
></div>
|
|
|
|
</div>
|
|
|
|
<div class="action">
|
|
|
|
<MkButton
|
|
|
|
inline
|
|
|
|
rounded
|
|
|
|
gradate
|
|
|
|
data-cy-signup
|
|
|
|
style="margin-right: 12px"
|
|
|
|
@click="signup()"
|
|
|
|
>{{ i18n.ts.signup }}</MkButton
|
|
|
|
>
|
|
|
|
<MkButton
|
|
|
|
inline
|
|
|
|
rounded
|
|
|
|
data-cy-signin
|
|
|
|
@click="signin()"
|
|
|
|
>{{ i18n.ts.login }}</MkButton
|
|
|
|
>
|
|
|
|
<MkButton
|
|
|
|
inline
|
|
|
|
rounded
|
|
|
|
style="margin-left: 12px; margin-top: 12px"
|
|
|
|
onclick="window.location.href='/explore'"
|
|
|
|
>Explore</MkButton
|
|
|
|
>
|
|
|
|
</div>
|
2020-12-30 05:07:16 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-08 02:01:42 +02:00
|
|
|
<div v-if="instances" class="federation">
|
|
|
|
<MarqueeText :duration="40">
|
|
|
|
<MkA
|
|
|
|
v-for="instance in instances"
|
|
|
|
:key="instance.id"
|
|
|
|
:class="$style.federationInstance"
|
|
|
|
@click="signup()"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
v-if="instance.iconUrl"
|
|
|
|
class="icon"
|
|
|
|
:src="instance.iconUrl"
|
|
|
|
alt=""
|
|
|
|
/>
|
|
|
|
<span class="name _monospace">{{ instance.host }}</span>
|
|
|
|
</MkA>
|
|
|
|
</MarqueeText>
|
|
|
|
</div>
|
2022-07-01 08:06:17 +02:00
|
|
|
</div>
|
2020-12-05 10:18:37 +01:00
|
|
|
</div>
|
2020-10-17 13:12:00 +02:00
|
|
|
</template>
|
|
|
|
|
2022-07-01 08:06:17 +02:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 02:01:42 +02:00
|
|
|
import {} from "vue";
|
|
|
|
import { toUnicode } from "punycode/";
|
|
|
|
import XTimeline from "./welcome.timeline.vue";
|
|
|
|
import MarqueeText from "@/components/MkMarquee.vue";
|
|
|
|
import XSigninDialog from "@/components/MkSigninDialog.vue";
|
|
|
|
import XSignupDialog from "@/components/MkSignupDialog.vue";
|
|
|
|
import MkButton from "@/components/MkButton.vue";
|
|
|
|
import XNote from "@/components/MkNote.vue";
|
|
|
|
import MkFeaturedPhotos from "@/components/MkFeaturedPhotos.vue";
|
|
|
|
import { host, instanceName } from "@/config";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import number from "@/filters/number";
|
|
|
|
import { i18n } from "@/i18n";
|
2020-10-17 13:12:00 +02:00
|
|
|
|
2022-07-01 08:06:17 +02:00
|
|
|
let meta = $ref();
|
|
|
|
let stats = $ref();
|
|
|
|
let tags = $ref();
|
|
|
|
let onlineUsersCount = $ref();
|
|
|
|
let instances = $ref();
|
2020-10-17 13:12:00 +02:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("meta", { detail: true }).then((_meta) => {
|
2022-07-01 08:06:17 +02:00
|
|
|
meta = _meta;
|
|
|
|
});
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("stats").then((_stats) => {
|
2022-07-01 08:06:17 +02:00
|
|
|
stats = _stats;
|
|
|
|
});
|
2020-12-30 05:07:16 +01:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("get-online-users-count").then((res) => {
|
2022-07-01 08:06:17 +02:00
|
|
|
onlineUsersCount = res.count;
|
|
|
|
});
|
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("hashtags/list", {
|
|
|
|
sort: "+mentionedLocalUsers",
|
2022-07-01 08:06:17 +02:00
|
|
|
limit: 8,
|
2023-04-08 02:01:42 +02:00
|
|
|
}).then((_tags) => {
|
2022-07-01 08:06:17 +02:00
|
|
|
tags = _tags;
|
2020-10-17 13:12:00 +02:00
|
|
|
});
|
2022-07-01 08:06:17 +02:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("federation/instances", {
|
|
|
|
sort: "+pubSub",
|
2022-07-01 08:06:17 +02:00
|
|
|
limit: 20,
|
2023-04-08 02:01:42 +02:00
|
|
|
}).then((_instances) => {
|
2022-07-01 08:06:17 +02:00
|
|
|
instances = _instances;
|
|
|
|
});
|
|
|
|
|
|
|
|
function signin() {
|
2023-04-08 02:01:42 +02:00
|
|
|
os.popup(
|
|
|
|
XSigninDialog,
|
|
|
|
{
|
|
|
|
autoSet: true,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
"closed"
|
|
|
|
);
|
2022-07-01 08:06:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function signup() {
|
2023-04-08 02:01:42 +02:00
|
|
|
os.popup(
|
|
|
|
XSignupDialog,
|
|
|
|
{
|
|
|
|
autoSet: true,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
"closed"
|
|
|
|
);
|
2022-07-01 08:06:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function showMenu(ev) {
|
2023-04-08 02:01:42 +02:00
|
|
|
os.popupMenu(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
text: i18n.ts.instanceInfo,
|
|
|
|
icon: "ph-info ph-bold ph-lg",
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow("/about");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text: i18n.ts.aboutMisskey,
|
|
|
|
icon: "ph-info ph-bold ph-lg",
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow("/about-calckey");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
ev.currentTarget ?? ev.target
|
|
|
|
);
|
2022-07-01 08:06:17 +02:00
|
|
|
}
|
2020-10-17 13:12:00 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.rsqzvsbo {
|
2020-12-30 05:07:16 +01:00
|
|
|
> .top {
|
|
|
|
display: flex;
|
|
|
|
text-align: center;
|
|
|
|
min-height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
|
2020-12-30 16:22:20 +01:00
|
|
|
> .bg {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2021-03-06 04:18:46 +01:00
|
|
|
right: 0;
|
|
|
|
width: 80%; // 100%からshapeの幅を引いている
|
2020-12-30 16:22:20 +01:00
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .tl {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 64px;
|
|
|
|
margin: auto;
|
|
|
|
width: 500px;
|
|
|
|
height: calc(100% - 128px);
|
2021-03-02 14:57:16 +01:00
|
|
|
overflow: hidden;
|
2023-04-08 02:01:42 +02:00
|
|
|
-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 16:22:20 +01:00
|
|
|
|
|
|
|
@media (max-width: 1200px) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-06 04:18:46 +01:00
|
|
|
> .shape1 {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: var(--accent);
|
2022-07-19 07:26:25 +02:00
|
|
|
clip-path: polygon(0% 0%, 45% 0%, 20% 100%, 0% 100%);
|
2021-03-06 04:18:46 +01:00
|
|
|
}
|
|
|
|
> .shape2 {
|
2020-12-30 11:24:01 +01:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: var(--accent);
|
2022-07-19 07:26:25 +02:00
|
|
|
clip-path: polygon(0% 0%, 25% 0%, 35% 100%, 0% 100%);
|
2021-03-06 04:18:46 +01:00
|
|
|
opacity: 0.5;
|
2020-12-30 11:24:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
> .misskey {
|
|
|
|
position: absolute;
|
2020-12-30 16:22:20 +01:00
|
|
|
top: 42px;
|
|
|
|
left: 42px;
|
2022-07-01 08:06:17 +02:00
|
|
|
width: 140px;
|
2020-12-30 16:22:20 +01:00
|
|
|
|
|
|
|
@media (max-width: 450px) {
|
|
|
|
width: 130px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .emojis {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 32px;
|
2022-07-19 06:06:54 +02:00
|
|
|
left: 115px;
|
|
|
|
transform: scale(1.5);
|
2020-12-30 16:22:20 +01:00
|
|
|
|
|
|
|
> * {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 1200px) {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-12-30 11:24:01 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .main {
|
|
|
|
position: relative;
|
2020-12-30 16:22:20 +01:00
|
|
|
width: min(480px, 100%);
|
2020-12-30 11:24:01 +01:00
|
|
|
margin: auto auto auto 128px;
|
2022-07-01 08:06:17 +02:00
|
|
|
background: var(--panel);
|
|
|
|
border-radius: var(--radius);
|
2020-12-30 05:07:16 +01:00
|
|
|
box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
|
|
|
|
|
2020-12-30 11:24:01 +01:00
|
|
|
@media (max-width: 1200px) {
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
|
2022-07-01 08:06:17 +02:00
|
|
|
> .icon {
|
|
|
|
width: 85px;
|
|
|
|
margin-top: -47px;
|
|
|
|
border-radius: 100%;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .menu {
|
2020-12-30 05:07:16 +01:00
|
|
|
position: absolute;
|
2022-07-01 08:06:17 +02:00
|
|
|
top: 16px;
|
|
|
|
right: 16px;
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 8px;
|
|
|
|
font-size: 18px;
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .fg {
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> h1 {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
2022-07-01 08:06:17 +02:00
|
|
|
padding: 16px 32px 24px 32px;
|
|
|
|
font-size: 1.4em;
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .logo {
|
|
|
|
vertical-align: bottom;
|
|
|
|
max-height: 120px;
|
2020-12-31 17:31:29 +01:00
|
|
|
max-width: min(100%, 300px);
|
2020-12-30 05:07:16 +01:00
|
|
|
}
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .about {
|
|
|
|
padding: 0 32px;
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .action {
|
|
|
|
padding: 32px;
|
2022-08-18 01:20:39 +02:00
|
|
|
padding-top: 22px;
|
2020-12-30 16:22:20 +01:00
|
|
|
|
|
|
|
> * {
|
|
|
|
line-height: 28px;
|
|
|
|
}
|
2020-12-30 05:07:16 +01:00
|
|
|
}
|
2022-07-01 08:06:17 +02:00
|
|
|
}
|
|
|
|
}
|
2020-12-30 05:07:16 +01:00
|
|
|
|
2022-07-01 08:06:17 +02:00
|
|
|
> .federation {
|
|
|
|
position: absolute;
|
|
|
|
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;
|
2022-07-13 14:41:06 +02:00
|
|
|
overflow: clip;
|
2022-07-19 06:06:54 +02:00
|
|
|
width: 35%;
|
|
|
|
left: 50%;
|
2022-07-01 08:06:17 +02:00
|
|
|
padding: 8px 0;
|
|
|
|
|
|
|
|
@media (max-width: 900px) {
|
|
|
|
display: none;
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-05 08:05:40 +01:00
|
|
|
}
|
2020-10-17 13:12:00 +02:00
|
|
|
</style>
|
2022-07-01 08:06:17 +02: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>
|