diff --git a/peertube-plugin-logo-framasoft/README.md b/peertube-plugin-logo-framasoft/README.md new file mode 100644 index 0000000..5c3c843 --- /dev/null +++ b/peertube-plugin-logo-framasoft/README.md @@ -0,0 +1 @@ +# Framasoft logo on PeerTube diff --git a/peertube-plugin-logo-framasoft/assets/logo.css b/peertube-plugin-logo-framasoft/assets/logo.css new file mode 100644 index 0000000..c7bc741 --- /dev/null +++ b/peertube-plugin-logo-framasoft/assets/logo.css @@ -0,0 +1,5 @@ +#custom-css .icon.icon-logo { + background: url('/plugins/logo-framasoft/0.0.1/static/images/framasoft-logo.png') no-repeat; + width: 25px; + margin-right: 5px; +} diff --git a/peertube-plugin-logo-framasoft/client/common-client-plugin.js b/peertube-plugin-logo-framasoft/client/common-client-plugin.js new file mode 100644 index 0000000..029c946 --- /dev/null +++ b/peertube-plugin-logo-framasoft/client/common-client-plugin.js @@ -0,0 +1,8 @@ +function register ({ registerHook, peertubeHelpers }) { + const favicon = document.querySelector('link[rel="icon"]') + favicon.href = peertubeHelpers.getBaseStaticRoute() + '/images/framasoft-logo.png' +} + +export { + register +} diff --git a/peertube-plugin-logo-framasoft/main.js b/peertube-plugin-logo-framasoft/main.js new file mode 100644 index 0000000..da5e860 --- /dev/null +++ b/peertube-plugin-logo-framasoft/main.js @@ -0,0 +1,14 @@ +async function register ({ registerHook, registerSetting, settingsManager, storageManager }) { + +} + +async function unregister () { + return +} + +module.exports = { + register, + unregister +} + +// ############################################################################ diff --git a/peertube-plugin-logo-framasoft/package.json b/peertube-plugin-logo-framasoft/package.json new file mode 100644 index 0000000..b450ccd --- /dev/null +++ b/peertube-plugin-logo-framasoft/package.json @@ -0,0 +1,29 @@ +{ + "name": "peertube-plugin-logo-framasoft", + "version": "0.0.1", + "description": "Framasoft logo on PeerTube.", + "engine": { + "peertube": ">=1.3.0" + }, + "keywords": [ + "peertube", + "plugin" + ], + "homepage": "https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-logo-framasoft", + "author": "Chocobozzz", + "bugs": "https://framagit.org/framasoft/peertube/official-plugins/issues", + "library": "./main.js", + "staticDirs": { + "images": "public/images" + }, + "css": [ + "assets/logo.css" + ], + "clientScripts": [ + { + "script": "client/common-client-plugin.js", + "scopes": [ "common" ] + } + ], + "translations": {} +} diff --git a/peertube-plugin-logo-framasoft/public/images/framasoft-logo.png b/peertube-plugin-logo-framasoft/public/images/framasoft-logo.png new file mode 100644 index 0000000..7c37487 Binary files /dev/null and b/peertube-plugin-logo-framasoft/public/images/framasoft-logo.png differ