Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.1k stars 1.51k forks source link

Custom Theme Not Taking Effect #2225

Closed MrGiga closed 5 years ago

MrGiga commented 5 years ago

What happened? According to the documents adding #custom-css in the css file, will cause the default class to be overridden. This is not the case after I install my test plugin where the header color background is set to red. The background is not red

What do you expect to happen instead? The header background should be red.

Package.json

{
  "name": "peertube-theme-quickstart",
  "version": "0.0.2",
  "description": "PeerTube theme quickstart",
  "engine": {
    "peertube": ">=1.3.0"
  },
  "keywords": [
    "peertube",
    "theme"
  ],
  "homepage": "https://framagit.org/framasoft/peertube/peertube-theme-quickstart",
  "author": "Chocobozzz",
  "bugs": "https://framagit.org/framasoft/peertube/peertube-theme-quickstart/issues",
  "staticDirs": {
    "images": "public/images"
  },
  "css": [
    "assets/style.css"
  ],
  "clientScripts":[],
  "translations": []
}

assets/style.css

#custom-css .header {
    background-color: red;
}
Chocobozzz commented 5 years ago

Did you select this theme in your settings? What is your instance URL?

MrGiga commented 5 years ago

I tried to activate it and did a hard refresh but nothing changed. I even went to the Plugin/Themes section, installed all of those that appeared, after activating there was no changes. Is redis caching something that I am not aware of?

Its a private instance that's only accessible internally.

I am noticing this in the console image

Edit: I may have a config issue. I am investigating

Edit 2: local-production.json seems to be updating correctly image

Edit 3: Found the issue. I didn't realize I had to activate it at the user level too if I am logged in

Chocobozzz commented 5 years ago

Edit 3: Found the issue. I didn't realize I had to activate it at the user level too if I am logged in

:+1:

alcalyn commented 5 years ago

I had to activate it at the user level too if I am logged in

I don't understand what it means, what do we have to do ? I also enabled the dark theme but nothing happens

alcalyn commented 5 years ago

Ooh ok, I went to Sidebar "Administration" > Tab "Configuration" > Tab "Basic configuration" > Section "Theme"

I selected the theme in the select option and now the theme is effective.