<template>
    <a
        :href="`/site/${site.slug}`"
        class="tile"
    >
        <h3 class="title">
            <object
                :data="`/img/sites/${site.slug}.png`"
                type="image/png"
                class="logo"
            >{{ site.name }}</object>
        </h3>
    </a>
</template>

<script>
export default {
    props: {
        site: {
            type: Object,
            default: null,
        },
    },
};
</script>

<style lang="scss" scoped>
@import 'theme';

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 1rem;
    border-radius: .25rem;
    box-shadow: 0 0 3px rgba(0, 0, 0, .25);
    height: 100%;
    text-align: center;
}

.link {
    text-decoration: none;
}

.logo {
    width: 100%;
    height: 4rem;
    object-fit: contain;
}

.title {
    color: $text;
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 1rem;
}
</style>