Add special class to content block
This commit is contained in:
parent
a2fd2b50c3
commit
47cb55930d
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-block">
|
<div class="content-block" :class="specialClass">
|
||||||
<h4>{{contentBlock.title}}</h4>
|
<h4>{{contentBlock.title}}</h4>
|
||||||
|
|
||||||
<component v-for="component in contentBlock.contents" :key="component.id" :is="component.type"
|
<component v-for="component in contentBlock.contents" :key="component.id" :is="component.type"
|
||||||
|
|
@ -25,14 +25,32 @@
|
||||||
'student_entry': StudentEntry,
|
'student_entry': StudentEntry,
|
||||||
'image_block': ImageBlock,
|
'image_block': ImageBlock,
|
||||||
Task
|
Task
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
specialClass() {
|
||||||
|
return `content-block--${this.contentBlock.type.toLowerCase()}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@import "@/styles/_variables.scss";
|
||||||
|
|
||||||
.content-block {
|
.content-block {
|
||||||
margin-bottom: 2.5em;
|
margin-bottom: 2.5em;
|
||||||
|
|
||||||
|
&--yellow {
|
||||||
|
background-color: rgba($color-accent-1, 0.15);
|
||||||
|
border: 1px solid $color-accent-1;
|
||||||
|
padding: 15px;
|
||||||
|
|
||||||
|
/deep/ .button {
|
||||||
|
border-color: $color-accent-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/deep/ p {
|
/deep/ p {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue