2019-11-10 03:20:22 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="network"
|
|
|
|
class="content network"
|
|
|
|
>
|
2019-11-15 01:37:17 +00:00
|
|
|
<FilterBar :fetch-releases="fetchReleases" />
|
|
|
|
|
2019-11-10 03:20:22 +00:00
|
|
|
<div class="content-inner">
|
2019-11-12 00:22:20 +00:00
|
|
|
<div class="header">
|
|
|
|
<a
|
|
|
|
:href="network.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="title"
|
|
|
|
>
|
2019-11-14 04:13:38 +00:00
|
|
|
<img
|
|
|
|
:src="`/img/logos/${network.slug}/network.png`"
|
2019-11-12 00:22:20 +00:00
|
|
|
class="logo"
|
2019-11-14 04:13:38 +00:00
|
|
|
>
|
2019-11-12 00:22:20 +00:00
|
|
|
|
|
|
|
<Icon
|
2019-11-20 03:53:36 +00:00
|
|
|
v-if="network.url"
|
2019-11-12 00:22:20 +00:00
|
|
|
icon="new-tab"
|
|
|
|
class="icon-href"
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<p class="description">{{ network.description }}</p>
|
|
|
|
</div>
|
|
|
|
|
2019-11-14 04:13:38 +00:00
|
|
|
<template v-if="sites.length">
|
|
|
|
<h3 class="heading">Sites</h3>
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2019-11-14 04:13:38 +00:00
|
|
|
<ul class="nolist sites">
|
|
|
|
<li
|
|
|
|
v-for="site in sites"
|
|
|
|
:key="`site-${site.id}`"
|
|
|
|
>
|
|
|
|
<SiteTile :site="site" />
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</template>
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2019-11-16 02:33:36 +00:00
|
|
|
<Releases
|
|
|
|
:releases="releases"
|
|
|
|
:context="network.name"
|
|
|
|
/>
|
2019-11-10 03:20:22 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-15 01:37:17 +00:00
|
|
|
import FilterBar from '../header/filter-bar.vue';
|
2019-11-16 02:33:36 +00:00
|
|
|
import Releases from '../releases/releases.vue';
|
2019-11-10 03:20:22 +00:00
|
|
|
import SiteTile from '../tile/site.vue';
|
|
|
|
|
2019-11-15 01:37:17 +00:00
|
|
|
async function fetchReleases() {
|
2019-11-10 03:20:22 +00:00
|
|
|
this.releases = await this.$store.dispatch('fetchNetworkReleases', this.$route.params.networkSlug);
|
2019-11-15 01:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
async function mounted() {
|
|
|
|
[[this.network]] = await Promise.all([
|
|
|
|
this.$store.dispatch('fetchNetworks', this.$route.params.networkSlug),
|
|
|
|
this.fetchReleases(),
|
|
|
|
]);
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2019-11-14 04:13:38 +00:00
|
|
|
this.sites = this.network.sites
|
|
|
|
.filter(site => !site.independent)
|
|
|
|
.sort(({ name: nameA }, { name: nameB }) => nameA.localeCompare(nameB));
|
2019-11-12 00:22:20 +00:00
|
|
|
|
2019-11-10 03:20:22 +00:00
|
|
|
this.pageTitle = this.network.name;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2019-11-15 01:37:17 +00:00
|
|
|
FilterBar,
|
2019-11-16 02:33:36 +00:00
|
|
|
Releases,
|
2019-11-10 03:20:22 +00:00
|
|
|
SiteTile,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
network: null,
|
2019-11-12 00:22:20 +00:00
|
|
|
sites: null,
|
2019-11-10 03:20:22 +00:00
|
|
|
releases: null,
|
|
|
|
pageTitle: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted,
|
2019-11-15 01:37:17 +00:00
|
|
|
methods: {
|
|
|
|
fetchReleases,
|
|
|
|
},
|
2019-11-10 03:20:22 +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-10 03:20:22 +00:00
|
|
|
justify-content: space-between;
|
2019-11-12 00:22:20 +00:00
|
|
|
align-items: top;
|
|
|
|
margin: 0 0 2rem 0;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
2019-11-12 00:22:20 +00:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: top;
|
|
|
|
margin: 0 1rem 0 0;
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2019-11-12 00:22:20 +00:00
|
|
|
&:hover .icon {
|
|
|
|
fill: $primary;
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
2019-11-12 00:22:20 +00:00
|
|
|
width: 20rem;
|
|
|
|
max-height: 8rem;
|
|
|
|
object-fit: contain;
|
|
|
|
margin: 0 .5rem 0 0;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2019-11-11 04:18:28 +00:00
|
|
|
.sites {
|
2019-11-10 03:20:22 +00:00
|
|
|
display: grid;
|
|
|
|
grid-gap: 1rem;
|
2019-11-12 00:22:20 +00:00
|
|
|
margin: 0 0 2rem 0;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.sites {
|
2019-11-11 04:18:28 +00:00
|
|
|
grid-template-columns: repeat(auto-fit, 15rem);
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
2019-11-12 00:22:20 +00:00
|
|
|
|
|
|
|
@media(max-width: $breakpoint) {
|
|
|
|
.sites {
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
|
|
|
|
}
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
</style>
|