Renamed Vue Files

This commit is contained in:
scmmishra 2018-11-13 17:24:07 +05:30 committed by Aditya Hase
parent 0225642459
commit 2596ea0816
14 changed files with 54 additions and 54 deletions

View File

@ -1,8 +1,8 @@
<template>
<div>
<ContentTitle :title="contentData.title" :author="contentData.author" :publishDate="contentData.publish_date">
<Title :title="contentData.title" :author="contentData.author" :publishDate="contentData.publish_date">
<slot></slot>
</ContentTitle>
</Title>
<section class="article-content-section">
<div class='container'>
<div class="content" v-html="contentData.content"></div>
@ -17,10 +17,10 @@
</div>
</template>
<script>
import ContentTitle from './ContentTitle.vue'
import Title from './Title.vue'
export default {
props: ['content', 'type'],
name: 'ContentArticle',
name: 'Article',
data() {
return {
contentData: ''
@ -38,7 +38,7 @@ export default {
});
},
components: {
ContentTitle
Title
}
};
</script>

View File

@ -13,6 +13,6 @@
<script>
export default {
props:['title', 'description'],
name: "AcademyList",
name: "CardList",
};
</script>

View File

@ -27,13 +27,13 @@
<script>
import AButton from './Button.vue';
import AcademyCourseCardButton from './AcademyCourseCardButton.vue'
import CourseCardButton from './CourseCardButton.vue'
export default {
props: ['course', 'courseMeta', 'program_name'],
name: "AcademyCourseCard",
name: "CourseCard",
components: {
AcademyCourseCardButton,
CourseCardButton,
AButton
},
computed: {

View File

@ -4,7 +4,7 @@
<script>
export default {
props: ['course', 'nextContent', 'nextContentType'],
name: "AcademyCourseCardButton",
name: "CourseCardButton",
data() {
return {
buttonName: 'Start',

View File

@ -9,7 +9,7 @@
<script>
export default {
props: ['nextContent', 'nextContentType'],
name: 'ContentNavigation',
name: 'Navigation',
methods: {
goNext() {
if(this.$route.params.type != "Quiz"){

View File

@ -28,7 +28,7 @@
import AButton from './Button.vue';
export default {
props: ['program', 'enrolled'],
name: "AcademyProgramCard",
name: "ProgramCard",
data() {
return {
isLogin: lms.store.isLogin

View File

@ -42,7 +42,7 @@
import QuizSingleChoice from "./Quiz/QuizSingleChoice.vue"
export default {
props: ['content', 'type'],
name: 'ContentQuiz',
name: 'Quiz',
data() {
return {
quizData: '',

View File

@ -20,7 +20,7 @@
<script>
export default {
props: ['title', 'publishDate', 'author'],
name: 'ContentTitle',
name: 'Title',
data() {
return {

View File

@ -19,6 +19,6 @@
export default {
props: ['title', 'description'],
name: "AcademyTopSection",
name: "TopSection",
};
</script>

View File

@ -4,7 +4,7 @@
</template>
<script>
export default {
name: "AcademyTopSectionButton",
name: "TopSectionButton",
data() {
return {
buttonName: '',

View File

@ -39,7 +39,7 @@
<script>
export default {
props: ['content', 'type'],
name: 'ContentVideo',
name: 'Video',
data() {
return {
contentData: ''

View File

@ -1,15 +1,15 @@
<template>
<div>
<component v-bind:is="currentComponent" :content="content" :type="type">
<ContentNavigation :nextContent="nextContent" :nextContentType="nextContentType"/>
<Navigation :nextContent="nextContent" :nextContentType="nextContentType"/>
</component>
</div>
</template>
<script>
import ContentArticle from "../components/ContentArticle.vue"
import ContentQuiz from "../components/ContentQuiz.vue"
import ContentVideo from "../components/ContentVideo.vue"
import ContentNavigation from "../components/ContentNavigation.vue"
import Article from "../components/Article.vue"
import Quiz from "../components/Quiz.vue"
import Video from "../components/Video.vue"
import Navigation from "../components/Navigation.vue"
export default {
props:['program_name', 'course', 'type', 'content'],
@ -23,13 +23,13 @@ export default {
computed: {
currentComponent: function() {
if(this.type === "Article") {
return 'ContentArticle'
return 'Article'
}
else if(this.type === "Quiz") {
return 'ContentQuiz'
return 'Quiz'
}
else if(this.type === "Video") {
return 'ContentVideo'
return 'Video'
}
},
},
@ -47,10 +47,10 @@ export default {
});
},
components: {
ContentArticle,
ContentVideo,
ContentQuiz,
ContentNavigation
Article,
Video,
Quiz,
Navigation
}
};
</script>

View File

@ -1,18 +1,18 @@
<template>
<div>
<AcademyTopSection :title="portal.title" :description="portal.description">
<AcademyTopSectionButton/>
</AcademyTopSection>
<AcademyList :title="'Featured Programs'" :description="'Master ERPNext'">
<AcademyProgramCard v-for="item in featuredPrograms" :key="item.program.name" :program="item.program" :enrolled="item.is_enrolled"/>
</AcademyList>
<TopSection :title="portal.title" :description="portal.description">
<TopSectionButton/>
</TopSection>
<CardList :title="'Featured Programs'" :description="'Master ERPNext'">
<ProgramCard v-for="item in featuredPrograms" :key="item.program.name" :program="item.program" :enrolled="item.is_enrolled"/>
</CardList>
</div>
</template>
<script>
import AcademyTopSection from "../components/AcademyTopSection.vue"
import AcademyList from "../components/AcademyList.vue"
import AcademyProgramCard from "../components/AcademyProgramCard.vue"
import AcademyTopSectionButton from "../components/AcademyTopSectionButton.vue"
import TopSection from "../components/TopSection.vue"
import CardList from "../components/CardList.vue"
import ProgramCard from "../components/ProgramCard.vue"
import TopSectionButton from "../components/TopSectionButton.vue"
export default {
name: "Home",
@ -24,10 +24,10 @@ export default {
}
},
components: {
AcademyTopSection,
AcademyList,
AcademyProgramCard,
AcademyTopSectionButton
TopSection,
CardList,
ProgramCard,
TopSectionButton
},
beforeMount() {
// this.updateEnrolledPrograms().then(data => {

View File

@ -1,19 +1,19 @@
<template>
<div>
<AcademyTopSection v-bind:title="program.program_name" v-bind:description="program.description">
<TopSection v-bind:title="program.program_name" v-bind:description="program.description">
<!-- <a-button @click="startCourse">Start Course</a-button>
<a-button @click="continueCourse">Continue Course</a-button> -->
</AcademyTopSection>
<AcademyList :title="'Courses'" :description="''">
<AcademyCourseCard v-for="course in course_data" :course="course.course" :program_name="program_name" :courseMeta="course.meta" :key="course.meta.flag"/>
</AcademyList>
</TopSection>
<CardList :title="'Courses'" :description="''">
<CourseCard v-for="course in course_data" :course="course.course" :program_name="program_name" :courseMeta="course.meta" :key="course.meta.flag"/>
</CardList>
</div>
</template>
<script>
import Button from '../components/Button.vue';
import AcademyTopSection from "../components/AcademyTopSection.vue"
import AcademyList from "../components/AcademyList.vue"
import AcademyCourseCard from "../components/AcademyCourseCard.vue"
import TopSection from "../components/TopSection.vue"
import CardList from "../components/CardList.vue"
import CourseCard from "../components/CourseCard.vue"
export default {
@ -21,9 +21,9 @@ export default {
name: "ProgramPage",
components: {
AButton: Button,
AcademyTopSection,
AcademyList,
AcademyCourseCard
TopSection,
CardList,
CourseCard
},
data() {
return {