2019-11-10 03:20:22 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="network"
|
2020-01-04 03:58:56 +00:00
|
|
|
class="content"
|
2019-11-10 03:20:22 +00:00
|
|
|
>
|
2020-01-02 23:59:02 +00:00
|
|
|
<FilterBar :fetch-releases="fetchNetwork" />
|
2019-11-15 01:37:17 +00:00
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
<div class="network">
|
|
|
|
<div class="sidebar">
|
2019-11-12 00:22:20 +00:00
|
|
|
<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
|
|
|
</a>
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
<p
|
|
|
|
v-if="network.description"
|
|
|
|
class="description"
|
|
|
|
>{{ network.description }}</p>
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
<Sites
|
|
|
|
v-if="sites.length"
|
|
|
|
:sites="sites"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="header">
|
|
|
|
<a
|
|
|
|
:href="network.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="title"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
:src="`/img/logos/${network.slug}/network.png`"
|
|
|
|
class="logo"
|
|
|
|
>
|
|
|
|
</a>
|
2019-11-12 00:22:20 +00:00
|
|
|
</div>
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
<div class="content-inner">
|
2020-01-05 01:50:55 +00:00
|
|
|
<div
|
2020-01-05 00:07:32 +00:00
|
|
|
v-if="sites.length"
|
|
|
|
class="compact"
|
2020-01-05 01:50:55 +00:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
v-if="expanded"
|
|
|
|
class="expand"
|
|
|
|
@click="expanded = false"
|
|
|
|
>⇱ collapse</span>
|
|
|
|
|
|
|
|
<Sites
|
|
|
|
:sites="sites"
|
|
|
|
class="compact"
|
|
|
|
:class="{ expanded }"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="!expanded"
|
|
|
|
class="expand"
|
|
|
|
@click="expanded = true"
|
|
|
|
>expand ⇲</span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="expanded"
|
|
|
|
class="expand"
|
|
|
|
@click="expanded = false"
|
|
|
|
>⇱ collapse</span>
|
|
|
|
</div>
|
2020-01-05 00:07:32 +00:00
|
|
|
|
|
|
|
<Releases :releases="releases" />
|
2020-01-04 03:58:56 +00:00
|
|
|
</div>
|
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';
|
2020-01-05 00:07:32 +00:00
|
|
|
import Sites from '../sites/sites.vue';
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2020-01-02 23:59:02 +00:00
|
|
|
async function fetchNetwork() {
|
|
|
|
this.network = await this.$store.dispatch('fetchNetworks', this.$route.params.networkSlug);
|
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
|
|
|
|
2020-01-02 23:59:02 +00:00
|
|
|
this.releases = this.network.sites.map(site => site.releases).flat();
|
|
|
|
}
|
|
|
|
|
|
|
|
async function mounted() {
|
|
|
|
await this.fetchNetwork();
|
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,
|
2020-01-05 00:07:32 +00:00
|
|
|
Sites,
|
2019-11-10 03:20:22 +00:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
network: null,
|
2019-11-12 00:22:20 +00:00
|
|
|
sites: null,
|
2020-01-02 23:59:02 +00:00
|
|
|
releases: [],
|
2019-11-10 03:20:22 +00:00
|
|
|
pageTitle: null,
|
2020-01-05 01:50:55 +00:00
|
|
|
expanded: false,
|
2019-11-10 03:20:22 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted,
|
2019-11-15 01:37:17 +00:00
|
|
|
methods: {
|
2020-01-02 23:59:02 +00:00
|
|
|
fetchNetwork,
|
2019-11-15 01:37:17 +00:00
|
|
|
},
|
2019-11-10 03:20:22 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
<style lang="scss">
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
@media(max-width: $breakpoint3) {
|
|
|
|
.releases .tiles {
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2019-11-10 03:20:22 +00:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
.network {
|
2019-11-10 03:20:22 +00:00
|
|
|
display: flex;
|
2020-01-04 03:58:56 +00:00
|
|
|
flex-direction: row;
|
|
|
|
flex-grow: 1;
|
|
|
|
justify-content: stretch;
|
|
|
|
overflow-y: auto;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2020-01-05 01:50:55 +00:00
|
|
|
.content-inner {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.releases {
|
|
|
|
padding: 1rem;
|
|
|
|
}
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
.sidebar {
|
|
|
|
height: 100%;
|
2020-01-05 00:07:32 +00:00
|
|
|
width: 18rem;
|
2020-01-04 03:58:56 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-01-05 00:07:32 +00:00
|
|
|
flex-shrink: 0;
|
|
|
|
border-right: solid 1px $shadow-hint;
|
2020-01-05 01:50:55 +00:00
|
|
|
color: $text-contrast;
|
2020-01-04 03:58:56 +00:00
|
|
|
overflow: hidden;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.sidebar .title {
|
|
|
|
border-bottom: solid 1px $shadow-hint;
|
|
|
|
}
|
|
|
|
|
2019-11-10 03:20:22 +00:00
|
|
|
.logo {
|
2020-01-04 03:58:56 +00:00
|
|
|
width: 100%;
|
2019-11-12 00:22:20 +00:00
|
|
|
max-height: 8rem;
|
2020-01-05 00:07:32 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
2019-11-12 00:22:20 +00:00
|
|
|
object-fit: contain;
|
2020-01-04 03:58:56 +00:00
|
|
|
box-sizing: border-box;
|
2020-01-05 00:07:32 +00:00
|
|
|
padding: 1rem;
|
2020-01-04 03:58:56 +00:00
|
|
|
margin: 0;
|
2020-01-05 00:07:32 +00:00
|
|
|
filter: $logo-shadow;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.header {
|
2020-01-05 01:50:55 +00:00
|
|
|
background: $profile;
|
2020-01-05 00:07:32 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 4rem;
|
|
|
|
display: none;
|
|
|
|
justify-content: center;
|
|
|
|
border-bottom: solid 1px $shadow-hint;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
2019-11-12 00:22:20 +00:00
|
|
|
|
2020-01-05 01:50:55 +00:00
|
|
|
.sites.compact {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.expand {
|
|
|
|
display: none;
|
|
|
|
padding: .5rem;
|
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: .9rem;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2019-11-12 00:22:20 +00:00
|
|
|
@media(max-width: $breakpoint) {
|
2020-01-05 00:07:32 +00:00
|
|
|
.header {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sites.compact {
|
|
|
|
display: flex;
|
2020-01-05 01:50:55 +00:00
|
|
|
|
|
|
|
&.expanded {
|
|
|
|
display: grid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.expand {
|
|
|
|
display: block;
|
2020-01-05 00:07:32 +00:00
|
|
|
}
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
.network {
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.logo {
|
|
|
|
max-width: 20rem;
|
|
|
|
height: 100%;
|
|
|
|
padding: .5rem;
|
2020-01-04 03:58:56 +00:00
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.sidebar {
|
|
|
|
display: none;
|
|
|
|
height: auto;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
2019-11-12 00:22:20 +00:00
|
|
|
}
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
</style>
|