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
|
|
|
|
v-for="release in releases"
|
|
|
|
:key="`release-${release.id}`"
|
|
|
|
>
|
|
|
|
<ReleaseTile :release="release" />
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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-11-16 02:33:36 +00:00
|
|
|
display: grid;
|
2019-11-28 04:36:22 +00:00
|
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, .33fr));
|
2019-11-16 02:33:36 +00:00
|
|
|
grid-gap: 1rem;
|
|
|
|
}
|
|
|
|
|
2019-11-28 04:36:22 +00:00
|
|
|
@media(max-width: $breakpoint4) {
|
|
|
|
.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 {
|
2019-11-16 02:33:36 +00:00
|
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|