Add about page.
This commit is contained in:
parent
91991e2ac1
commit
696bb91ede
|
@ -3,7 +3,7 @@
|
||||||
<nav class='container base01-background base04' @click="scrollToTop()">
|
<nav class='container base01-background base04' @click="scrollToTop()">
|
||||||
<div class='inner-nav' :style="logoStyle">
|
<div class='inner-nav' :style="logoStyle">
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<router-link :to="{ name: 'root'}">{{sitename}}</router-link>
|
<router-link :to="{ name: 'about' }">{{sitename}}</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class='item right'>
|
<div class='item right'>
|
||||||
<user-finder></user-finder>
|
<user-finder></user-finder>
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<template>
|
||||||
|
<div class="panel panel-default base00-background">
|
||||||
|
<div class="panel-heading base01-background base04">
|
||||||
|
About
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="container">
|
||||||
|
<div class="text-fields" v-html="abouttext">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
abouttext () { return this.$store.state.config.about }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.text-fields {
|
||||||
|
margin: 0.4em;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -10,7 +10,7 @@ const LoginForm = {
|
||||||
methods: {
|
methods: {
|
||||||
submit () {
|
submit () {
|
||||||
this.$store.dispatch('loginUser', this.user).then(
|
this.$store.dispatch('loginUser', this.user).then(
|
||||||
() => {},
|
() => { this.$router.push('/main/friends') },
|
||||||
(error) => {
|
(error) => {
|
||||||
this.authError = error
|
this.authError = error
|
||||||
this.user.username = ''
|
this.user.username = ''
|
||||||
|
|
10
src/main.js
10
src/main.js
|
@ -12,6 +12,7 @@ import UserProfile from './components/user_profile/user_profile.vue'
|
||||||
import Settings from './components/settings/settings.vue'
|
import Settings from './components/settings/settings.vue'
|
||||||
import Registration from './components/registration/registration.vue'
|
import Registration from './components/registration/registration.vue'
|
||||||
import UserSettings from './components/user_settings/user_settings.vue'
|
import UserSettings from './components/user_settings/user_settings.vue'
|
||||||
|
import About from './components/about/about.vue'
|
||||||
|
|
||||||
import statusesModule from './modules/statuses.js'
|
import statusesModule from './modules/statuses.js'
|
||||||
import usersModule from './modules/users.js'
|
import usersModule from './modules/users.js'
|
||||||
|
@ -55,7 +56,8 @@ const store = new Vuex.Store({
|
||||||
})
|
})
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ name: 'root', path: '/', redirect: '/main/all' },
|
{ name: 'root', path: '/', redirect: '/about' },
|
||||||
|
{ name: 'about', path: '/about', component: About },
|
||||||
{ path: '/main/all', component: PublicAndExternalTimeline },
|
{ path: '/main/all', component: PublicAndExternalTimeline },
|
||||||
{ path: '/main/public', component: PublicTimeline },
|
{ path: '/main/public', component: PublicTimeline },
|
||||||
{ path: '/main/friends', component: FriendsTimeline },
|
{ path: '/main/friends', component: FriendsTimeline },
|
||||||
|
@ -102,3 +104,9 @@ window.fetch('/static/terms-of-service.html')
|
||||||
.then((html) => {
|
.then((html) => {
|
||||||
store.dispatch('setOption', { name: 'tos', value: html })
|
store.dispatch('setOption', { name: 'tos', value: html })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
window.fetch('/static/about.html')
|
||||||
|
.then((res) => res.text())
|
||||||
|
.then((html) => {
|
||||||
|
store.dispatch('setOption', { name: 'about', value: html })
|
||||||
|
})
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<h2>about</h2>
|
||||||
|
|
||||||
|
<p>This is a placeholder About page.</p>
|
||||||
|
|
||||||
|
<p>Edit <code>"/static/about.html"</code> to make it fit the needs of your instance.</p>
|
Loading…
Reference in New Issue