91 lines
1.9 KiB
Vue
91 lines
1.9 KiB
Vue
<template>
|
|
<div class="section-block" @click="navigate()" :class="{'section-block--navigatable': route}">
|
|
<slot></slot>
|
|
<div class="section-block__title block-title">
|
|
<h2 class="block-title__title">{{title}}</h2>
|
|
<h3 class="block-title__subtitle small-emph">{{subtitle}}</h3>
|
|
</div>
|
|
<div class="section-block__content section-content">
|
|
<div class="section-content__subsection subsection">
|
|
<a class="subsection__content button button--primary small-emph" v-if="route">
|
|
{{linkText}}
|
|
</a>
|
|
<span class="subsection__content subsection__content--disabled" v-if="!route">Noch nicht verfügbar</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: ['title', 'subtitle', 'route', 'link-text'],
|
|
methods: {
|
|
navigate() {
|
|
if (this.route) {
|
|
this.$router.push(this.route);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import "@/styles/_variables.scss";
|
|
@import "@/styles/_functions.scss";
|
|
|
|
.section-block {
|
|
border-radius: $default-border-radius;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
text-align: center;
|
|
|
|
&--navigatable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
&__title {
|
|
padding: 20px;
|
|
}
|
|
}
|
|
|
|
.block-title {
|
|
&__title, &__subtitle {
|
|
color: $color-darkgrey-1;
|
|
font-family: $sans-serif-font-family;
|
|
}
|
|
|
|
&__title {
|
|
font-size: toRem(29px);
|
|
text-transform: uppercase;
|
|
margin-bottom: 8px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
&__subtitle {
|
|
font-size: toRem(14px);
|
|
font-weight: 500;
|
|
min-height: 2rem;
|
|
}
|
|
}
|
|
|
|
.section-content {
|
|
padding: 15px 15px 15px;
|
|
|
|
&__subsection {
|
|
padding-bottom: 15px;
|
|
}
|
|
}
|
|
|
|
.subsection {
|
|
&__content {
|
|
font-family: $sans-serif-font-family;
|
|
font-weight: 600;
|
|
|
|
&--disabled {
|
|
color: $color-grey;
|
|
}
|
|
}
|
|
}
|
|
|
|
</style>
|