2019-11-16 02:33:36 +00:00
|
|
|
<template>
|
2019-11-28 04:36:22 +00:00
|
|
|
<div class="releases">
|
2019-11-16 02:33:36 +00:00
|
|
|
<h3
|
|
|
|
v-if="context"
|
|
|
|
class="heading"
|
|
|
|
><span class="range">{{ range }}</span> releases for '{{ context }}'</h3>
|
|
|
|
|
2019-11-28 04:36:22 +00:00
|
|
|
<ul class="nolist tiles">
|
2019-11-16 02:33:36 +00:00
|
|
|
<li
|
2020-03-23 00:43:49 +00:00
|
|
|
v-for="(release, index) in releases"
|
2019-11-16 02:33:36 +00:00
|
|
|
:key="`release-${release.id}`"
|
|
|
|
>
|
2020-02-10 00:27:13 +00:00
|
|
|
<ReleaseTile
|
|
|
|
:release="release"
|
|
|
|
:referer="referer"
|
2020-03-23 00:43:49 +00:00
|
|
|
:index="index"
|
2020-02-10 00:27:13 +00:00
|
|
|
/>
|
2019-11-16 02:33:36 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2020-01-11 04:31:04 +00:00
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="releases.length === 0 && range !== 'all'"
|
|
|
|
class="empty"
|
|
|
|
>No {{ range }} releases</span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-else-if="releases.length === 0"
|
|
|
|
class="empty"
|
|
|
|
>No recent or upcoming releases</span>
|
2019-11-16 02:33:36 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ReleaseTile from '../tile/release.vue';
|
|
|
|
|
|
|
|
function range() {
|
|
|
|
return this.$store.state.ui.range;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
ReleaseTile,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
releases: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
|
|
|
context: {
|
|
|
|
type: String,
|
|
|
|
default: null,
|
|
|
|
},
|
2020-02-10 00:27:13 +00:00
|
|
|
referer: {
|
|
|
|
type: String,
|
|
|
|
default: null,
|
|
|
|
},
|
2019-11-16 02:33:36 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
range,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
|
|
|
|
.range {
|
|
|
|
text-transform: capitalize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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-02-26 03:07:35 +00:00
|
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, .25fr));
|
2019-11-16 02:33:36 +00:00
|
|
|
grid-gap: 1rem;
|
|
|
|
}
|
|
|
|
|
2020-01-11 04:31:04 +00:00
|
|
|
.empty {
|
2020-03-23 00:43:49 +00:00
|
|
|
color: var(--shadow-strong);
|
2020-01-11 04:31:04 +00:00
|
|
|
font-weight: bold;
|
2020-04-02 01:11:00 +00:00
|
|
|
transition: color var(--theme-transition);
|
2020-01-11 04:31:04 +00:00
|
|
|
}
|
|
|
|
|
2019-11-28 04:36:22 +00:00
|
|
|
@media(max-width: $breakpoint4) {
|
2020-02-26 03:07:35 +00:00
|
|
|
.tiles {
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, .33fr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media(max-width: $breakpoint3) {
|
2019-11-28 04:36:22 +00:00
|
|
|
.tiles {
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, .5fr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-16 02:33:36 +00:00
|
|
|
@media(max-width: $breakpoint) {
|
2019-11-28 04:36:22 +00:00
|
|
|
.tiles {
|
2020-02-26 03:07:35 +00:00
|
|
|
grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
|
2019-11-16 02:33:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|