Add some styling for filter group headers
This commit is contained in:
parent
8117a6b4c0
commit
e1a87739df
|
|
@ -1,22 +1,41 @@
|
||||||
<template>
|
<template>
|
||||||
<a class="filter-entry">
|
<a
|
||||||
<span class="filter-entry__text">{{ text }}</span><chevron-right class="filter-entry__icon" />
|
:class="typeClass"
|
||||||
|
class="filter-entry">
|
||||||
|
<span class="filter-entry__text">{{ text }}</span>
|
||||||
|
<chevron-right class="filter-entry__icon"/>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ChevronRight from '@/components/icons/ChevronRight';
|
import ChevronRight from '@/components/icons/ChevronRight';
|
||||||
|
import {INTERDISCIPLINARY, LANGUAGE_COMMUNICATION, SOCIETY} from '@/consts/instrument.consts';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
text: {
|
text: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
}
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
ChevronRight
|
ChevronRight,
|
||||||
}
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
typeClass() {
|
||||||
|
return {
|
||||||
|
'filter-entry--language-communication': this.type === LANGUAGE_COMMUNICATION,
|
||||||
|
'filter-entry--society': this.type === SOCIETY,
|
||||||
|
'filter-entry--interdisciplinary': this.type === INTERDISCIPLINARY,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -31,11 +50,24 @@
|
||||||
&__text {
|
&__text {
|
||||||
@include sub-heading;
|
@include sub-heading;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__icon {
|
&__icon {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--language-communication {
|
||||||
|
color: $color-accent-2-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--society {
|
||||||
|
color: $color-accent-1-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--interdisciplinary {
|
||||||
|
color: $color-accent-4-dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
<filter-entry
|
<filter-entry
|
||||||
:text="title"
|
:text="title"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
:type="type"
|
||||||
@click.native="$emit('click')"/>
|
@click.native="$emit('click')"/>
|
||||||
<div class="filter-group__children">
|
<div class="filter-group__children">
|
||||||
|
|
||||||
|
|
@ -30,6 +31,10 @@
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {FilterEntry, ChevronRight},
|
components: {FilterEntry, ChevronRight},
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
|
@ -40,7 +45,7 @@
|
||||||
@import '~styles/helpers';
|
@import '~styles/helpers';
|
||||||
|
|
||||||
.filter-group {
|
.filter-group {
|
||||||
border-bottom: 1px solid black;
|
border-bottom: 1px solid $color-silver;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,17 @@
|
||||||
|
|
||||||
<filter-group
|
<filter-group
|
||||||
:types="languageCommunicationTypes"
|
:types="languageCommunicationTypes"
|
||||||
|
:type="LANGUAGE_COMMUNICATION"
|
||||||
title="Sprache und Kommunikation"
|
title="Sprache und Kommunikation"
|
||||||
data-cy="filter-language-communication"
|
data-cy="filter-language-communication"
|
||||||
|
class="instrument-filter__group--language"
|
||||||
@filter="setFilter($event)"
|
@filter="setFilter($event)"
|
||||||
@click="setFilter(i=>i.type.category===LANGUAGE_COMMUNICATION)"
|
@click="setFilter(i=>i.type.category===LANGUAGE_COMMUNICATION)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<filter-group
|
<filter-group
|
||||||
:types="societyTypes"
|
:types="societyTypes"
|
||||||
|
:type="SOCIETY"
|
||||||
title="Gesellschaft"
|
title="Gesellschaft"
|
||||||
data-cy="filter-society"
|
data-cy="filter-society"
|
||||||
@filter="setFilter($event)"
|
@filter="setFilter($event)"
|
||||||
|
|
@ -22,6 +25,7 @@
|
||||||
|
|
||||||
<filter-group
|
<filter-group
|
||||||
:types="interdisciplinaryTypes"
|
:types="interdisciplinaryTypes"
|
||||||
|
:type="INTERDISCIPLINARY"
|
||||||
title="Überfachliche Instrumente"
|
title="Überfachliche Instrumente"
|
||||||
data-cy="filter-interdisciplinary"
|
data-cy="filter-interdisciplinary"
|
||||||
@filter="setFilter($event)"
|
@filter="setFilter($event)"
|
||||||
|
|
@ -87,26 +91,5 @@
|
||||||
.instrument-filter {
|
.instrument-filter {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
//align-content: center;
|
|
||||||
|
|
||||||
&__checkbox {
|
|
||||||
&--language {
|
|
||||||
/deep/ input:checked + .checkbox {
|
|
||||||
background-color: $color-accent-1-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&--society {
|
|
||||||
/deep/ input:checked + .checkbox {
|
|
||||||
background-color: $color-accent-2-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&--interdisciplinary {
|
|
||||||
/deep/ input:checked + .checkbox {
|
|
||||||
background-color: $color-accent-4-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,9 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
//grid-template-rows: auto auto 1fr;
|
//grid-template-rows: auto auto 1fr;
|
||||||
grid-template-columns: 300px auto;
|
grid-template-columns: 300px auto;
|
||||||
|
grid-column-gap: $small-spacing;
|
||||||
//@include centered(800px);
|
//@include centered(800px);
|
||||||
|
padding: 0 $small-spacing;
|
||||||
|
|
||||||
&__filter {
|
&__filter {
|
||||||
|
|
||||||
|
|
@ -76,6 +78,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__list-item {
|
&__list-item {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue