pinafore/routes/_components/HiddenFromSSR.html

22 lines
401 B
HTML
Raw Normal View History

2018-03-19 02:37:19 +01:00
<!-- toggled in 2xx.html based on whether the user is logged in or not -->
<div class="hidden-from-ssr {{shown ? 'shown' : ''}}">
2018-01-21 05:30:49 +01:00
<slot></slot>
</div>
2018-03-19 02:37:19 +01:00
<style>
.hidden-from-ssr {
opacity: 0;
}
.hidden-from-ssr.shown {
opacity: 1;
}
</style>
2018-01-21 05:30:49 +01:00
<script>
export default {
oncreate () {
2018-03-19 02:37:19 +01:00
this.set({ shown: true })
},
data: () => ({
shown: false
})
2018-01-21 05:30:49 +01:00
}
</script>