From 47844eb6034a7263d7a5b819a6916f3e7fc963de Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 30 Oct 2019 17:19:58 +0100 Subject: [PATCH] Add mascot to the homepage --- src/components/icons/IconLogo.vue | 36 +++++++++++++++++++++++++++++++ src/views/Home.vue | 35 +++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 src/components/icons/IconLogo.vue diff --git a/src/components/icons/IconLogo.vue b/src/components/icons/IconLogo.vue new file mode 100644 index 0000000..204d268 --- /dev/null +++ b/src/components/icons/IconLogo.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/src/views/Home.vue b/src/views/Home.vue index 7abc7cd..9e660be 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -8,6 +8,8 @@
A free software to take back control of your videos
+ PeerTube mascot +
With more than 100 000 hosted videos, viewed more than 6 millions times and 20 000 users, PeerTube is the decentralized free software alternative to videos platforms developed by Framasoft @@ -15,7 +17,7 @@
- + What is PeerTube? @@ -427,9 +429,14 @@ } } + .peertube-mascot { + display: block; + margin: 30px auto 0; + } + .marketing { font-size: 16px; - margin: 50px auto; + margin: 30px auto; width: 500px; text-align: center; @@ -485,17 +492,39 @@ import IconInstance from '../components/icons/IconInstance.vue' import IconRight from '../components/icons/IconRight.vue' import ContentSelections from '../components/ContentSelections' + import IconLogo from '../components/icons/IconLogo' export default { components: { ContentSelections, IconInstance, - IconRight + IconRight, + IconLogo }, metaInfo: { title: 'JoinPeerTube', titleTemplate: null + }, + + data () { + return { + mascotPaths: [ + 'mascot/default.png', + 'mascot/arguing.png', + 'mascot/oh.png', + 'mascot/defeated.png', + 'mascot/happy.png' + ], + currentMascot: 0 + } + }, + + methods: { + switchMascot () { + this.currentMascot++ + this.currentMascot %= this.mascotPaths.length + } } }