Lint some code

This commit is contained in:
Ramon Wenger 2022-01-19 11:45:55 +01:00
parent b0a6525dd4
commit 88f1db7bfc
6 changed files with 34 additions and 25 deletions

View File

@ -1,14 +1,14 @@
<template> <template>
<a <a
class="add-content-link" class="add-content-link"
@click="$emit('click')"><plus-icon class="add-content-link__icon"/> <span class="add-content-link__text">Neuer Inhalt</span></a> @click="$emit('click')"
><plus-icon class="add-content-link__icon" /> <span class="add-content-link__text">Neuer Inhalt</span></a>
</template> </template>
<script> <script>
import Cross from '@/components/icons/Cross';
import PlusIcon from '@/components/icons/PlusIcon'; import PlusIcon from '@/components/icons/PlusIcon';
export default { export default {
components: {PlusIcon, Cross} components: { PlusIcon }
// //
}; };

View File

@ -1,11 +1,10 @@
<template> <template>
<div class="content-element"> <div class="content-element">
<component <component
:is="type(element)" :class="['content-element__component', {'content-element__chooser': type(element) === 'content-block-element-chooser-widget'}]"
:class="{'content-element__chooser': type(element) === 'content-block-element-chooser-widget'}"
v-bind="element" v-bind="element"
class="content-element__component" :is="type(element)"
@change-type="changeType($event)" @change-type="changeType"
@link-change-url="changeText" @link-change-url="changeText"
@link-change-text="changeText" @link-change-text="changeText"
@ -21,10 +20,12 @@
<a <a
class="contents-form__remove icon-button" class="contents-form__remove icon-button"
@click="$emit('remove')"> @click="$emit('remove')"
>
<trash-icon <trash-icon
class="contents-form__trash-icon icon-button__icon" class="contents-form__trash-icon icon-button__icon"
v-if="type(element) !== 'content-block-element-chooser-widget'"/> v-if="type(element) !== 'content-block-element-chooser-widget'"
/>
</a> </a>
</div> </div>
</template> </template>

View File

@ -1,7 +1,9 @@
<template> <template>
<div class="content-form-section"> <div class="content-form-section">
<h2 class="content-form-section__heading">{{ title }}</h2> <h2 class="content-form-section__heading">
<slot/> {{ title }}
</h2>
<slot />
</div> </div>
</template> </template>

View File

@ -1,16 +1,17 @@
<template> <template>
<label <label
:for="id" :for="id"
:class="{'toggle--bordered': bordered}" :class="['toggle', {'toggle--bordered': bordered}]"
class="toggle"> >
<input <input
:id="id"
:checked="checked" :checked="checked"
class="toggle__input" class="toggle__input"
type="checkbox" type="checkbox"
@change.prevent="$emit('input', $event.target.checked)"> :id="id"
@change.prevent="$emit('input', $event.target.checked)"
>
<span class="toggle__toggle-wrapper"> <span class="toggle__toggle-wrapper">
<span class="toggle__toggle"/> <span class="toggle__toggle" />
</span> </span>
<span class="toggle__label">{{ label }}</span> <span class="toggle__label">{{ label }}</span>
</label> </label>

View File

@ -7,7 +7,10 @@
<div class="topic__content"> <div class="topic__content">
<h1 <h1
data-cy="topic-title" data-cy="topic-title"
class="topic__title">{{ topic.title }}</h1> class="topic__title"
>
{{ topic.title }}
</h1>
<p class="topic__teaser"> <p class="topic__teaser">
{{ topic.teaser }} {{ topic.teaser }}
</p> </p>
@ -15,25 +18,27 @@
<div <div
class="topic__video-link topic__link" class="topic__video-link topic__link"
v-if="topic.vimeoId" v-if="topic.vimeoId"
@click="openVideo"> @click="openVideo"
<play-icon class="topic__video-link-icon topic__link-icon"/> >
<play-icon class="topic__video-link-icon topic__link-icon" />
<span class="topic__link-description">Video schauen</span> <span class="topic__link-description">Video schauen</span>
</div> </div>
<a <a
:href="topic.instructions" :href="topic.instructions"
target="_blank" target="_blank"
class="topic__instruction-link topic__link" class="topic__instruction-link topic__link"
v-if="me.isTeacher && topic.instructions"> v-if="me.isTeacher && topic.instructions"
<bulb-icon class="topic__instruction-icon topic__link-icon"/> >
<bulb-icon class="topic__instruction-icon topic__link-icon" />
<span class="topic__link-description">Anweisungen zum Thema anzeigen</span> <span class="topic__link-description">Anweisungen zum Thema anzeigen</span>
</a> </a>
</div> </div>
<div class="topic__modules"> <div class="topic__modules">
<module-teaser <module-teaser
v-for="module in modules"
:key="module.slug" :key="module.slug"
v-bind="module" v-bind="module"
v-for="module in modules"/> />
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,7 +26,7 @@ const surveyPage = () => import(/* webpackChunkName: "survey" */'@/pages/survey'
const styleGuidePage = () => import('@/pages/styleguide'); const styleGuidePage = () => import('@/pages/styleguide');
const joinClass = () => import('@/pages/joinClass'); const joinClass = () => import('@/pages/joinClass');
const topic = () => import('@/pages/topic'); const topic = () => import('@/pages/topic-page');
const p404 = () => import('@/pages/p404'); const p404 = () => import('@/pages/p404');
const submission = () => import('@/pages/studentSubmission'); const submission = () => import('@/pages/studentSubmission');
@ -110,7 +110,7 @@ const router = new Router({
}, },
}); });
router.afterEach((to, from) => { router.afterEach(() => {
store.commit('setEditModule', false); store.commit('setEditModule', false);
store.dispatch('showMobileNavigation', false); store.dispatch('showMobileNavigation', false);
}); });