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-06 23:30:51 +00:00
|
|
|
<div
|
|
|
|
class="network"
|
|
|
|
:class="{ nosites: sites.length === 0 }"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-show="sites.length > 0"
|
|
|
|
class="sidebar"
|
|
|
|
>
|
2019-11-12 00:22:20 +00:00
|
|
|
<a
|
2020-01-05 02:27:26 +00:00
|
|
|
v-tooltip.bottom="`Go to ${network.url}`"
|
2019-11-12 00:22:20 +00:00
|
|
|
: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>
|
|
|
|
|
2020-01-06 23:30:51 +00:00
|
|
|
<div
|
|
|
|
class="header"
|
|
|
|
:class="{ hideable: sites.length > 0 }"
|
|
|
|
>
|
2020-01-05 00:07:32 +00:00
|
|
|
<a
|
2020-01-05 02:27:26 +00:00
|
|
|
v-tooltip.bottom="`Go to ${network.url}`"
|
2020-01-05 00:07:32 +00:00
|
|
|
: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 02:27:26 +00:00
|
|
|
<Sites
|
2020-01-05 00:07:32 +00:00
|
|
|
v-if="sites.length"
|
2020-01-05 02:27:26 +00:00
|
|
|
:sites="sites"
|
2020-01-05 00:07:32 +00:00
|
|
|
class="compact"
|
2020-01-05 02:27:26 +00:00
|
|
|
:class="{ expanded }"
|
|
|
|
/>
|
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
|
|
|
|
2020-01-06 04:19:38 +00:00
|
|
|
if (this.network.studios) {
|
|
|
|
this.studios = this.network.studios.map(studio => ({
|
|
|
|
...studio,
|
|
|
|
network: this.network,
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
2019-11-14 04:13:38 +00:00
|
|
|
this.sites = this.network.sites
|
|
|
|
.filter(site => !site.independent)
|
2020-01-06 20:49:37 +00:00
|
|
|
// .concat(this.studios)
|
2019-11-14 04:13:38 +00:00
|
|
|
.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,
|
2020-01-06 04:19:38 +00:00
|
|
|
sites: [],
|
|
|
|
studios: [],
|
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>
|
|
|
|
|
|
|
|
<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;
|
2020-01-06 23:30:51 +00:00
|
|
|
|
|
|
|
&.nosites {
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
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 {
|
2020-01-05 02:02:02 +00:00
|
|
|
background: $profile;
|
2020-01-04 03:58:56 +00:00
|
|
|
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;
|
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 {
|
2020-01-05 02:02:02 +00:00
|
|
|
border-bottom: solid 1px $highlight-hint;
|
2020-01-05 00:07:32 +00:00
|
|
|
}
|
|
|
|
|
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-05 02:27:26 +00:00
|
|
|
filter: $logo-highlight;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.header {
|
|
|
|
width: 100%;
|
2020-01-06 04:19:38 +00:00
|
|
|
height: 3rem;
|
2020-01-06 23:30:51 +00:00
|
|
|
display: flex;
|
2020-01-06 04:19:38 +00:00
|
|
|
flex-shrink: 0;
|
2020-01-05 00:07:32 +00:00
|
|
|
justify-content: center;
|
|
|
|
border-bottom: solid 1px $shadow-hint;
|
2020-01-06 04:19:38 +00:00
|
|
|
background: $profile;
|
2020-01-06 23:30:51 +00:00
|
|
|
|
|
|
|
&.hideable {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
max-width: 20rem;
|
|
|
|
height: 100%;
|
|
|
|
padding: .5rem;
|
|
|
|
}
|
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;
|
2020-01-05 02:02:02 +00:00
|
|
|
background: $profile;
|
|
|
|
grid-row: 1;
|
2020-01-05 01:50:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.expand {
|
|
|
|
display: none;
|
2020-01-05 02:02:02 +00:00
|
|
|
color: $text-contrast;
|
|
|
|
background: $profile;
|
2020-01-05 01:50:55 +00:00
|
|
|
padding: .5rem;
|
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: .9rem;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2020-01-07 03:23:28 +00:00
|
|
|
@media(max-width: $breakpoint3) {
|
2020-01-06 23:30:51 +00:00
|
|
|
.header,
|
|
|
|
.header.hideable {
|
2020-01-05 00:07:32 +00:00
|
|
|
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
|
|
|
.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>
|