mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 17:30:45 +01:00
🎨
This commit is contained in:
parent
8c0490fef1
commit
7128b9f16a
7 changed files with 389 additions and 23 deletions
34
src/client/components/featured-photos.vue
Normal file
34
src/client/components/featured-photos.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div class="xfbouadm" v-if="meta" :style="{ backgroundImage: `url(${ meta.backgroundImageUrl })` }">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
meta: null,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
os.api('meta', { detail: true }).then(meta => {
|
||||
this.meta = meta;
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xfbouadm {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<XPostForm :channel="channel" class="post-form _content _panel _vMargin" fixed v-if="$i"/>
|
||||
|
||||
<XTimeline class="_content _vMargin" src="channel" :channel="channelId" @before="before" @after="after"/>
|
||||
<XTimeline class="_content _vMargin _noGap_" src="channel" :channel="channelId" @before="before" @after="after"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
<template>
|
||||
<div class="rsqzvsbo" v-if="meta">
|
||||
<div class="top">
|
||||
<MkFeaturedPhotos class="bg"/>
|
||||
<XTimeline class="tl"/>
|
||||
<div class="shape"></div>
|
||||
<img src="/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="🍮"/>
|
||||
</div>
|
||||
<div class="main _panel">
|
||||
<div class="bg">
|
||||
<div class="fade"></div>
|
||||
|
@ -12,13 +21,21 @@
|
|||
<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 || $ts.introMisskey"></div>
|
||||
<div class="desc" v-html="meta.description || $ts.headlineMisskey"></div>
|
||||
</div>
|
||||
<div class="action">
|
||||
<MkButton @click="signup()" inline primary>{{ $ts.signup }}</MkButton>
|
||||
<MkButton @click="signin()" inline>{{ $ts.login }}</MkButton>
|
||||
</div>
|
||||
<div class="status" v-if="onlineUsersCount">
|
||||
<div class="status" v-if="onlineUsersCount && stats">
|
||||
<div>
|
||||
<I18n :src="$ts.nUsers" text-tag="span" class="users">
|
||||
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
||||
</I18n>
|
||||
<I18n :src="$ts.nNotes" text-tag="span" class="notes">
|
||||
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
||||
</I18n>
|
||||
</div>
|
||||
<I18n :src="$ts.onlineUsersCount" text-tag="span" class="online">
|
||||
<template #n><b>{{ onlineUsersCount }}</b></template>
|
||||
</I18n>
|
||||
|
@ -38,7 +55,8 @@ import XSigninDialog from '@/components/signin-dialog.vue';
|
|||
import XSignupDialog from '@/components/signup-dialog.vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import XNote from '@/components/note.vue';
|
||||
import MkPagination from '@/components/ui/pagination.vue';
|
||||
import MkFeaturedPhotos from '@/components/featured-photos.vue';
|
||||
import XTimeline from './welcome.timeline.vue';
|
||||
import { host, instanceName } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import number from '@/filters/number';
|
||||
|
@ -47,7 +65,8 @@ export default defineComponent({
|
|||
components: {
|
||||
MkButton,
|
||||
XNote,
|
||||
MkPagination,
|
||||
MkFeaturedPhotos,
|
||||
XTimeline,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -58,18 +77,6 @@ export default defineComponent({
|
|||
stats: null,
|
||||
tags: [],
|
||||
onlineUsersCount: null,
|
||||
clipPagination: {
|
||||
endpoint: 'clips/notes',
|
||||
limit: 10,
|
||||
params: () => ({
|
||||
clipId: this.meta.pinnedClipId,
|
||||
})
|
||||
},
|
||||
featuredPagination: {
|
||||
endpoint: 'notes/featured',
|
||||
limit: 10,
|
||||
offsetMode: true
|
||||
},
|
||||
faEllipsisH
|
||||
};
|
||||
},
|
||||
|
@ -144,6 +151,31 @@ export default defineComponent({
|
|||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
|
||||
> .bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
> .tl {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 64px;
|
||||
margin: auto;
|
||||
width: 500px;
|
||||
height: calc(100% - 128px);
|
||||
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%);
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
> .shape {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -156,14 +188,32 @@ export default defineComponent({
|
|||
|
||||
> .misskey {
|
||||
position: absolute;
|
||||
top: 24px;
|
||||
left: 24px;
|
||||
top: 42px;
|
||||
left: 42px;
|
||||
width: 160px;
|
||||
|
||||
@media (max-width: 450px) {
|
||||
width: 130px;
|
||||
}
|
||||
}
|
||||
|
||||
> .emojis {
|
||||
position: absolute;
|
||||
bottom: 32px;
|
||||
left: 35px;
|
||||
|
||||
> * {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
> .main {
|
||||
position: relative;
|
||||
width: min(490px, 100%);
|
||||
width: min(480px, 100%);
|
||||
margin: auto auto auto 128px;
|
||||
box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
|
||||
|
||||
|
@ -212,11 +262,24 @@ export default defineComponent({
|
|||
|
||||
> .action {
|
||||
padding: 32px;
|
||||
|
||||
> * {
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
> .status {
|
||||
border-top: solid 1px var(--divider);
|
||||
padding: 32px;
|
||||
font-size: 90%;
|
||||
|
||||
> div {
|
||||
> span:not(:last-child) {
|
||||
padding-right: 1em;
|
||||
margin-right: 1em;
|
||||
border-right: solid 1px var(--divider);
|
||||
}
|
||||
}
|
||||
|
||||
> .online {
|
||||
::v-deep(b) {
|
218
src/client/pages/welcome.entrance.b.vue
Normal file
218
src/client/pages/welcome.entrance.b.vue
Normal file
|
@ -0,0 +1,218 @@
|
|||
<template>
|
||||
<div class="rsqzvsbo" v-if="meta">
|
||||
<div class="top">
|
||||
<MkFeaturedPhotos class="bg"/>
|
||||
<XTimeline class="tl"/>
|
||||
<div class="shape"></div>
|
||||
<div class="main">
|
||||
<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 || $ts.headlineMisskey"></div>
|
||||
</div>
|
||||
<div class="action">
|
||||
<MkButton class="signup" @click="signup()" inline primary>{{ $ts.signup }}</MkButton>
|
||||
<MkButton class="signin" @click="signin()" inline>{{ $ts.login }}</MkButton>
|
||||
</div>
|
||||
<div class="status" v-if="onlineUsersCount">
|
||||
<I18n :src="$ts.onlineUsersCount" text-tag="span" class="online">
|
||||
<template #n><b>{{ onlineUsersCount }}</b></template>
|
||||
</I18n>
|
||||
</div>
|
||||
</div>
|
||||
<img src="/assets/misskey.svg" class="misskey"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faEllipsisH, faInfoCircle, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import { toUnicode } from 'punycode';
|
||||
import XSigninDialog from '@/components/signin-dialog.vue';
|
||||
import XSignupDialog from '@/components/signup-dialog.vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import XNote from '@/components/note.vue';
|
||||
import MkFeaturedPhotos from '@/components/featured-photos.vue';
|
||||
import XTimeline from './welcome.timeline.vue';
|
||||
import { host, instanceName } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import number from '@/filters/number';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MkButton,
|
||||
XNote,
|
||||
XTimeline,
|
||||
MkFeaturedPhotos,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
host: toUnicode(host),
|
||||
instanceName,
|
||||
meta: null,
|
||||
stats: null,
|
||||
tags: [],
|
||||
onlineUsersCount: null,
|
||||
faEllipsisH
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
os.api('meta', { detail: true }).then(meta => {
|
||||
this.meta = meta;
|
||||
});
|
||||
|
||||
os.api('stats').then(stats => {
|
||||
this.stats = stats;
|
||||
});
|
||||
|
||||
os.api('get-online-users-count').then(res => {
|
||||
this.onlineUsersCount = res.count;
|
||||
});
|
||||
|
||||
os.api('hashtags/list', {
|
||||
sort: '+mentionedLocalUsers',
|
||||
limit: 8
|
||||
}).then(tags => {
|
||||
this.tags = tags;
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
signin() {
|
||||
os.popup(XSigninDialog, {
|
||||
autoSet: true
|
||||
}, {}, 'closed');
|
||||
},
|
||||
|
||||
signup() {
|
||||
os.popup(XSignupDialog, {
|
||||
autoSet: true
|
||||
}, {}, 'closed');
|
||||
},
|
||||
|
||||
showMenu(ev) {
|
||||
os.modalMenu([{
|
||||
text: this.$t('aboutX', { x: instanceName }),
|
||||
icon: faInfoCircle,
|
||||
action: () => {
|
||||
os.pageWindow('/about');
|
||||
}
|
||||
}, {
|
||||
text: this.$ts.aboutMisskey,
|
||||
icon: faInfoCircle,
|
||||
action: () => {
|
||||
os.pageWindow('/about-misskey');
|
||||
}
|
||||
}, null, {
|
||||
text: this.$ts.help,
|
||||
icon: faQuestionCircle,
|
||||
action: () => {
|
||||
os.pageWindow('/docs');
|
||||
}
|
||||
}], ev.currentTarget || ev.target);
|
||||
},
|
||||
|
||||
number
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rsqzvsbo {
|
||||
> .top {
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
|
||||
> .bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
> .tl {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 64px;
|
||||
margin: auto;
|
||||
width: 500px;
|
||||
height: calc(100% - 128px);
|
||||
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%);
|
||||
}
|
||||
|
||||
> .shape {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--accent);
|
||||
clip-path: polygon(0% 0%, 40% 0%, 22% 100%, 0% 100%);
|
||||
}
|
||||
|
||||
> .misskey {
|
||||
position: absolute;
|
||||
bottom: 64px;
|
||||
left: 64px;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
> .main {
|
||||
position: relative;
|
||||
width: min(490px, 100%);
|
||||
padding: 64px;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
> h1 {
|
||||
display: block;
|
||||
margin: 0 0 16px 0;
|
||||
padding: 0;
|
||||
|
||||
> .logo {
|
||||
vertical-align: bottom;
|
||||
max-height: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
> .about {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
> .action {
|
||||
margin: 32px 0;
|
||||
|
||||
> .signup {
|
||||
background: var(--panel);
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
> .signin {
|
||||
background: var(--accent);
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
> .status {
|
||||
margin: 32px 0;
|
||||
|
||||
> .online {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
51
src/client/pages/welcome.timeline.vue
Normal file
51
src/client/pages/welcome.timeline.vue
Normal file
|
@ -0,0 +1,51 @@
|
|||
<template>
|
||||
<div class="civpbkhh">
|
||||
<div v-for="note in notes" class="note">
|
||||
<div class="content _panel">
|
||||
{{ note.text }}
|
||||
</div>
|
||||
<XReactionsViewer :note="note" ref="reactionsViewer"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import XReactionsViewer from '@/components/reactions-viewer.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XReactionsViewer
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
notes: [],
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
os.api('notes/featured').then(notes => {
|
||||
this.notes = notes;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.civpbkhh {
|
||||
text-align: right;
|
||||
|
||||
> .note {
|
||||
margin: 16px 0 16px auto;
|
||||
|
||||
> .content {
|
||||
padding: 16px;
|
||||
margin: 0 0 0 auto;
|
||||
max-width: max-content;
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -8,7 +8,7 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import XSetup from './welcome.setup.vue';
|
||||
import XEntrance from './welcome.entrance.vue';
|
||||
import XEntrance from './welcome.entrance.a.vue';
|
||||
import { instanceName } from '@/config';
|
||||
import * as os from '@/os';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="mk-app" :style="{ backgroundImage: root ? `url(${ $instance.backgroundImageUrl })` : 'none' }">
|
||||
<div class="mk-app">
|
||||
<a v-if="root" href="https://github.com/syuilo/misskey" target="_blank" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:var(--panel); color:var(--fg); position: fixed; z-index: 10; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
|
||||
|
||||
<div class="side" v-if="!narrow && !root">
|
||||
|
@ -106,7 +106,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
created() {
|
||||
document.documentElement.style.overflowY = 'scroll';
|
||||
//document.documentElement.style.overflowY = 'scroll';
|
||||
|
||||
os.api('meta', { detail: true }).then(meta => {
|
||||
this.meta = meta;
|
||||
|
|
Loading…
Reference in a new issue