42be854521
* upgrade to svelte 2.0 * update svelte-loader to 2.9.0
35 lines
862 B
HTML
35 lines
862 B
HTML
<Nav {page} />
|
|
|
|
<div class="container" tabindex="0" ref:container>
|
|
<main>
|
|
<slot></slot>
|
|
</main>
|
|
{#if !$isUserLoggedIn && page === 'home'}
|
|
<InformationalFooter />
|
|
{/if}
|
|
</div>
|
|
<script>
|
|
import Nav from './Nav.html'
|
|
import { store } from '../_store/store'
|
|
import InformationalFooter from './InformationalFooter.html'
|
|
|
|
// Only focus the `.container` div on first load so it does not intefere
|
|
// with other desired behaviours (e.g. you click a toot, you navigate from
|
|
// a timeline view to a thread view, you press the back button, and now
|
|
// you're still focused on the toot).
|
|
let firstTime = true
|
|
|
|
export default {
|
|
components: {
|
|
Nav,
|
|
InformationalFooter
|
|
},
|
|
oncreate () {
|
|
if (firstTime) {
|
|
firstTime = false
|
|
this.refs.container.focus()
|
|
}
|
|
},
|
|
store: () => store
|
|
}
|
|
</script> |