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 () { data: function () {
return { return {
dateString: '',
shownDescription: '' shownDescription: ''
} }
}, },
mounted: function () { 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 !== '') { if (this.descriptionHtml !== '') {
this.shownDescription = this.parseDescriptionHtml(this.descriptionHtml) this.shownDescription = this.parseDescriptionHtml(this.descriptionHtml)
} else { } else {

View File

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

View File

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

View File

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

View File

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