2019-11-16 02:33:36 +00:00
|
|
|
<template>
|
2020-05-17 23:22:56 +00:00
|
|
|
<div class="releases">
|
|
|
|
<h3
|
|
|
|
v-if="context"
|
|
|
|
class="heading"
|
|
|
|
><span class="range">{{ range }}</span> releases for '{{ context }}'</h3>
|
2019-11-16 02:33:36 +00:00
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
<ul
|
2020-06-28 02:22:19 +00:00
|
|
|
v-if="releases.length > 0"
|
2020-05-17 23:22:56 +00:00
|
|
|
:key="sfw"
|
|
|
|
v-lazy-container="{ selector: '.thumbnail' }"
|
|
|
|
class="nolist tiles"
|
|
|
|
>
|
|
|
|
<li
|
|
|
|
v-for="(release, index) in releases"
|
|
|
|
:key="`release-${release.id}`"
|
|
|
|
>
|
2020-08-12 01:30:20 +00:00
|
|
|
<SceneTile
|
2020-05-17 23:22:56 +00:00
|
|
|
:release="release"
|
|
|
|
:referer="referer"
|
|
|
|
:index="index"
|
|
|
|
/>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2020-01-11 04:31:04 +00:00
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
<span
|
|
|
|
v-if="releases.length === 0 && range !== 'all'"
|
|
|
|
class="empty"
|
|
|
|
>No {{ range }} releases</span>
|
2020-01-11 04:31:04 +00:00
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
<span
|
|
|
|
v-else-if="releases.length === 0"
|
|
|
|
class="empty"
|
|
|
|
>No recent or upcoming releases</span>
|
|
|
|
</div>
|
2019-11-16 02:33:36 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-08-12 01:30:20 +00:00
|
|
|
import SceneTile from './scene-tile.vue';
|
2019-11-16 02:33:36 +00:00
|
|
|
|
|
|
|
function range() {
|
2020-05-17 23:22:56 +00:00
|
|
|
return this.$route.params.range;
|
2019-11-16 02:33:36 +00:00
|
|
|
}
|
|
|
|
|
2020-05-08 23:10:07 +00:00
|
|
|
function sfw() {
|
2020-05-17 23:22:56 +00:00
|
|
|
return this.$store.state.ui.sfw;
|
2020-05-08 23:10:07 +00:00
|
|
|
}
|
|
|
|
|
2019-11-16 02:33:36 +00:00
|
|
|
export default {
|
2020-05-17 23:22:56 +00:00
|
|
|
components: {
|
2020-08-12 01:30:20 +00:00
|
|
|
SceneTile,
|
2020-05-17 23:22:56 +00:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
releases: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
|
|
|
context: {
|
|
|
|
type: String,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
referer: {
|
|
|
|
type: String,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
range,
|
|
|
|
sfw,
|
|
|
|
},
|
2019-11-16 02:33:36 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
|
|
|
|
.range {
|
|
|
|
text-transform: capitalize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-28 02:22:19 +00:00
|
|
|
.releases {
|
2020-09-09 02:22:43 +00:00
|
|
|
flex-grow: 1;
|
2020-06-28 02:22:19 +00:00
|
|
|
border-top: solid 1px var(--crease);
|
2020-06-29 23:52:17 +00:00
|
|
|
|
|
|
|
&.embedded {
|
|
|
|
border: none;
|
|
|
|
|
|
|
|
.tiles {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
}
|
2020-06-28 02:22:19 +00:00
|
|
|
}
|
|
|
|
|
2019-11-28 04:36:22 +00:00
|
|
|
.tiles {
|
2019-12-15 04:42:51 +00:00
|
|
|
width: 100%;
|
2019-11-16 02:33:36 +00:00
|
|
|
display: grid;
|
2020-04-27 02:00:16 +00:00
|
|
|
grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
|
2019-11-16 02:33:36 +00:00
|
|
|
grid-gap: 1rem;
|
2020-06-27 02:50:13 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 1rem;
|
2019-11-16 02:33:36 +00:00
|
|
|
}
|
|
|
|
|
2020-01-11 04:31:04 +00:00
|
|
|
.empty {
|
2020-06-28 02:22:19 +00:00
|
|
|
display: inline-block;
|
2020-06-27 02:50:13 +00:00
|
|
|
padding: 1rem;
|
2020-03-23 00:43:49 +00:00
|
|
|
color: var(--shadow-strong);
|
2020-01-11 04:31:04 +00:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2020-02-26 03:07:35 +00:00
|
|
|
@media(max-width: $breakpoint3) {
|
2019-11-28 04:36:22 +00:00
|
|
|
.tiles {
|
2020-04-27 02:00:16 +00:00
|
|
|
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
|
2019-11-28 04:36:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-27 02:00:16 +00:00
|
|
|
@media(max-width: $breakpoint2) {
|
2019-11-28 04:36:22 +00:00
|
|
|
.tiles {
|
2020-04-27 02:00:16 +00:00
|
|
|
grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
|
2019-11-16 02:33:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|