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>
<a
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>
<script>
import Cross from '@/components/icons/Cross';
import PlusIcon from '@/components/icons/PlusIcon';
export default {
components: {PlusIcon, Cross}
components: { PlusIcon }
//
};

View File

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

View File

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

View File

@ -1,16 +1,17 @@
<template>
<label
:for="id"
:class="{'toggle--bordered': bordered}"
class="toggle">
:class="['toggle', {'toggle--bordered': bordered}]"
>
<input
:id="id"
:checked="checked"
class="toggle__input"
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"/>
<span class="toggle__toggle" />
</span>
<span class="toggle__label">{{ label }}</span>
</label>

View File

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

View File

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