forked from cybrespace/pinafore
72 lines
1.7 KiB
HTML
72 lines
1.7 KiB
HTML
<:Head>
|
||
<title>Pinafore – Community</title>
|
||
</:Head>
|
||
|
||
<Layout page='community'>
|
||
{{#if $isUserLoggedIn}}
|
||
<div class="community-page">
|
||
<PageList label="Community list">
|
||
<PageListItem href="/local"
|
||
label="Local Timeline"
|
||
icon="#fa-users"
|
||
/>
|
||
<PageListItem href="/federated"
|
||
label="Federated Timeline"
|
||
icon="#fa-globe"
|
||
/>
|
||
<PageListItem href="/favorites"
|
||
label="Favorites"
|
||
icon="#fa-star"
|
||
/>
|
||
|
||
{{#each $lists as list}}
|
||
<PageListItem href="/lists/{{list.id}}"
|
||
label="{{list.title}}"
|
||
icon="#fa-bars"
|
||
/>
|
||
{{/each}}
|
||
</PageList>
|
||
</div>
|
||
{{else}}
|
||
<HiddenFromSSR>
|
||
<FreeTextLayout>
|
||
<h1>More</h1>
|
||
|
||
<p>More options appear here when logged in.</p>
|
||
</FreeTextLayout>
|
||
</HiddenFromSSR>
|
||
{{/if}}
|
||
</Layout>
|
||
<style>
|
||
.community-page {
|
||
margin: 20px;
|
||
}
|
||
@media (max-width: 767px) {
|
||
.community-page {
|
||
margin: 20px 10px;
|
||
}
|
||
}
|
||
</style>
|
||
<script>
|
||
import Layout from '../_components/Layout.html'
|
||
import FreeTextLayout from '../_components/FreeTextLayout.html'
|
||
import { store } from '../_store/store.js'
|
||
import HiddenFromSSR from '../_components/HiddenFromSSR'
|
||
import PageList from './_components/PageList.html'
|
||
import PageListItem from './_components/PageListItem.html'
|
||
import { fetchLists } from './_actions/community'
|
||
|
||
export default {
|
||
async oncreate() {
|
||
await fetchLists()
|
||
},
|
||
store: () => store,
|
||
components: {
|
||
Layout,
|
||
FreeTextLayout,
|
||
HiddenFromSSR,
|
||
PageList,
|
||
PageListItem
|
||
}
|
||
};
|
||
</script> |