joinpeertube/app/components/ContentSelection.vue

131 lines
2.4 KiB
Vue
Raw Normal View History

2019-09-06 13:42:29 +00:00
<template>
<div class="root">
<div class="left">
<img :src="thumbnailUrl" alt="thumbnail"/>
<button class="jpt-button jpt-button-light">
<span v-if="type === 'video'">
<icon-video></icon-video>
Watch the video
</span>
<span v-if="type === 'channel'">
<icon-channel></icon-channel>
Discover the channel
</span>
<span v-if="type === 'instance'">
<icon-instance></icon-instance>
Go on the instance
</span>
</button>
</div>
<div class="right">
<div class="title">
2019-09-06 15:37:56 +00:00
<div class="icon">
<icon-video v-if="type === 'video'"></icon-video>
<icon-channel v-if="type === 'channel'"></icon-channel>
<icon-instance v-if="type === 'instance'"></icon-instance>
</div>
2019-09-06 13:42:29 +00:00
{{ title }}
</div>
<div class="description">
{{ description }}
</div>
<div class="tags">
<div class="tag" v-for="tag in tags">{{ tag }}</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
@import '../assets/scss/_variables';
2019-09-06 15:37:56 +00:00
.root {
display: flex;
}
2019-09-06 13:42:29 +00:00
.left {
2019-09-06 15:37:56 +00:00
margin-right: 20px;
2019-09-06 13:42:29 +00:00
img {
display: block;
width: 250px;
height: 137px;
border-radius: 3px;
}
button {
margin-top: 30px;
width: 250px;
height: 35px;
}
}
.right {
.title {
font-size: 24px;
font-weight: $font-semibold;
2019-09-06 15:37:56 +00:00
display: flex;
align-items: center;
.icon {
margin-right: 10px;
position: relative;
top: -2px;
}
2019-09-06 13:42:29 +00:00
}
.description {
font-size: 16px;
2019-09-06 15:37:56 +00:00
min-height: 170px;
2019-09-06 13:42:29 +00:00
}
.tags {
display: flex;
.tag {
border: 1px solid $orange;
2019-09-06 15:37:56 +00:00
border-radius: 10px;
2019-09-06 13:42:29 +00:00
margin-right: 20px;
2019-09-06 15:37:56 +00:00
font-size: 14px;
min-width: 140px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
2019-09-06 13:42:29 +00:00
}
}
}
</style>
<script>
import IconVideo from './icons/IconVideo.vue'
import IconInstance from './icons/IconInstance.vue'
import IconChannel from './icons/IconChannel.vue'
export default {
props: {
type: String,
title: String,
thumbnailUrl: String,
url: String,
tags: Array,
description: String,
},
components: {
IconVideo,
IconInstance,
IconChannel
}
}
</script>