2018-05-02 00:05:36 +00:00
|
|
|
<div class="timeline-page" aria-busy={hideTimeline}>
|
|
|
|
{#if hidePage}
|
2018-03-30 06:16:53 +00:00
|
|
|
<LoadingPage />
|
2018-05-02 00:05:36 +00:00
|
|
|
{/if}
|
|
|
|
<div class="timeline-slot-reveal-container {hidePage ? 'hidden' : ''}">
|
2018-03-30 06:16:53 +00:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
<div class="timeline-anchor-container">
|
2018-05-02 00:05:36 +00:00
|
|
|
{#if !hidePage && hideTimeline}
|
2018-03-30 06:16:53 +00:00
|
|
|
<LoadingPage />
|
2018-05-02 00:05:36 +00:00
|
|
|
{/if}
|
|
|
|
<div class="timeline-reveal-container {hideTimeline ? 'hidden' : ''}">
|
|
|
|
<LazyTimeline {timeline} />
|
2018-03-30 06:16:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.timeline-page, .timeline-anchor-container {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
.timeline-reveal-container, .timeline-slot-reveal-container {
|
|
|
|
transition: opacity 0.2s linear; /* main page reveal */
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
2018-12-11 15:31:48 +00:00
|
|
|
import LazyTimeline from './timeline/LazyTimeline.html'
|
|
|
|
import { store } from '../_store/store.js'
|
|
|
|
import LoadingPage from './LoadingPage.html'
|
2018-03-30 06:16:53 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
oncreate () {
|
|
|
|
this.store.set({
|
|
|
|
timelineInitialized: false,
|
|
|
|
timelinePreinitialized: false
|
|
|
|
})
|
|
|
|
},
|
|
|
|
computed: {
|
2018-05-02 00:05:36 +00:00
|
|
|
hidePage: ({ $timelineInitialized, $timelinePreinitialized }) => !$timelineInitialized && !$timelinePreinitialized,
|
|
|
|
hideTimeline: ({ $timelineInitialized }) => !$timelineInitialized
|
2018-03-30 06:16:53 +00:00
|
|
|
},
|
|
|
|
store: () => store,
|
|
|
|
components: {
|
|
|
|
LazyTimeline,
|
|
|
|
LoadingPage
|
|
|
|
}
|
|
|
|
}
|
2018-12-11 15:31:48 +00:00
|
|
|
</script>
|