4bd181d3cc
* fix: update to latest sapper fixes #416 * fix error and debug pages * requestIdleCallback makes column switching feel way nicer than double rAF * add export feature * add better csp info * workaround for sapper sub-page issue * clarify in readme about exporting * fix now config * switch from rIC to triple raf * style-loader is no longer used * update theming guide
48 lines
1.3 KiB
HTML
48 lines
1.3 KiB
HTML
<div class="timeline-page" aria-busy={hideTimeline}>
|
|
{#if hidePage}
|
|
<LoadingPage />
|
|
{/if}
|
|
<div class="timeline-slot-reveal-container {hidePage ? 'hidden' : ''}">
|
|
<slot></slot>
|
|
</div>
|
|
<div class="timeline-anchor-container">
|
|
{#if !hidePage && hideTimeline}
|
|
<LoadingPage />
|
|
{/if}
|
|
<div class="timeline-reveal-container {hideTimeline ? 'hidden' : ''}">
|
|
<LazyTimeline {timeline} />
|
|
</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>
|
|
import LazyTimeline from './timeline/LazyTimeline.html'
|
|
import { store } from '../_store/store.js'
|
|
import LoadingPage from './LoadingPage.html'
|
|
|
|
export default {
|
|
oncreate () {
|
|
this.store.set({
|
|
timelineInitialized: false,
|
|
timelinePreinitialized: false
|
|
})
|
|
},
|
|
computed: {
|
|
hidePage: ({ $timelineInitialized, $timelinePreinitialized }) => !$timelineInitialized && !$timelinePreinitialized,
|
|
hideTimeline: ({ $timelineInitialized }) => !$timelineInitialized
|
|
},
|
|
store: () => store,
|
|
components: {
|
|
LazyTimeline,
|
|
LoadingPage
|
|
}
|
|
}
|
|
</script>
|