Refactor code

This commit is contained in:
Ramon Wenger 2019-07-10 17:16:45 +02:00 committed by Christian Cueni
parent e1936a33b1
commit 0ef9298c19
1 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@
</a>
</div>
<h3 v-if="subtitle !== ''" class="content-block__subtitle text-regular">{{subtitle}}</h3>
<h3 v-if="instrumentLabel !== ''" class="content-block__instrument-label text-regular">{{instrumentLabel}}</h3>
<h4 class="content-block__title">{{contentBlock.title}}</h4>
<component v-for="component in contentBlock.contents"
@ -86,7 +86,7 @@
specialClass() {
return `content-block--${this.contentBlock.type.toLowerCase()}`
},
subtitle() {
instrumentLabel() {
const contentType = this.contentBlock.type.toLowerCase()
if (!(contentType in instruments)) {
return ''
@ -148,8 +148,8 @@
line-height: 1.5;
}
&__subtitle {
margin-bottom: 0 !important;
&__instrument-label {
margin-bottom: 0;
}
&__actions {
@ -166,7 +166,7 @@
&--base_communication {
@include content-box($color-accent-1-list);
.content-block__subtitle {
.content-block__instrument-label {
color: $color-accent-1-dark;
}
}
@ -187,7 +187,7 @@
&--base_society {
@include content-box($color-accent-2-list);
.content-block__subtitle {
.content-block__instrument-label {
color: $color-accent-2-dark;
}
}