72 lines
1.2 KiB
Vue
72 lines
1.2 KiB
Vue
<template>
|
|
<div class="sites">
|
|
<ul class="nolist tiles">
|
|
<li
|
|
v-for="site in sites"
|
|
:key="`site-${site.id}`"
|
|
>
|
|
<SiteTile :site="site" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import SiteTile from '../tile/site.vue';
|
|
|
|
export default {
|
|
components: {
|
|
SiteTile,
|
|
},
|
|
props: {
|
|
network: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
sites: {
|
|
type: Array,
|
|
default: () => [],
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import 'theme';
|
|
|
|
.sites {
|
|
overflow: hidden;
|
|
display: flex;
|
|
|
|
&.compact:not(.expanded) {
|
|
flex-direction: row;
|
|
|
|
.tiles {
|
|
display: flex;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.tile {
|
|
width: 15rem;
|
|
margin: 0 1rem 0 0;
|
|
}
|
|
}
|
|
|
|
&.expanded {
|
|
.tiles {
|
|
grid-template-columns: repeat(auto-fit, minmax(15rem, .5fr));
|
|
}
|
|
}
|
|
}
|
|
|
|
.tiles {
|
|
display: grid;
|
|
grid-gap: 1rem;
|
|
flex-grow: 1;
|
|
padding: 1rem;
|
|
margin: 0;
|
|
grid-template-columns: 1fr;
|
|
overflow-y: auto;
|
|
}
|
|
</style>
|