update course detail style
This commit is contained in:
1 parent
c2d30448d7
commit
a94623baac
8 files changed
+136
-21
No files matched your search
@@ -14,7 +14,29 @@
|
||||
<img :src="course.thumbnail" class="thumbnail" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<h2>{{ course.title }}</h2>
|
||||
<h2
|
||||
class="title"
|
||||
@click="
|
||||
$router.push({
|
||||
name: 'course-detail',
|
||||
params: {
|
||||
id: $route.params.courseId
|
||||
}
|
||||
})
|
||||
"
|
||||
>
|
||||
{{ course.title }}
|
||||
</h2>
|
||||
<div class="info">
|
||||
<div class="duration">
|
||||
<el-icon class="icon"> <clock /> </el-icon>
|
||||
<span class="value">{{ course?.duration }}{{ $t('common.entity.minute') }}</span>
|
||||
</div>
|
||||
<div class="level">
|
||||
<el-icon class="icon"> <magic-stick /> </el-icon>
|
||||
<span class="value">{{ course?.level }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,9 +44,14 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ICourse } from '@/services/course/types';
|
||||
import { Clock, MagicStick, Collection, ArrowRight } from '@element-plus/icons-vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CoursePreviewCard',
|
||||
components: {
|
||||
Clock,
|
||||
MagicStick
|
||||
},
|
||||
props: {
|
||||
course: {
|
||||
type: Object as () => ICourse,
|
||||
@@ -54,7 +81,29 @@ export default defineComponent({
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
float: left;
|
||||
|
||||
width: calc(100% - 100px);
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
.info {
|
||||
color: rgb(120, 144, 156);
|
||||
margin-top: 5px;
|
||||
.duration,
|
||||
.level {
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
.icon {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
.value {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,12 +6,12 @@
|
||||
:class="{ item: true, active: episode.id === active }"
|
||||
@click="onClick(episode)"
|
||||
>
|
||||
<el-col :span="6" class="left">
|
||||
<el-col :span="5" class="left">
|
||||
<span class="index">
|
||||
{{ episodeIndex + 1 }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="18" class="right">
|
||||
<el-col :span="19" class="right">
|
||||
<p class="title">
|
||||
{{ episode?.title }}
|
||||
</p>
|
||||
@@ -21,6 +21,7 @@
|
||||
<clock />
|
||||
</el-icon>
|
||||
{{ episode.duration }}
|
||||
{{ $t('common.entity.minute') }}
|
||||
</span>
|
||||
</p>
|
||||
</el-col>
|
||||
@@ -77,8 +78,9 @@ export default defineComponent({
|
||||
border: 1px solid rgba(50, 138, 241, 0.25);
|
||||
}
|
||||
.left {
|
||||
width: 30px;
|
||||
width: 60px;
|
||||
color: inherit;
|
||||
flex: inherit;
|
||||
.index {
|
||||
display: block;
|
||||
width: 30px;
|
||||
@@ -93,7 +95,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: calc(100% - 30px);
|
||||
width: calc(100% - 60px);
|
||||
.title {
|
||||
color: white;
|
||||
font-size: 0.8em;
|
||||
@@ -104,6 +106,8 @@ export default defineComponent({
|
||||
font-size: 0.6em;
|
||||
.icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user