traxxx/assets/components/tile/network.vue

68 lines
981 B
Vue

<template>
<a
:href="`/network/${network.slug}`"
:title="network.name"
class="tile"
:class="{ sfw }"
>
<img
:src="`/img/logos/${network.slug}/thumbs/network.png`"
:alt="network.name"
class="logo lazy"
>
</a>
</template>
<script>
function sfw() {
return this.$store.state.ui.sfw;
}
export default {
props: {
network: {
type: Object,
default: null,
},
},
computed: {
sfw,
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
height: 6rem;
background: var(--profile);
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: .5rem 1rem;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
text-align: center;
}
.link {
text-decoration: none;
}
.logo {
max-width: 100%;
max-height: 100%;
font-size: 1rem;
}
.title {
color: var(--text);
height: 100%;
display: flex;
align-items: center;
margin: 0;
}
</style>