Add subtitle to contentblock, style instrument widget
This commit is contained in:
parent
695a9a8ccb
commit
ecba0d84bc
|
|
@ -12,6 +12,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p v-if="subtitle !== ''" class="content-block__subtitle text-regular">{{subtitle}}</p>
|
||||||
<h4 class="content-block__title">{{contentBlock.title}}</h4>
|
<h4 class="content-block__title">{{contentBlock.title}}</h4>
|
||||||
|
|
||||||
<component v-for="component in contentBlock.contents"
|
<component v-for="component in contentBlock.contents"
|
||||||
|
|
@ -51,6 +52,11 @@
|
||||||
import CHAPTER_QUERY from '@/graphql/gql/chapterQuery.gql';
|
import CHAPTER_QUERY from '@/graphql/gql/chapterQuery.gql';
|
||||||
import DELETE_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/deleteContentBlock.gql';
|
import DELETE_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/deleteContentBlock.gql';
|
||||||
|
|
||||||
|
const INSTRUMENTS = {
|
||||||
|
base_communication: 'Sprache & Kommunikation',
|
||||||
|
base_society: 'Gesellschaft'
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['contentBlock', 'parent'],
|
props: ['contentBlock', 'parent'],
|
||||||
|
|
||||||
|
|
@ -79,6 +85,14 @@
|
||||||
computed: {
|
computed: {
|
||||||
specialClass() {
|
specialClass() {
|
||||||
return `content-block--${this.contentBlock.type.toLowerCase()}`
|
return `content-block--${this.contentBlock.type.toLowerCase()}`
|
||||||
|
},
|
||||||
|
subtitle() {
|
||||||
|
const contentType = this.contentBlock.type.toLowerCase()
|
||||||
|
if (!(contentType in INSTRUMENTS)) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
|
return `Instrument - ${INSTRUMENTS[contentType]}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -134,6 +148,10 @@
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__subtitle {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
&__actions {
|
&__actions {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -70px;
|
left: -70px;
|
||||||
|
|
@ -146,12 +164,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&--base_communication {
|
&--base_communication {
|
||||||
@include content-box($color-accent-1);
|
@include content-box($color-accent-1-list);
|
||||||
|
|
||||||
|
.content-block__subtitle {
|
||||||
|
color: $color-accent-1-dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--task {
|
&--task {
|
||||||
@include light-border(bottom);
|
@include light-border(bottom);
|
||||||
|
|
||||||
.content-block__title {
|
.content-block__title {
|
||||||
color: $color-brand;
|
color: $color-brand;
|
||||||
margin-top: $default-padding;
|
margin-top: $default-padding;
|
||||||
|
|
@ -163,7 +185,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&--base_society {
|
&--base_society {
|
||||||
@include content-box($color-accent-2);
|
@include content-box($color-accent-2-list);
|
||||||
|
|
||||||
|
.content-block__subtitle {
|
||||||
|
color: $color-accent-2-dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ p {
|
/deep/ p {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="instrument-widget">
|
<div class="instrument-widget">
|
||||||
<div class="instrument-widget__description" v-html="value.description"></div>
|
<div class="instrument-widget__description" v-html="value.description"></div>
|
||||||
<router-link class="instrument-widget__button button" tag="button"
|
<router-link class="instrument-widget__button button" tag="button"
|
||||||
:to="{name: 'instrument', params: { slug: value.slug }}">Instrument lesen
|
:to="{name: 'instrument', params: { slug: value.slug }}">Instrument anzeigen
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -57,14 +57,14 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin content-box($main-color) {
|
@mixin content-box($color-list) {
|
||||||
background-color: rgba($main-color, 0.15);
|
background-color: nth($color-list, 2);
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
border-radius: $default-border-radius;
|
border-radius: $default-border-radius;
|
||||||
|
|
||||||
/deep/ .button {
|
/deep/ .button {
|
||||||
border-color: $main-color;
|
border-color: nth($color-list, 1);
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,3 +72,13 @@ input, textarea, select, button {
|
||||||
margin-bottom: 7.5px;
|
margin-bottom: 7.5px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-regular {
|
||||||
|
font-family: $sans-serif-font-family;
|
||||||
|
font-weight: $font-weight-regular;
|
||||||
|
font-size: toRem(18px);
|
||||||
|
|
||||||
|
&--small {
|
||||||
|
font-size: toRem(16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ $color-accent-5-dark: #09496F;
|
||||||
$color-accent-5: #004E7C;
|
$color-accent-5: #004E7C;
|
||||||
$color-accent-5: #DBE6EC;
|
$color-accent-5: #DBE6EC;
|
||||||
|
|
||||||
|
$color-accent-1-list: $color-accent-1 $color-accent-1-light $color-accent-1-dark;
|
||||||
|
$color-accent-2-list: $color-accent-2 $color-accent-2-light $color-accent-2-dark;
|
||||||
|
|
||||||
/* brand */
|
/* brand */
|
||||||
$color-brand-dark: #138E72;
|
$color-brand-dark: #138E72;
|
||||||
$color-brand: #17A887;
|
$color-brand: #17A887;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue