2018-05-02 02:05:36 +02:00
|
|
|
<Nav {page} />
|
2018-01-07 00:51:25 +01:00
|
|
|
|
2018-11-18 03:06:49 +01:00
|
|
|
<div class="main-content">
|
2018-12-08 16:53:14 +01:00
|
|
|
<main class="{infiniteScrollPage ? 'infinite-scroll-page' : ''}">
|
2018-02-13 07:06:05 +01:00
|
|
|
<slot></slot>
|
|
|
|
</main>
|
2018-05-02 02:05:36 +02:00
|
|
|
{#if !$isUserLoggedIn && page === 'home'}
|
2018-03-13 06:16:52 +01:00
|
|
|
<InformationalFooter />
|
2018-05-02 02:05:36 +02:00
|
|
|
{/if}
|
2018-02-13 07:06:05 +01:00
|
|
|
</div>
|
2018-12-08 16:53:14 +01:00
|
|
|
<style>
|
|
|
|
/* this avoids a flash of the background color when switching timelines */
|
|
|
|
.infinite-scroll-page {
|
|
|
|
min-height: 100vh;
|
|
|
|
}
|
|
|
|
</style>
|
2018-01-07 00:51:25 +01:00
|
|
|
<script>
|
2018-04-20 06:38:01 +02:00
|
|
|
import Nav from './Nav.html'
|
2018-01-28 22:09:39 +01:00
|
|
|
import { store } from '../_store/store'
|
2018-03-13 06:16:52 +01:00
|
|
|
import InformationalFooter from './InformationalFooter.html'
|
2018-01-07 00:51:25 +01:00
|
|
|
|
2018-04-20 06:38:01 +02:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Nav,
|
2018-03-13 06:16:52 +01:00
|
|
|
InformationalFooter
|
2018-04-17 18:42:10 +02:00
|
|
|
},
|
|
|
|
oncreate () {
|
2018-05-03 06:32:43 +02:00
|
|
|
let { page } = this.get()
|
2018-08-30 06:42:57 +02:00
|
|
|
this.store.set({ currentPage: page })
|
2018-04-17 18:42:10 +02:00
|
|
|
},
|
2018-12-08 16:53:14 +01:00
|
|
|
store: () => store,
|
|
|
|
computed: {
|
|
|
|
infiniteScrollPage: ({ $isUserLoggedIn, page }) => $isUserLoggedIn && page !== 'settings'
|
|
|
|
}
|
2018-04-20 06:38:01 +02:00
|
|
|
}
|
2018-12-08 16:53:14 +01:00
|
|
|
</script>
|