Move date into info and adjust subscribe button

This commit is contained in:
Cadence Ember 2020-06-20 01:43:08 +12:00
parent 7e9b574c60
commit cc88679d9e
No known key found for this signature in database
GPG Key ID: 128B99B1B74A6412
5 changed files with 30 additions and 14 deletions

View File

@ -23,15 +23,10 @@ export default Vue.extend({
},
data: function () {
return {
dateString: '',
shownDescription: ''
}
},
mounted: function () {
const date = new Date(this.published)
const dateSplit = date.toDateString().split(' ')
this.dateString = `${dateSplit[0]} ${dateSplit[1]} ${dateSplit[2]}, ${dateSplit[3]}`
if (this.descriptionHtml !== '') {
this.shownDescription = this.parseDescriptionHtml(this.descriptionHtml)
} else {

View File

@ -1,6 +1,5 @@
<template>
<ft-card class="videoDescription">
<h4>Published on {{ dateString }}</h4>
<p
class="description"
v-html="shownDescription"

View File

@ -97,6 +97,12 @@ export default Vue.extend({
subscribedText: function () {
return `SUBSCRIBE ${this.subscriptionCountText}`
},
dateString() {
const date = new Date(this.published)
const dateSplit = date.toDateString().split(' ')
return `${dateSplit[1]} ${dateSplit[2]} ${dateSplit[3]}`
}
},
methods: {

View File

@ -13,30 +13,42 @@
.channelInformation
.profileRow
display: flex
align-items: center
.channelThumbnail
border-radius: 50%
margin-right: 8px
position: relative
top: -4px
cursor: pointer
.channelName
margin-left: 6px
font-size: 18px
cursor: pointer
.subscribeButton
padding: 5px
font-size: 14px
margin-top: 8px
margin-left: 6px
padding: 6px
font-size: 16px
.datePublished
margin-bottom: 24px
.viewCount, .datePublished
color: var(--secondary-text-color)
text-align: right
font-size: 15px
@media screen and (max-width: 680px)
text-align: left
.viewCount
margin: 6px 0px 0px
.datePublished
margin: 4px 0px 0px
text-align: right
@media screen and (max-width: 680px)
margin-top: 16px
text-align: left
.likeSection
margin-top: 16px
@ -50,6 +62,7 @@
@media screen and (max-width: 680px)
margin-left: 0
text-align: left
.likeBar
height: 8px

View File

@ -37,9 +37,12 @@
</div>
</div>
<div>
<p class="viewCount">
<div class="datePublished">
Published {{ dateString }}
</div>
<div class="viewCount">
{{ parsedViewCount }}
</p>
</div>
<div class="likeBarContainer">
<div
class="likeSection"