2020-06-29 01:55:10 +00:00
|
|
|
<template>
|
|
|
|
<div class="children">
|
2020-12-30 01:23:43 +00:00
|
|
|
<div
|
2020-06-29 01:55:10 +00:00
|
|
|
v-for="child in entity.children"
|
|
|
|
:key="`child-${child.id}`"
|
2020-12-30 01:23:43 +00:00
|
|
|
class="tile-container"
|
|
|
|
>
|
|
|
|
<EntityTile
|
|
|
|
:entity="child"
|
|
|
|
@load="(event) => $emit('load', event)"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-06-29 01:55:10 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import EntityTile from './tile.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
EntityTile,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
entity: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
2024-02-09 21:30:38 +00:00
|
|
|
emits: ['load'],
|
2020-06-29 01:55:10 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2020-06-30 22:25:27 +00:00
|
|
|
@import 'theme';
|
|
|
|
|
2020-06-29 01:55:10 +00:00
|
|
|
.children {
|
|
|
|
display: flex;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 1rem;
|
2020-07-02 02:04:28 +00:00
|
|
|
margin: 0 1rem 0 0;
|
2020-06-29 01:55:10 +00:00
|
|
|
border-bottom: solid 1px var(--darken-hint);
|
2020-12-30 01:23:43 +00:00
|
|
|
|
|
|
|
.tile-container {
|
|
|
|
display: inline-block;
|
|
|
|
padding: 0 1rem 0 0;
|
|
|
|
}
|
2020-06-29 01:55:10 +00:00
|
|
|
|
|
|
|
.tile {
|
|
|
|
width: 15rem;
|
2021-04-04 19:52:19 +00:00
|
|
|
height: 6rem;
|
2020-06-29 01:55:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.expanded {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
|
|
|
|
grid-gap: 1rem;
|
2020-07-02 02:04:28 +00:00
|
|
|
margin: 0;
|
2020-06-29 01:55:10 +00:00
|
|
|
|
2021-02-03 19:00:42 +00:00
|
|
|
.tile-container {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
2020-06-29 01:55:10 +00:00
|
|
|
.tile {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-30 22:25:27 +00:00
|
|
|
|
|
|
|
@media(max-width: $breakpoint0) {
|
|
|
|
.children.expanded {
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
|
|
|
|
}
|
|
|
|
}
|
2020-06-29 01:55:10 +00:00
|
|
|
</style>
|