Clean up code

This commit is contained in:
Ramon Wenger 2021-02-22 14:29:21 +01:00
parent fae3043c3b
commit 322d7725f2
4 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,7 @@
:data-scrollto="chapter.id"
class="chapter">
<div
:class="{'hideable-element--hidden': titleGreyedOut}"
:class="{'hideable-element--greyed-out': titleGreyedOut}"
class="hideable-element"
v-if="!titleHidden">
<h3
@ -26,7 +26,7 @@
@bookmark="bookmark(!chapter.bookmark)"
/>
<div
:class="{'hideable-element--hidden': descriptionGreyedOut}"
:class="{'hideable-element--greyed-out': descriptionGreyedOut}"
class="chapter__intro intro hideable-element"
v-if="!descriptionHidden"
>
@ -97,10 +97,9 @@ export default {
}));
},
note() {
if (!(this.chapter && this.chapter.bookmark)) {
return;
if (this.chapter && this.chapter.bookmark) {
return this.chapter.bookmark.note;
}
return this.chapter.bookmark.note;
},
titleGreyedOut() {
return this.textHidden(CHAPTER_TITLE_TYPE) && this.editModule;

View File

@ -1,6 +1,6 @@
<template>
<div
:class="{'hideable-element--hidden': hidden}"
:class="{'hideable-element--greyed-out': hidden}"
class="content-block__container hideable-element">
<div
:class="specialClass"

View File

@ -1,6 +1,6 @@
<template>
<li
:class="{'hideable-element--hidden': hidden}"
:class="{'hideable-element--greyed-out': hidden}"
class="objective hideable-element"
v-if="editModule || !hidden">
<visibility-action

View File

@ -1,7 +1,7 @@
.hideable-element {
position: relative;
&--hidden {
&--greyed-out {
&::before {
content: '';
position: absolute;