feat: better cards in lms
This commit is contained in:
parent
751e75bb4c
commit
d3bae4e8b5
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="featured-products-section" :class='sectionType'>
|
<section class="featured-products-section" :class='sectionType'>
|
||||||
<h5 class='featured-heading' v-html="title"></h5>
|
<h5 class='featured-heading' v-html="title"></h5>
|
||||||
<div class="featured-products">
|
<div class="featured-products row">
|
||||||
<!-- <p class='lead text-center' v-html="description"></p> -->
|
<!-- <p class='lead text-center' v-html="description"></p> -->
|
||||||
<slot name="card-list-slot"></slot>
|
<slot name="card-list-slot"></slot>
|
||||||
|
</div>
|
||||||
<div class='mt-4 text-center'>
|
<div class='mt-4 text-center'>
|
||||||
<slot name="list-bottom"></slot>
|
<slot name="list-bottom"></slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card mt-3" data-list="getting-started">
|
<div class="mt-3 col-md-4 col-sm-12">
|
||||||
|
<div class="card h-100">
|
||||||
|
<div class="card-hero-img" v-if="course.hero_image" v-bind:style="{ 'background-image': 'url(' + image + ')' }"></div>
|
||||||
|
<div v-else class="card-image-wrapper">
|
||||||
|
<div class="image-body">{{ course.course_name }}</div>
|
||||||
|
</div>
|
||||||
<div class='card-body'>
|
<div class='card-body'>
|
||||||
<div class="row">
|
|
||||||
<div class="course-details col-xs-8 col-sm-9 col-md-10">
|
|
||||||
<h5 class="card-title">{{ course.course_name }}</h5>
|
<h5 class="card-title">{{ course.course_name }}</h5>
|
||||||
<span class="course-list text-muted" id="getting-started">
|
<span class="course-list text-muted" id="getting-started">
|
||||||
Topics
|
Topics
|
||||||
@ -13,7 +16,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class='course-buttons text-center col-xs-4 col-sm-3 col-md-2'>
|
<div class='text-right p-3'>
|
||||||
|
<div class='course-buttons text-center'>
|
||||||
<a-button
|
<a-button
|
||||||
:type="buttonType"
|
:type="buttonType"
|
||||||
size="sm btn-block"
|
size="sm btn-block"
|
||||||
@ -88,9 +92,31 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@media only screen and (max-width: 576px) {
|
|
||||||
.course-buttons {
|
.course-buttons {
|
||||||
margin-top: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.card-hero-img {
|
||||||
|
height: 220px;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-color: rgb(250, 251, 252);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image-wrapper {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 220px;
|
||||||
|
background-color: rgb(250, 251, 252);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-body {
|
||||||
|
align-self: center;
|
||||||
|
color: #d1d8dd;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1;
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -1,13 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='mt-3'>
|
<div class='mt-3 col-md-4 col-sm-12'>
|
||||||
<div class="card">
|
<div class="card h-100">
|
||||||
<div class="card-hero-img" v-if="program.hero_image" v-bind:style="{ 'background-image': 'url(' + image + ')' }"></div>
|
|
||||||
<div class='card-body'>
|
|
||||||
<router-link :to="'/Program/' + program.name">
|
<router-link :to="'/Program/' + program.name">
|
||||||
<h5 class='card-title'>{{ program.program_name }}</h5>
|
<div class="card-hero-img" v-if="program.hero_image" v-bind:style="{ 'background-image': 'url(' + image + ')' }"></div>
|
||||||
</router-link>
|
<div v-else class="card-image-wrapper">
|
||||||
<div v-html="program.description"></div>
|
<div class="image-body">{{ program.program_name }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class='card-body'>
|
||||||
|
<h5 class='card-title'>{{ program.program_name }}</h5>
|
||||||
|
<div>{{ program.description.substring(0,200) }}...</div>
|
||||||
|
</div>
|
||||||
|
</router-link>
|
||||||
<div class='text-right p-3'>
|
<div class='text-right p-3'>
|
||||||
<button v-if="program.intro_video" class='btn btn-secondary btn-sm text-white' data-toggle="modal" data-target="#videoModal">Watch Intro</button>
|
<button v-if="program.intro_video" class='btn btn-secondary btn-sm text-white' data-toggle="modal" data-target="#videoModal">Watch Intro</button>
|
||||||
<a-button v-if="enrolled" type="dark" size="sm" :route="programPageRoute">
|
<a-button v-if="enrolled" type="dark" size="sm" :route="programPageRoute">
|
||||||
@ -79,6 +82,25 @@ export default {
|
|||||||
|
|
||||||
div.card-hero-img {
|
div.card-hero-img {
|
||||||
height: 220px;
|
height: 220px;
|
||||||
background-position: center
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-color: rgb(250, 251, 252);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image-wrapper {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 220px;
|
||||||
|
background-color: rgb(250, 251, 252);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-body {
|
||||||
|
align-self: center;
|
||||||
|
color: #d1d8dd;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1;
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -1,9 +1,12 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="card mt-3" data-list="getting-started">
|
<div class="mt-3 col-md-4 col-sm-12">
|
||||||
|
<div class="card h-100">
|
||||||
|
<div class="card-hero-img" v-if="topic.hero_image" v-bind:style="{ 'background-image': 'url(' + image + ')' }"></div>
|
||||||
|
<div v-else class="card-image-wrapper">
|
||||||
|
<div class="image-body">{{ topic.topic_name }}</div>
|
||||||
|
</div>
|
||||||
<div class='card-body'>
|
<div class='card-body'>
|
||||||
<div class="row">
|
|
||||||
<div class="course-details col-xs-8 col-sm-9 col-md-10">
|
|
||||||
<h5 class="card-title">{{ topic.topic_name }}</h5>
|
<h5 class="card-title">{{ topic.topic_name }}</h5>
|
||||||
<span class="course-list text-muted" id="getting-started">
|
<span class="course-list text-muted" id="getting-started">
|
||||||
Content
|
Content
|
||||||
@ -17,8 +20,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class='course-buttons text-center col-xs-4 col-sm-3 col-md-2'>
|
<div v-if="isLogin" class='text-right p-3'>
|
||||||
<a-button v-if="isLogin"
|
<div class='course-buttons text-center'>
|
||||||
|
<a-button
|
||||||
:type="buttonType"
|
:type="buttonType"
|
||||||
size="sm btn-block"
|
size="sm btn-block"
|
||||||
:route="firstContentRoute"
|
:route="firstContentRoute"
|
||||||
@ -103,17 +107,31 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@media only screen and (max-width: 576px) {
|
|
||||||
.course-buttons {
|
.course-buttons {
|
||||||
margin-top: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa {
|
div.card-hero-img {
|
||||||
font-size: 0.8em;
|
height: 220px;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-color: rgb(250, 251, 252);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image-wrapper {
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 220px;
|
||||||
|
background-color: rgb(250, 251, 252);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-body {
|
||||||
|
align-self: center;
|
||||||
|
color: #d1d8dd;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1;
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<TopSection v-bind:title="program.program_name" v-bind:description="program.description">
|
<TopSection v-bind:title="program.program_name" v-bind:description="program.description">
|
||||||
</TopSection>
|
</TopSection>
|
||||||
<CardList :title="'Courses'" :description="''" :sectionType="'section-padding section-bg'">
|
<CardList :title="'Courses'" :description="''" :sectionType="'section-padding'">
|
||||||
<CourseCard slot="card-list-slot" v-for="course in courseData" :course="course" :program_name="program_name" :key="course.name"/>
|
<CourseCard slot="card-list-slot" v-for="course in courseData" :course="course" :program_name="program_name" :key="course.name"/>
|
||||||
</CardList>
|
</CardList>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user