2019-11-10 03:20:22 +00:00
|
|
|
<template>
|
2019-11-11 02:20:00 +00:00
|
|
|
<div
|
|
|
|
v-if="site"
|
|
|
|
class="content site"
|
|
|
|
>
|
2019-11-15 04:10:59 +00:00
|
|
|
<FilterBar :fetch-releases="fetchReleases" />
|
|
|
|
|
2019-11-12 00:22:20 +00:00
|
|
|
<div class="content-inner">
|
|
|
|
<div class="header">
|
2019-11-11 02:20:00 +00:00
|
|
|
<a
|
|
|
|
v-if="site.url"
|
|
|
|
:href="site.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2019-11-12 00:22:20 +00:00
|
|
|
class="title"
|
2019-11-11 02:20:00 +00:00
|
|
|
>
|
|
|
|
<object
|
|
|
|
:data="`/img/logos/${site.network.slug}/${site.slug}.png`"
|
|
|
|
:title="site.name"
|
|
|
|
type="image/png"
|
|
|
|
class="logo"
|
2019-11-12 00:22:20 +00:00
|
|
|
><h2>{{ site.name }}</h2></object>
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
icon="new-tab"
|
|
|
|
class="icon-href"
|
|
|
|
/>
|
2019-11-11 02:20:00 +00:00
|
|
|
</a>
|
|
|
|
|
2019-11-12 00:22:20 +00:00
|
|
|
<span class="link">
|
|
|
|
<span class="networklogo-container">
|
|
|
|
Part of
|
|
|
|
<a
|
|
|
|
:href="`/network/${site.network.slug}`"
|
|
|
|
class="networklogo-link"
|
|
|
|
>
|
|
|
|
<object
|
|
|
|
:data="`/img/logos/${site.network.slug}/network.png`"
|
|
|
|
:title="site.network.name"
|
|
|
|
type="image/png"
|
|
|
|
class="networklogo"
|
|
|
|
>{{ site.network.name }}</object>
|
|
|
|
</a>
|
|
|
|
</span>
|
2019-11-11 02:20:00 +00:00
|
|
|
</span>
|
2019-11-12 00:22:20 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="description">{{ site.description }}</p>
|
2019-11-11 02:20:00 +00:00
|
|
|
|
|
|
|
<h3 class="heading">Latest releases</h3>
|
|
|
|
|
|
|
|
<ul class="nolist scenes">
|
|
|
|
<li
|
|
|
|
v-for="release in releases"
|
|
|
|
:key="`release-${release.id}`"
|
|
|
|
>
|
|
|
|
<ReleaseTile :release="release" />
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2019-11-10 03:20:22 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2019-11-11 02:20:00 +00:00
|
|
|
|
|
|
|
<script>
|
2019-11-15 04:10:59 +00:00
|
|
|
import FilterBar from '../header/filter-bar.vue';
|
2019-11-11 02:20:00 +00:00
|
|
|
import ReleaseTile from '../tile/release.vue';
|
|
|
|
|
2019-11-15 04:10:59 +00:00
|
|
|
async function fetchReleases() {
|
2019-11-11 02:20:00 +00:00
|
|
|
this.releases = await this.$store.dispatch('fetchSiteReleases', this.$route.params.siteSlug);
|
2019-11-15 04:10:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
async function mounted() {
|
|
|
|
[[this.site]] = await Promise.all([
|
|
|
|
this.$store.dispatch('fetchSites', this.$route.params.siteSlug),
|
|
|
|
this.fetchReleases(),
|
|
|
|
]);
|
2019-11-11 02:20:00 +00:00
|
|
|
|
|
|
|
this.pageTitle = this.site.name;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2019-11-15 04:10:59 +00:00
|
|
|
FilterBar,
|
2019-11-11 02:20:00 +00:00
|
|
|
ReleaseTile,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
site: null,
|
|
|
|
releases: null,
|
|
|
|
pageTitle: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted,
|
2019-11-15 04:10:59 +00:00
|
|
|
methods: {
|
|
|
|
fetchReleases,
|
|
|
|
},
|
2019-11-11 02:20:00 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.header {
|
|
|
|
display: flex;
|
2019-11-12 00:22:20 +00:00
|
|
|
flex-wrap: wrap;
|
2019-11-11 02:20:00 +00:00
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
2019-11-12 00:22:20 +00:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: top;
|
|
|
|
margin: 0 1rem 0 0;
|
|
|
|
|
|
|
|
&:hover .icon {
|
|
|
|
fill: $primary;
|
|
|
|
}
|
2019-11-11 02:20:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.link {
|
|
|
|
display: flex;
|
|
|
|
flex-shrink: 0;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
2019-11-13 02:14:24 +00:00
|
|
|
width: 20rem;
|
2019-11-12 00:22:20 +00:00
|
|
|
max-height: 8rem;
|
|
|
|
object-fit: contain;
|
|
|
|
margin: 0 .5rem 1rem 0;
|
2019-11-11 02:20:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.networklogo-container {
|
2019-11-12 00:22:20 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2019-11-11 02:20:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.networklogo {
|
|
|
|
color: $text;
|
2019-11-12 00:22:20 +00:00
|
|
|
width: 15rem;
|
|
|
|
max-height: 6rem;
|
2019-11-11 02:20:00 +00:00
|
|
|
font-weight: bold;
|
2019-11-12 00:22:20 +00:00
|
|
|
object-fit: contain;
|
|
|
|
object-position: 100% 0;
|
|
|
|
margin: 0 0 0 .5rem;
|
2019-11-11 02:20:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.sites,
|
|
|
|
.scenes {
|
|
|
|
display: grid;
|
|
|
|
grid-gap: 1rem;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sites {
|
2019-11-11 04:18:28 +00:00
|
|
|
grid-template-columns: repeat(auto-fit, 15rem);
|
2019-11-11 02:20:00 +00:00
|
|
|
}
|
|
|
|
</style>
|