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"
|
2020-02-20 01:35:23 +00:00
|
|
|
:class="{ nosites: sites.length === 0 && networks.length === 0 }"
|
2020-01-06 23:30:51 +00:00
|
|
|
>
|
|
|
|
<div
|
2020-02-20 01:35:23 +00:00
|
|
|
v-show="sites.length > 0 || networks.length > 0"
|
2020-01-06 23:30:51 +00:00
|
|
|
class="sidebar"
|
2020-01-09 02:23:16 +00:00
|
|
|
:class="{ expanded }"
|
2020-01-06 23:30:51 +00:00
|
|
|
>
|
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"
|
2020-01-09 02:23:16 +00:00
|
|
|
:class="{ expanded }"
|
2020-01-05 00:07:32 +00:00
|
|
|
/>
|
2020-02-20 01:35:23 +00:00
|
|
|
|
|
|
|
<Network
|
|
|
|
v-for="childNetwork in networks"
|
|
|
|
:key="`network-${childNetwork.id}`"
|
|
|
|
:network="childNetwork"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Network
|
|
|
|
v-if="network.parent"
|
|
|
|
:network="network.parent"
|
|
|
|
class="parent"
|
|
|
|
/>
|
2020-01-05 00:07:32 +00:00
|
|
|
</div>
|
|
|
|
|
2020-02-20 01:35:23 +00:00
|
|
|
<template v-if="sites.length > 0 || networks.length > 0">
|
2020-01-09 17:46:41 +00:00
|
|
|
<span
|
|
|
|
v-show="!expanded"
|
|
|
|
class="expand expand-sidebar noselect"
|
|
|
|
@click="expanded = true"
|
|
|
|
><Icon icon="arrow-right3" /></span>
|
2020-01-09 02:23:16 +00:00
|
|
|
|
2020-01-09 17:46:41 +00:00
|
|
|
<span
|
|
|
|
v-show="expanded"
|
|
|
|
class="expand expand-sidebar noselect"
|
|
|
|
@click="expanded = false"
|
|
|
|
><Icon icon="arrow-left3" /></span>
|
|
|
|
</template>
|
2020-01-09 02:23:16 +00:00
|
|
|
|
2020-01-06 23:30:51 +00:00
|
|
|
<div
|
|
|
|
class="header"
|
2020-02-20 01:35:23 +00:00
|
|
|
:class="{ hideable: sites.length > 0 || networks.length > 0 }"
|
2020-01-06 23:30:51 +00:00
|
|
|
>
|
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>
|
2020-01-09 02:23:16 +00:00
|
|
|
</div>
|
2020-01-09 01:40:02 +00:00
|
|
|
|
2020-01-09 02:23:16 +00:00
|
|
|
<div class="content-inner">
|
2020-02-20 01:35:23 +00:00
|
|
|
<template v-if="sites.length > 0 || networks.length > 0">
|
2020-01-09 14:47:45 +00:00
|
|
|
<span
|
|
|
|
v-show="expanded"
|
|
|
|
class="expand collapse-header noselect"
|
|
|
|
@click="expanded = false"
|
|
|
|
><Icon icon="arrow-up3" /></span>
|
|
|
|
|
|
|
|
<Sites
|
|
|
|
:sites="sites"
|
|
|
|
:class="{ expanded }"
|
2020-01-24 22:36:06 +00:00
|
|
|
class="compact"
|
2020-01-09 14:47:45 +00:00
|
|
|
/>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-show="!expanded"
|
|
|
|
class="expand expand-header noselect"
|
|
|
|
@click="expanded = true"
|
|
|
|
><Icon icon="arrow-down3" /></span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-show="expanded"
|
|
|
|
class="expand expand-header noselect"
|
|
|
|
@click="expanded = false"
|
|
|
|
><Icon icon="arrow-up3" /></span>
|
|
|
|
</template>
|
2020-01-09 01:40:02 +00:00
|
|
|
|
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';
|
2020-02-20 01:35:23 +00:00
|
|
|
import Network from '../tile/network.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,
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
2020-02-20 01:35:23 +00:00
|
|
|
this.networks = this.network.networks;
|
2019-11-14 04:13:38 +00:00
|
|
|
this.sites = this.network.sites
|
2020-02-02 04:14:58 +00:00
|
|
|
.filter(site => !site.independent);
|
2019-11-12 00:22:20 +00:00
|
|
|
|
2020-01-08 23:23:37 +00:00
|
|
|
this.releases = this.network.releases;
|
2020-01-02 23:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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,
|
2020-02-20 01:35:23 +00:00
|
|
|
Network,
|
2019-11-10 03:20:22 +00:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
network: null,
|
2020-01-06 04:19:38 +00:00
|
|
|
sites: [],
|
2020-02-20 01:35:23 +00:00
|
|
|
networks: [],
|
2020-01-06 04:19:38 +00:00
|
|
|
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 {
|
2020-01-11 04:31:04 +00:00
|
|
|
padding: 1rem 1rem 1rem .5rem;
|
2020-01-05 01:50:55 +00:00
|
|
|
}
|
|
|
|
|
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-09 02:23:16 +00:00
|
|
|
.title {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
border-bottom: solid 1px $highlight-hint;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.expanded {
|
|
|
|
width: calc(100% - 25rem);
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
max-width: 18rem;
|
|
|
|
}
|
|
|
|
}
|
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-02-20 01:35:23 +00:00
|
|
|
.parent {
|
|
|
|
display: inline-block;
|
|
|
|
height: 3rem;
|
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.header {
|
|
|
|
width: 100%;
|
2020-01-06 23:30:51 +00:00
|
|
|
display: flex;
|
2020-01-09 02:23:16 +00:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2020-01-09 00:59:30 +00:00
|
|
|
flex-shrink: 0;
|
2020-01-05 00:07:32 +00:00
|
|
|
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;
|
2020-01-09 02:23:16 +00:00
|
|
|
max-height: 3rem;
|
2020-01-06 23:30:51 +00:00
|
|
|
padding: .5rem;
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
2019-11-12 00:22:20 +00:00
|
|
|
|
2020-01-24 22:36:06 +00:00
|
|
|
.sites.compact {
|
2020-01-09 14:47:45 +00:00
|
|
|
display: none;
|
2020-01-05 02:02:02 +00:00
|
|
|
background: $profile;
|
2020-01-24 22:36:06 +00:00
|
|
|
grid-row: 1;
|
2020-01-05 01:50:55 +00:00
|
|
|
}
|
|
|
|
|
2020-01-24 22:36:06 +00:00
|
|
|
.collapse-header {
|
2020-01-05 01:50:55 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-09 14:47:45 +00:00
|
|
|
.expand-header,
|
|
|
|
.collapse-header {
|
2020-01-09 01:40:02 +00:00
|
|
|
display: flex;
|
2020-01-05 00:07:32 +00:00
|
|
|
}
|
|
|
|
|
2020-01-09 02:23:16 +00:00
|
|
|
.expand-sidebar,
|
|
|
|
.collapse-sidebar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
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>
|