2018-02-09 23:56:33 -06:00
|
|
|
<template>
|
2018-02-10 04:57:37 -06:00
|
|
|
<div class="mk-welcome">
|
2018-05-23 01:48:41 -05:00
|
|
|
<button @click="dark">
|
2018-05-23 15:28:46 -05:00
|
|
|
<template v-if="$store.state.device.darkmode">%fa:moon%</template>
|
2018-05-23 01:48:41 -05:00
|
|
|
<template v-else>%fa:R moon%</template>
|
|
|
|
</button>
|
2018-09-03 09:23:50 -05:00
|
|
|
|
|
|
|
<mk-forkit class="forkit"/>
|
|
|
|
|
2018-08-19 07:07:18 -05:00
|
|
|
<div class="body">
|
2018-09-03 12:09:56 -05:00
|
|
|
<div class="main block">
|
2018-09-03 09:23:50 -05:00
|
|
|
<h1 v-if="name != 'Misskey'">{{ name }}</h1>
|
|
|
|
<h1 v-else><img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name"></h1>
|
|
|
|
|
2018-06-22 04:32:21 -05:00
|
|
|
<div class="info">
|
2018-09-03 09:23:50 -05:00
|
|
|
<span><b>{{ host }}</b> - <span v-html="'%i18n:@powered-by-misskey%'"></span></span>
|
2018-06-22 04:32:21 -05:00
|
|
|
<span class="stats" v-if="stats">
|
|
|
|
<span>%fa:user% {{ stats.originalUsersCount | number }}</span>
|
|
|
|
<span>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
2018-09-03 09:23:50 -05:00
|
|
|
|
|
|
|
<p class="desc" v-html="description || '%i18n:common.about%'"></p>
|
|
|
|
|
|
|
|
<p class="sign">
|
|
|
|
<span class="signup" @click="signup">%i18n:@signup%</span>
|
|
|
|
<span class="divider">|</span>
|
|
|
|
<span class="signin" @click="signin">%i18n:@signin%</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2018-09-03 12:09:56 -05:00
|
|
|
<div class="broadcasts block">
|
2018-09-03 09:23:50 -05:00
|
|
|
<div v-for="broadcast in broadcasts">
|
|
|
|
<h1 v-html="broadcast.title"></h1>
|
|
|
|
<div v-html="broadcast.text"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-09-03 12:09:56 -05:00
|
|
|
<div class="nav block">
|
2018-06-15 05:56:18 -05:00
|
|
|
<mk-nav class="nav"/>
|
2018-02-09 23:56:33 -06:00
|
|
|
</div>
|
2018-09-03 09:23:50 -05:00
|
|
|
|
2018-09-03 12:09:56 -05:00
|
|
|
<div class="side">
|
|
|
|
<mk-trends class="trends block"/>
|
|
|
|
|
|
|
|
<mk-welcome-timeline class="tl block" :max="20"/>
|
|
|
|
</div>
|
2018-06-15 05:56:18 -05:00
|
|
|
</div>
|
2018-09-01 01:38:03 -05:00
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
<modal name="signup" :class="$store.state.device.darkmode ? 'modal-dark' : 'modal-light'" width="450px" height="auto" scrollable>
|
|
|
|
<header class="formHeader">%i18n:@signup%</header>
|
|
|
|
<mk-signup class="form"/>
|
|
|
|
</modal>
|
|
|
|
|
|
|
|
<modal name="signin" :class="$store.state.device.darkmode ? 'modal-dark' : 'modal-light'" width="450px" height="auto" scrollable>
|
|
|
|
<header class="formHeader">%i18n:@signin%</header>
|
|
|
|
<mk-signin class="form"/>
|
2018-02-10 21:08:43 -06:00
|
|
|
</modal>
|
2018-02-09 23:56:33 -06:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2018-02-10 01:22:14 -06:00
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-08-19 07:07:18 -05:00
|
|
|
import { host, copyright } from '../../../config';
|
2018-02-10 01:22:14 -06:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-02-10 21:42:02 -06:00
|
|
|
data() {
|
|
|
|
return {
|
2018-06-15 05:56:18 -05:00
|
|
|
stats: null,
|
|
|
|
copyright,
|
2018-06-15 05:58:04 -05:00
|
|
|
host,
|
2018-08-19 07:07:18 -05:00
|
|
|
name: 'Misskey',
|
|
|
|
description: '',
|
2018-09-03 12:09:56 -05:00
|
|
|
broadcasts: []
|
2018-02-10 21:42:02 -06:00
|
|
|
};
|
|
|
|
},
|
2018-06-15 05:56:18 -05:00
|
|
|
created() {
|
2018-08-19 07:07:18 -05:00
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.name = meta.name;
|
|
|
|
this.description = meta.description;
|
2018-09-03 09:23:50 -05:00
|
|
|
this.broadcasts = meta.broadcasts;
|
2018-08-19 07:07:18 -05:00
|
|
|
});
|
|
|
|
|
2018-06-15 05:56:18 -05:00
|
|
|
(this as any).api('stats').then(stats => {
|
|
|
|
this.stats = stats;
|
|
|
|
});
|
2018-06-22 04:32:21 -05:00
|
|
|
|
2018-06-15 05:56:18 -05:00
|
|
|
},
|
2018-02-10 01:22:14 -06:00
|
|
|
methods: {
|
|
|
|
signup() {
|
2018-09-01 06:47:49 -05:00
|
|
|
this.$modal.show('signup');
|
2018-02-10 21:08:43 -06:00
|
|
|
},
|
|
|
|
signin() {
|
2018-09-01 06:47:49 -05:00
|
|
|
this.$modal.show('signin');
|
2018-05-23 01:48:41 -05:00
|
|
|
},
|
|
|
|
dark() {
|
2018-05-25 01:06:35 -05:00
|
|
|
this.$store.commit('device/set', {
|
|
|
|
key: 'darkmode',
|
|
|
|
value: !this.$store.state.device.darkmode
|
|
|
|
});
|
2018-02-10 01:22:14 -06:00
|
|
|
}
|
2018-02-09 23:56:33 -06:00
|
|
|
}
|
2018-02-10 01:22:14 -06:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
<style lang="stylus">
|
|
|
|
#wait
|
|
|
|
right auto
|
|
|
|
left 15px
|
|
|
|
|
|
|
|
.v--modal-overlay
|
2018-09-03 12:09:56 -05:00
|
|
|
background rgba(0, 0, 0, 0.6)
|
2018-09-03 09:23:50 -05:00
|
|
|
|
|
|
|
.modal-light
|
|
|
|
.v--modal-box
|
|
|
|
color #777
|
|
|
|
|
|
|
|
.formHeader
|
|
|
|
border-bottom solid 1px #eee
|
|
|
|
|
|
|
|
.modal-dark
|
|
|
|
.v--modal-box
|
|
|
|
background #313543
|
|
|
|
color #fff
|
|
|
|
|
|
|
|
.formHeader
|
|
|
|
border-bottom solid 1px rgba(#000, 0.2)
|
|
|
|
|
|
|
|
.modal-light
|
|
|
|
.modal-dark
|
|
|
|
.form
|
|
|
|
padding 24px 48px 48px 48px
|
|
|
|
|
|
|
|
.formHeader
|
|
|
|
text-align center
|
|
|
|
padding 48px 0 12px 0
|
|
|
|
margin 0 48px
|
|
|
|
font-size 1.5em
|
|
|
|
|
2018-02-09 23:56:33 -06:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-03-02 22:47:55 -06:00
|
|
|
@import '~const.styl'
|
|
|
|
|
2018-05-23 01:48:41 -05:00
|
|
|
root(isDark)
|
2018-06-15 05:56:18 -05:00
|
|
|
display flex
|
2018-06-06 10:53:31 -05:00
|
|
|
min-height 100vh
|
2018-09-03 09:23:50 -05:00
|
|
|
//background-color #00070F
|
|
|
|
//background-image url('/assets/bg.jpg')
|
|
|
|
//background-position center
|
|
|
|
//background-size cover
|
2018-06-15 05:56:18 -05:00
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
> .forkit
|
2018-06-15 05:56:18 -05:00
|
|
|
position absolute
|
|
|
|
top 0
|
|
|
|
right 0
|
2018-03-17 03:47:46 -05:00
|
|
|
|
2018-05-23 01:48:41 -05:00
|
|
|
> button
|
2018-05-28 07:31:20 -05:00
|
|
|
position fixed
|
2018-05-23 01:48:41 -05:00
|
|
|
z-index 1
|
2018-09-03 12:09:56 -05:00
|
|
|
bottom 16px
|
|
|
|
left 16px
|
2018-05-23 01:48:41 -05:00
|
|
|
padding 16px
|
|
|
|
font-size 18px
|
2018-09-03 09:23:50 -05:00
|
|
|
color isDark ? #fff : #444
|
2018-06-15 05:56:18 -05:00
|
|
|
|
|
|
|
> .body
|
2018-09-03 09:23:50 -05:00
|
|
|
display grid
|
|
|
|
grid-template-rows 0.5fr 0.5fr 64px
|
|
|
|
grid-template-columns 1fr 350px
|
|
|
|
gap 16px
|
|
|
|
width 100%
|
|
|
|
max-width 1200px
|
|
|
|
height 100vh
|
2018-09-03 22:59:40 -05:00
|
|
|
min-height 800px
|
2018-09-03 09:23:50 -05:00
|
|
|
margin 0 auto
|
|
|
|
padding 64px
|
|
|
|
|
2018-09-03 12:09:56 -05:00
|
|
|
.block
|
2018-09-03 09:23:50 -05:00
|
|
|
color isDark ? #fff : #444
|
|
|
|
background isDark ? #313543 : #fff
|
|
|
|
box-shadow 0 3px 8px rgba(0, 0, 0, 0.2)
|
|
|
|
//border-radius 8px
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
> .main
|
|
|
|
grid-row 1
|
|
|
|
grid-column 1
|
|
|
|
padding 32px
|
2018-09-03 12:09:56 -05:00
|
|
|
border-top solid 5px $theme-color
|
2018-09-03 09:23:50 -05:00
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0
|
|
|
|
|
|
|
|
> img
|
|
|
|
margin -8px 0 0 -16px
|
|
|
|
max-width 280px
|
2018-06-15 05:56:18 -05:00
|
|
|
|
2018-06-22 04:32:21 -05:00
|
|
|
> .info
|
|
|
|
margin 0 auto 16px auto
|
|
|
|
width $width
|
|
|
|
font-size 14px
|
|
|
|
|
|
|
|
> .stats
|
|
|
|
margin-left 16px
|
|
|
|
padding-left 16px
|
2018-09-03 09:23:50 -05:00
|
|
|
border-left solid 1px isDark ? #fff : #444
|
2018-06-22 04:32:21 -05:00
|
|
|
|
|
|
|
> *
|
|
|
|
margin-right 16px
|
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
> .sign
|
|
|
|
font-size 120%
|
2018-06-15 05:56:18 -05:00
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
> .divider
|
|
|
|
margin 0 16px
|
2018-06-15 05:56:18 -05:00
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
> .signin
|
|
|
|
> .signup
|
|
|
|
cursor pointer
|
2018-06-15 05:56:18 -05:00
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
&:hover
|
|
|
|
color $theme-color
|
2018-06-15 05:56:18 -05:00
|
|
|
|
2018-06-22 04:32:21 -05:00
|
|
|
> .hashtags
|
2018-06-15 17:31:35 -05:00
|
|
|
margin 16px auto
|
|
|
|
width $width
|
|
|
|
font-size 14px
|
2018-06-22 04:32:21 -05:00
|
|
|
background rgba(#000, 0.3)
|
2018-06-15 17:31:35 -05:00
|
|
|
border-radius 8px
|
|
|
|
|
2018-06-22 04:32:21 -05:00
|
|
|
> *
|
|
|
|
display inline-block
|
|
|
|
margin 14px
|
2018-06-15 17:31:35 -05:00
|
|
|
|
2018-09-03 09:23:50 -05:00
|
|
|
> .broadcasts
|
|
|
|
grid-row 2
|
|
|
|
grid-column 1
|
|
|
|
padding 32px
|
|
|
|
|
|
|
|
> div
|
|
|
|
padding 0 0 16px 0
|
|
|
|
margin 0 0 16px 0
|
|
|
|
border-bottom 1px solid isDark ? rgba(#000, 0.2) : rgba(#000, 0.05)
|
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0
|
|
|
|
font-size 1.5em
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
display flex
|
|
|
|
justify-content center
|
|
|
|
align-items center
|
|
|
|
grid-row 3
|
|
|
|
grid-column 1
|
|
|
|
font-size 14px
|
|
|
|
|
2018-09-03 12:09:56 -05:00
|
|
|
> .side
|
|
|
|
display grid
|
2018-09-03 09:23:50 -05:00
|
|
|
grid-row 1 / 4
|
|
|
|
grid-column 2
|
2018-09-03 12:09:56 -05:00
|
|
|
grid-template-rows 1fr 350px
|
|
|
|
grid-template-columns 1fr
|
|
|
|
gap 16px
|
|
|
|
|
|
|
|
> .tl
|
|
|
|
grid-row 1
|
|
|
|
grid-column 1
|
|
|
|
text-align left
|
|
|
|
max-height 100%
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
> .trends
|
|
|
|
grid-row 2
|
|
|
|
grid-column 1
|
|
|
|
padding 8px
|
2018-02-09 23:56:33 -06:00
|
|
|
|
2018-05-23 01:48:41 -05:00
|
|
|
.mk-welcome[data-darkmode]
|
|
|
|
root(true)
|
|
|
|
|
|
|
|
.mk-welcome:not([data-darkmode])
|
|
|
|
root(false)
|
|
|
|
|
2018-02-09 23:56:33 -06:00
|
|
|
</style>
|