first version
This commit is contained in:
parent
9afee3794a
commit
0868de1d5d
12 changed files with 2533 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
node_modules
|
||||||
|
.cache
|
||||||
|
dist
|
5
assets/logo.css
Normal file
5
assets/logo.css
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#custom-css .icon.icon-logo {
|
||||||
|
background: url('/plugins/logo-distrilab/0.0.2/static/images/distrilab-logo-2.svg') no-repeat;
|
||||||
|
width: 25px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
8
client/common-client-plugin.js
Normal file
8
client/common-client-plugin.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
function register ({ registerHook, peertubeHelpers }) {
|
||||||
|
const favicon = document.querySelector('link[rel="icon"]')
|
||||||
|
favicon.href = peertubeHelpers.getBaseStaticRoute() + '/images/distrilab-logo-2.svg'
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
register
|
||||||
|
}
|
14
main.js
Normal file
14
main.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
async function register ({ registerHook, registerSetting, settingsManager, storageManager }) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function unregister () {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
register,
|
||||||
|
unregister
|
||||||
|
}
|
||||||
|
|
||||||
|
// ############################################################################
|
2335
package-lock.json
generated
Normal file
2335
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
37
package.json
Normal file
37
package.json
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"name": "peertube-plugin-logo-distrilab",
|
||||||
|
"description": "DistriLab logo on PeerTube.",
|
||||||
|
"version": "0.0.2",
|
||||||
|
"author": "distrilab",
|
||||||
|
"bugs": "https://git.distrilab.fr/DistriLab/peertube-plugin-logo-distrilab/issues",
|
||||||
|
"clientScripts": [
|
||||||
|
{
|
||||||
|
"script": "client/common-client-plugin.js",
|
||||||
|
"scopes": [ "common" ]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"css": [
|
||||||
|
"assets/logo.css"
|
||||||
|
],
|
||||||
|
"devDependencies": {
|
||||||
|
"webpack": "^5.50.0",
|
||||||
|
"webpack-cli": "^4.7.2"
|
||||||
|
},
|
||||||
|
"engine": {
|
||||||
|
"peertube": ">=1.3.0"
|
||||||
|
},
|
||||||
|
"homepage": "https://git.distrilab.fr/DistriLab/peertube-plugin-logo-distrilab",
|
||||||
|
"keywords": [
|
||||||
|
"peertube",
|
||||||
|
"plugin"
|
||||||
|
],
|
||||||
|
"library": "./main.js",
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "npm run build",
|
||||||
|
"build": "webpack --mode=production"
|
||||||
|
},
|
||||||
|
"staticDirs": {
|
||||||
|
"images": "public/images"
|
||||||
|
},
|
||||||
|
"translations": {}
|
||||||
|
}
|
BIN
public/images/distrilab-logo-2-color-128.png
Normal file
BIN
public/images/distrilab-logo-2-color-128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
public/images/distrilab-logo-2-color-256.png
Normal file
BIN
public/images/distrilab-logo-2-color-256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.3 KiB |
BIN
public/images/distrilab-logo-2-color-512.png
Normal file
BIN
public/images/distrilab-logo-2-color-512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
public/images/distrilab-logo-2-color-64.png
Normal file
BIN
public/images/distrilab-logo-2-color-64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
108
public/images/distrilab-logo-2.svg
Normal file
108
public/images/distrilab-logo-2.svg
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="65mm"
|
||||||
|
height="65mm"
|
||||||
|
viewBox="0 0 245.6693 245.6693"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
sodipodi:docname="distrilab-logo-2.svg"
|
||||||
|
inkscape:export-filename="/home/mose/store/distrilab/distrilab-logo-color-64.png"
|
||||||
|
inkscape:export-xdpi="25.00923"
|
||||||
|
inkscape:export-ydpi="25.00923"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
lock-margins="true"
|
||||||
|
fit-margin-top="6"
|
||||||
|
fit-margin-left="6"
|
||||||
|
fit-margin-right="6"
|
||||||
|
fit-margin-bottom="6"
|
||||||
|
inkscape:zoom="1.4142136"
|
||||||
|
inkscape:cx="155.20994"
|
||||||
|
inkscape:cy="140.3607"
|
||||||
|
inkscape:window-width="2558"
|
||||||
|
inkscape:window-height="1416"
|
||||||
|
inkscape:window-x="2560"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-121.02976,-58.345898)">
|
||||||
|
<g
|
||||||
|
id="g3571"
|
||||||
|
transform="translate(-3.0000059)">
|
||||||
|
<path
|
||||||
|
style="opacity:0.997;fill:#214478;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path31"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="193.86444"
|
||||||
|
sodipodi:cy="101.18058"
|
||||||
|
sodipodi:rx="21.161228"
|
||||||
|
sodipodi:ry="21.161228"
|
||||||
|
sodipodi:start="1.7873078"
|
||||||
|
sodipodi:end="1.7789792"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
sodipodi:open="true"
|
||||||
|
d="M 189.3185,121.84775 A 21.161228,21.161228 0 0 1 173.18785,96.677685 21.161228,21.161228 0 0 1 198.32427,80.494656 21.161228,21.161228 0 0 1 214.55961,105.59733 21.161228,21.161228 0 0 1 189.49079,121.8849" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.997;fill:#214478;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path1256"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="193.86444"
|
||||||
|
sodipodi:cy="261.1806"
|
||||||
|
sodipodi:rx="21.161228"
|
||||||
|
sodipodi:ry="21.161228"
|
||||||
|
sodipodi:start="1.7873078"
|
||||||
|
sodipodi:end="1.7789792"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
sodipodi:open="true"
|
||||||
|
d="m 189.3185,281.84778 a 21.161228,21.161228 0 0 1 -16.13065,-25.17007 21.161228,21.161228 0 0 1 25.13642,-16.18303 21.161228,21.161228 0 0 1 16.23534,25.10268 21.161228,21.161228 0 0 1 -25.06882,16.28756" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.997;fill:#214478;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path1258"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="299.86447"
|
||||||
|
sodipodi:cy="181.1806"
|
||||||
|
sodipodi:rx="21.161228"
|
||||||
|
sodipodi:ry="21.161228"
|
||||||
|
sodipodi:start="1.7873078"
|
||||||
|
sodipodi:end="1.7789792"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
sodipodi:open="true"
|
||||||
|
d="m 295.31853,201.84778 a 21.161228,21.161228 0 0 1 -16.13065,-25.17007 21.161228,21.161228 0 0 1 25.13642,-16.18303 21.161228,21.161228 0 0 1 16.23534,25.10268 21.161228,21.161228 0 0 1 -25.06882,16.28756" />
|
||||||
|
<path
|
||||||
|
id="rect1304"
|
||||||
|
style="opacity:0.997;fill:#3771c8;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 182.43718,130.62082 v 101.12109 a 31.602861,31.602861 0 0 1 18.08789,-1.45508 31.602861,31.602861 0 0 1 4.76563,1.43555 v -101.0957 a 31.602861,31.602861 0 0 1 -17.95703,1.47461 l -0.25782,-0.0547 a 31.602861,31.602861 0 0 1 -4.63867,-1.42578 z" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.997;fill:#3771c8;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 230.44021,100.85149 c -1.58774,7.04287 1.58108,12.24039 3.99111,12.76151 21.99123,4.7446 40.29745,19.8951 49.07032,40.61133 6.82849,-4.16068 14.98033,-5.57818 22.8125,-3.9668 -10.68831,-29.89584 -36.05991,-52.150645 -67.09375,-58.851558 -2.53546,-0.499672 -7.19244,2.402637 -8.78018,9.445518 z"
|
||||||
|
id="path2789"
|
||||||
|
sodipodi:nodetypes="zccccz" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.997;fill:#3771c8;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 230.44021,261.50404 c -1.58774,-7.04287 1.58108,-12.24039 3.99111,-12.76151 21.99123,-4.7446 40.29745,-19.8951 49.07032,-40.61133 6.82849,4.16068 14.98033,5.57818 22.8125,3.9668 -10.68831,29.89584 -36.05991,52.15064 -67.09375,58.85156 -2.53546,0.49967 -7.19244,-2.40264 -8.78018,-9.44552 z"
|
||||||
|
id="path3457"
|
||||||
|
sodipodi:nodetypes="zccccz" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.2 KiB |
23
webpack.config.js
Normal file
23
webpack.config.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
const path = require("path")
|
||||||
|
|
||||||
|
const clientFiles = [
|
||||||
|
'common-client-plugin.js'
|
||||||
|
]
|
||||||
|
|
||||||
|
let config = clientFiles.map(f => ({
|
||||||
|
entry: "./client/" + f,
|
||||||
|
|
||||||
|
experiments: {
|
||||||
|
outputModule: true
|
||||||
|
},
|
||||||
|
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "./dist"),
|
||||||
|
filename: "./" + f,
|
||||||
|
library: {
|
||||||
|
type: "module"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
|
||||||
|
module.exports = config
|
Loading…
Reference in a new issue