2018-02-21 12:11:24 -06:00
|
|
|
<template>
|
2018-02-21 14:05:19 -06:00
|
|
|
<div class="welcome">
|
2018-04-27 05:12:15 -05:00
|
|
|
<div>
|
2018-08-06 23:25:50 -05:00
|
|
|
<img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name">
|
2018-06-13 19:51:55 -05:00
|
|
|
<p class="host">{{ host }}</p>
|
|
|
|
<div class="about">
|
2018-08-06 23:25:50 -05:00
|
|
|
<h2>{{ name }}</h2>
|
2018-06-13 19:51:55 -05:00
|
|
|
<p v-html="description || '%i18n:common.about%'"></p>
|
2018-08-01 16:30:54 -05:00
|
|
|
<router-link class="signup" to="/signup">%i18n:@signup%</router-link>
|
2018-06-13 19:51:55 -05:00
|
|
|
</div>
|
|
|
|
<div class="login">
|
2018-06-15 17:40:07 -05:00
|
|
|
<mk-signin :with-avatar="false"/>
|
2018-02-21 14:05:19 -06:00
|
|
|
</div>
|
2018-06-14 23:08:56 -05:00
|
|
|
<div class="tl">
|
|
|
|
<mk-welcome-timeline/>
|
|
|
|
</div>
|
2018-06-22 04:32:21 -05:00
|
|
|
<div class="hashtags">
|
|
|
|
<router-link v-for="tag in tags" :key="tag" :to="`/tags/${ tag }`" :title="tag">#{{ tag }}</router-link>
|
|
|
|
</div>
|
2018-06-15 17:40:07 -05:00
|
|
|
<div class="stats" v-if="stats">
|
|
|
|
<span>%fa:user% {{ stats.originalUsersCount | number }}</span>
|
|
|
|
<span>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</span>
|
|
|
|
</div>
|
2018-04-27 05:12:15 -05:00
|
|
|
<footer>
|
|
|
|
<small>{{ copyright }}</small>
|
|
|
|
</footer>
|
2018-02-21 14:05:19 -06:00
|
|
|
</div>
|
2018-02-21 12:11:24 -06:00
|
|
|
</div>
|
|
|
|
</template>
|
2018-02-21 14:05:19 -06:00
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-06-14 17:56:56 -05:00
|
|
|
import { apiUrl, copyright, host, name, description } from '../../../config';
|
2018-02-21 14:05:19 -06:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
data() {
|
|
|
|
return {
|
2018-03-16 13:33:36 -05:00
|
|
|
apiUrl,
|
2018-03-17 09:01:17 -05:00
|
|
|
copyright,
|
2018-06-15 17:40:07 -05:00
|
|
|
stats: null,
|
2018-06-14 17:56:56 -05:00
|
|
|
host,
|
|
|
|
name,
|
2018-06-22 04:32:21 -05:00
|
|
|
description,
|
|
|
|
tags: []
|
2018-02-21 14:05:19 -06:00
|
|
|
};
|
|
|
|
},
|
2018-06-15 17:40:07 -05:00
|
|
|
created() {
|
|
|
|
(this as any).api('stats').then(stats => {
|
|
|
|
this.stats = stats;
|
2018-03-17 09:01:17 -05:00
|
|
|
});
|
2018-06-22 04:32:21 -05:00
|
|
|
|
|
|
|
(this as any).api('hashtags/trend').then(stats => {
|
|
|
|
this.tags = stats.map(x => x.tag);
|
|
|
|
});
|
2018-02-21 14:05:19 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.welcome
|
2018-06-13 19:51:55 -05:00
|
|
|
text-align center
|
|
|
|
//background #fff
|
2018-02-21 14:05:19 -06:00
|
|
|
|
2018-04-27 05:12:15 -05:00
|
|
|
> div
|
2018-06-13 19:51:55 -05:00
|
|
|
padding 32px
|
2018-04-27 05:12:15 -05:00
|
|
|
margin 0 auto
|
|
|
|
max-width 500px
|
2018-02-21 14:05:19 -06:00
|
|
|
|
2018-06-13 17:22:50 -05:00
|
|
|
> img
|
|
|
|
display block
|
|
|
|
max-width 200px
|
|
|
|
margin 0 auto
|
2018-04-27 05:12:15 -05:00
|
|
|
|
2018-06-13 19:51:55 -05:00
|
|
|
> .host
|
|
|
|
display block
|
|
|
|
text-align center
|
|
|
|
padding 6px 12px
|
|
|
|
line-height 32px
|
|
|
|
font-weight bold
|
|
|
|
color #333
|
|
|
|
background rgba(#000, 0.035)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> .about
|
|
|
|
margin-top 16px
|
|
|
|
padding 16px
|
2018-06-14 00:52:37 -05:00
|
|
|
color #555
|
2018-06-13 19:51:55 -05:00
|
|
|
background #fff
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> h2
|
|
|
|
margin 0
|
|
|
|
|
|
|
|
> p
|
|
|
|
margin 8px
|
|
|
|
|
|
|
|
> .signup
|
|
|
|
font-weight bold
|
|
|
|
|
|
|
|
> .login
|
|
|
|
margin 16px 0
|
2018-04-27 05:12:15 -05:00
|
|
|
|
2018-06-13 17:22:50 -05:00
|
|
|
> form
|
2018-02-21 14:05:19 -06:00
|
|
|
|
2018-06-13 17:22:50 -05:00
|
|
|
button
|
|
|
|
display block
|
|
|
|
width 100%
|
|
|
|
padding 10px
|
|
|
|
margin 0
|
|
|
|
color #333
|
|
|
|
font-size 1em
|
2018-04-27 05:12:15 -05:00
|
|
|
text-align center
|
2018-06-13 17:22:50 -05:00
|
|
|
text-decoration none
|
|
|
|
text-shadow 0 1px 0 rgba(255, 255, 255, 0.9)
|
|
|
|
background-image linear-gradient(#fafafa, #eaeaea)
|
|
|
|
border 1px solid #ddd
|
|
|
|
border-bottom-color #cecece
|
|
|
|
border-radius 4px
|
|
|
|
|
|
|
|
&:active
|
|
|
|
background-color #767676
|
|
|
|
background-image none
|
|
|
|
border-color #444
|
|
|
|
box-shadow 0 1px 3px rgba(#000, 0.075), inset 0 0 5px rgba(#000, 0.2)
|
2018-03-16 13:33:36 -05:00
|
|
|
|
2018-06-14 23:08:56 -05:00
|
|
|
> .tl
|
2018-06-22 04:32:21 -05:00
|
|
|
margin 16px 0
|
|
|
|
|
2018-06-14 23:08:56 -05:00
|
|
|
> *
|
|
|
|
max-height 300px
|
|
|
|
border-radius 6px
|
|
|
|
overflow auto
|
|
|
|
-webkit-overflow-scrolling touch
|
|
|
|
|
2018-06-22 04:32:21 -05:00
|
|
|
> .hashtags
|
2018-06-22 21:30:18 -05:00
|
|
|
padding 16px 0
|
2018-06-22 04:32:21 -05:00
|
|
|
border solid 2px #ddd
|
|
|
|
border-radius 8px
|
|
|
|
|
|
|
|
> *
|
2018-06-22 21:30:18 -05:00
|
|
|
margin 0 16px
|
2018-06-22 04:32:21 -05:00
|
|
|
|
2018-06-15 17:40:07 -05:00
|
|
|
> .stats
|
|
|
|
margin 16px 0
|
|
|
|
padding 8px
|
|
|
|
font-size 14px
|
|
|
|
color #444
|
|
|
|
background rgba(#000, 0.1)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> *
|
|
|
|
margin 0 8px
|
|
|
|
|
2018-04-27 05:12:15 -05:00
|
|
|
> footer
|
|
|
|
text-align center
|
2018-06-13 19:51:55 -05:00
|
|
|
color #444
|
2018-03-17 09:01:17 -05:00
|
|
|
|
2018-04-27 05:12:15 -05:00
|
|
|
> small
|
|
|
|
display block
|
|
|
|
margin 16px 0 0 0
|
|
|
|
opacity 0.7
|
2018-03-16 13:33:36 -05:00
|
|
|
|
2018-02-21 14:05:19 -06:00
|
|
|
</style>
|