From 429d7af3e53a85c38f31572b3961583be76177b8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Jul 2019 16:00:11 +0200 Subject: [PATCH] Use chocobo.png --- .../client/common-client-plugin.js | 13 ++++++++++++- peertube-plugin-hello-world/package.json | 2 +- peertube-theme-background-red/assets/style1.css | 5 +++++ peertube-theme-background-red/package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/peertube-plugin-hello-world/client/common-client-plugin.js b/peertube-plugin-hello-world/client/common-client-plugin.js index bbc91d1..f3dd5f2 100644 --- a/peertube-plugin-hello-world/client/common-client-plugin.js +++ b/peertube-plugin-hello-world/client/common-client-plugin.js @@ -1,10 +1,21 @@ function register ({ registerHook, peertubeHelpers }) { registerHook({ target: 'action:application.loaded', - handler: () => console.log('Hello application world') + handler: () => onApplicationLoaded(peertubeHelpers) }) } export { register } + +function onApplicationLoaded (peertubeHelpers) { + console.log('Hello application world') + + const baseStaticUrl = peertubeHelpers.getBaseStaticRoute() + const imageUrl = baseStaticUrl + '/images/chocobo.png' + + const topLeftBlock = document.querySelector('.top-left-block') + + topLeftBlock.style.backgroundImage = 'url(' + imageUrl + ')' +} diff --git a/peertube-plugin-hello-world/package.json b/peertube-plugin-hello-world/package.json index 7bd2253..83e25ce 100644 --- a/peertube-plugin-hello-world/package.json +++ b/peertube-plugin-hello-world/package.json @@ -1,6 +1,6 @@ { "name": "peertube-plugin-hello-world", - "version": "0.0.7", + "version": "0.0.8", "description": "Hello world PeerTube plugin example", "engine": { "peertube": ">=1.3.0" diff --git a/peertube-theme-background-red/assets/style1.css b/peertube-theme-background-red/assets/style1.css index 5dbc77b..3cf0c68 100644 --- a/peertube-theme-background-red/assets/style1.css +++ b/peertube-theme-background-red/assets/style1.css @@ -1,3 +1,8 @@ body { --mainBackgroundColor: red !important; } + +#custom-css .header .icon-logo { + background: url('../../static/images/chocobo.png') no-repeat; + background-size: contain; +} diff --git a/peertube-theme-background-red/package.json b/peertube-theme-background-red/package.json index 9fa96f8..72903be 100644 --- a/peertube-theme-background-red/package.json +++ b/peertube-theme-background-red/package.json @@ -1,6 +1,6 @@ { "name": "peertube-theme-background-red", - "version": "0.0.1", + "version": "0.0.2", "description": "Example PeerTube theme", "engine": { "peertube": ">=1.3.1"