Fix linting error
This commit is contained in:
parent
d3b51b1006
commit
106bad4c52
|
|
@ -5,19 +5,20 @@
|
||||||
v-if="module.id"
|
v-if="module.id"
|
||||||
>
|
>
|
||||||
<div class="module__header">
|
<div class="module__header">
|
||||||
|
<h2
|
||||||
|
class="module__meta-title"
|
||||||
|
id="meta-title"
|
||||||
|
>
|
||||||
|
{{ module.metaTitle }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
<h2
|
<div
|
||||||
class="module__meta-title"
|
class="module__categoryindicators"
|
||||||
id="meta-title"
|
v-if="$flavor.showModuleFilter"
|
||||||
>
|
>
|
||||||
{{ module.metaTitle }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="module__categoryindicators" v-if="$flavor.showModuleFilter">
|
|
||||||
<pill :text="module.level?.name"></pill>
|
<pill :text="module.level?.name"></pill>
|
||||||
<pill :text="module.category?.name"></pill>
|
<pill :text="module.category?.name"></pill>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1
|
<h1
|
||||||
|
|
@ -66,7 +67,7 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="module__objective-groups"
|
class="module__objective-groups"
|
||||||
v-if="module.objectiveGroups.length"
|
v-if="module.objectiveGroups.length && showObjectives() || true"
|
||||||
>
|
>
|
||||||
<objective-groups
|
<objective-groups
|
||||||
:groups="languageCommunicationObjectiveGroups"
|
:groups="languageCommunicationObjectiveGroups"
|
||||||
|
|
@ -95,127 +96,131 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ObjectiveGroups from '@/components/objective-groups/ObjectiveGroups.vue';
|
import ObjectiveGroups from '@/components/objective-groups/ObjectiveGroups.vue';
|
||||||
import Chapter from '@/components/Chapter.vue';
|
import Chapter from '@/components/Chapter.vue';
|
||||||
import BookmarkActions from '@/components/notes/BookmarkActions.vue';
|
import BookmarkActions from '@/components/notes/BookmarkActions.vue';
|
||||||
import Pill from "@/components/ui/Pill.vue";
|
import Pill from '@/components/ui/Pill.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
module: {
|
module: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Pill,
|
Pill,
|
||||||
BookmarkActions,
|
BookmarkActions,
|
||||||
ObjectiveGroups,
|
ObjectiveGroups,
|
||||||
Chapter,
|
Chapter,
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
languageCommunicationObjectiveGroups() {
|
languageCommunicationObjectiveGroups() {
|
||||||
return this.module.objectiveGroups
|
return this.module.objectiveGroups
|
||||||
? this.module.objectiveGroups.filter((group) => group.title.toLowerCase() === 'language_communication')
|
? this.module.objectiveGroups.filter((group) => group.title.toLowerCase() === 'language_communication')
|
||||||
: [];
|
: [];
|
||||||
},
|
|
||||||
societyObjectiveGroups() {
|
|
||||||
return this.module.objectiveGroups
|
|
||||||
? this.module.objectiveGroups.filter((group) => group.title.toLowerCase() === 'society')
|
|
||||||
: [];
|
|
||||||
},
|
|
||||||
interdisciplinaryObjectiveGroups() {
|
|
||||||
return this.module.objectiveGroups
|
|
||||||
? this.module.objectiveGroups.filter((group) => group.title.toLowerCase() === 'interdisciplinary')
|
|
||||||
: [];
|
|
||||||
},
|
|
||||||
note() {
|
|
||||||
if (!(this.module && this.module.bookmark)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return this.module.bookmark.note;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
societyObjectiveGroups() {
|
||||||
|
return this.module.objectiveGroups
|
||||||
|
? this.module.objectiveGroups.filter((group) => group.title.toLowerCase() === 'society')
|
||||||
|
: [];
|
||||||
|
},
|
||||||
|
interdisciplinaryObjectiveGroups() {
|
||||||
|
return this.module.objectiveGroups
|
||||||
|
? this.module.objectiveGroups.filter((group) => group.title.toLowerCase() === 'interdisciplinary')
|
||||||
|
: [];
|
||||||
|
},
|
||||||
|
note() {
|
||||||
|
if (!(this.module && this.module.bookmark)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return this.module.bookmark.note;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showObjectives() {
|
||||||
|
return this.$route && this.$route.query["show-objectives"] !== undefined;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import 'styles/helpers';
|
@import 'styles/helpers';
|
||||||
|
|
||||||
.module {
|
.module {
|
||||||
|
display: flex;
|
||||||
|
justify-self: center;
|
||||||
|
max-width: 100vw;
|
||||||
|
|
||||||
|
padding: $large-spacing 0;
|
||||||
|
@include desktop {
|
||||||
|
width: 800px;
|
||||||
|
padding: $large-spacing 15px;
|
||||||
|
}
|
||||||
|
flex-direction: column;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
&__hero {
|
||||||
|
margin-bottom: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__hero-image {
|
||||||
|
max-width: 100%;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__hero-source {
|
||||||
|
@include tiny-text;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-self: center;
|
justify-content: flex-start;
|
||||||
max-width: 100vw;
|
align-items: stretch;
|
||||||
|
margin-bottom: $small-spacing;
|
||||||
|
}
|
||||||
|
|
||||||
padding: $large-spacing 0;
|
&__meta-title {
|
||||||
@include desktop {
|
@include meta-title;
|
||||||
width: 800px;
|
margin-right: $medium-spacing;
|
||||||
padding: $large-spacing 15px;
|
}
|
||||||
}
|
|
||||||
flex-direction: column;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
&__hero {
|
&__intro-wrapper {
|
||||||
margin-bottom: 35px;
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__intro {
|
||||||
|
> :deep(p) {
|
||||||
|
margin-bottom: $large-spacing;
|
||||||
|
@include lead-paragraph;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__hero-image {
|
> :deep(ul) {
|
||||||
max-width: 100%;
|
@include list-parent;
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__hero-source {
|
> li {
|
||||||
@include tiny-text;
|
@include list-child;
|
||||||
line-height: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: stretch;
|
|
||||||
margin-bottom: $small-spacing;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__meta-title {
|
|
||||||
@include meta-title;
|
|
||||||
margin-right: $medium-spacing;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
&__intro-wrapper {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__intro {
|
|
||||||
> :deep(p) {
|
|
||||||
margin-bottom: $large-spacing;
|
|
||||||
@include lead-paragraph;
|
@include lead-paragraph;
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> :deep(ul) {
|
|
||||||
@include list-parent;
|
|
||||||
|
|
||||||
> li {
|
|
||||||
@include list-child;
|
|
||||||
@include lead-paragraph;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&__bookmark-actions {
|
|
||||||
margin-top: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__objective-groups {
|
|
||||||
margin-bottom: 2 * $large-spacing;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__bookmark-actions {
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__objective-groups {
|
||||||
|
margin-bottom: 2 * $large-spacing;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue