• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Themes & Styles Using VS Code for custom css?

     
    • 0 Vote(s) - 0 Average

    Using VS Code for custom css?

    Is there a way to work on Jellyfin in vs code to work on custom css where i can then copy and paste it into the custom css box on the dashboard
    IPQ
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2023 Jul
    Reputation: 0
    Country:United Kingdom
    #1
    2023-07-28, 03:24 AM
    I would like to use some custom css to customise my jellyfin, I want to modify a theme but it is a bit tricky to edit one thing in a big file and then put it back in the custom CSS box and then save and reload, it would be easier to open the files in vs code and using the live server plugin, I would be able to attach a file to put all the custom CSS in and see live changes as I make them.
    Is this possible and if so how would I go about doing it?
    Dex Luther
    Offline

    Junior Member

    Posts: 31
    Threads: 3
    Joined: 2023 Sep
    Reputation: 1
    Country:Canada
    #2
    2023-09-03, 12:18 AM
    I haven't tried in a while, but I remember being able to just fine.

    If you File > New File it asks what coding language you'll be using. You should be able to type in CSS, and it'll come right up and then ask you where you want to save the file (always a good idea to save the file for future reference).
    If you open a blank page it should also auto-detect CSS if you paste in CSS code.
    Alternatively, you could also change it by clicking the button at the bottom right corner of the window (3rd button from the right) if you want to use some other code language or if it auto-detects wrong.
    DirecTV
    Offline

    Junior Member

    Posts: 11
    Threads: 2
    Joined: 2023 Sep
    Reputation: 0
    #3
    2023-09-03, 04:45 AM
    (2023-07-28, 03:24 AM)IPQ Wrote: I would like to use some custom css to customise my jellyfin, I want to modify a theme but it is a bit tricky to edit one thing in a big file and then put it back in the custom CSS box and then save and reload, it would be easier to open the files in vs code and using the live server plugin, I would be able to attach a file to put all the custom CSS in and see live changes as I make them.
    Is this possible and if so how would I go about doing it?

    Css is a pain in the ass, I'm a coder from old school days but css meh! I use to code for many platforms but css for me is a waste of time as I only use firesticks. I know what your asking and 'yes' it is doable but this forum is slow and google would speed up your goal. Good luck brother!
    LeviSnoot
    Offline

    Junior Member

    Posts: 20
    Threads: 3
    Joined: 2023 Sep
    Reputation: 1
    Country:Sweden
    #4
    2023-09-19, 02:16 PM
    Quote:I would like to use some custom css to customise my jellyfin, I want to modify a theme but it is a bit tricky to edit one thing in a big file and then put it back in the custom CSS box and then save and reload, it would be easier to open the files in vs code and using the live server plugin, I would be able to attach a file to put all the custom CSS in and see live changes as I make them.
    Is this possible and if so how would I go about doing it?

    I haven't tried doing this, but I'm not sure an actual potential solution has been suggested yet, so I'll give it a shot. In Jellyfin, go to Profile (your profile pic in the top right corner) > Display. Once there, tick "Disable server-provided custom CSS code", and under "Custom CSS Code:" paste something like the following (I have no idea what the URL path for the VSCode server is so change this to whatever it is):
     
    Code:
    @import http://localhost:3000/style.css

    Now you should be able to just refresh the browser window every time you save the style.css file.

    It's possible Jellyfin or your browser won't be happy fetching a css stylesheet over HTTP, and in that case, I think the best option might be something like a git repo to host the style.css on and then pushing the changes every time you save. The URL would then be the URL to the raw CSS file in your git repo. 

    I might try this in a bit. I'll let you know if I do and whether it worked.
    JF Server Specs:
    • CPU: Intel Core i5-11400
    • Motherboard: ASRock H510M-ITX/ac
    • RAM: G.Skill 16GB (2x8GB) Value 2666MHz CL19 DDR4
    • PSU: Silverstone SX300-B 80+ Bronze SFX
    • OS: Debian 12
    • JF: 10.10.6
    Niskeletor de Oscuridad
    Offline

    Junior Member

    Posts: 3
    Threads: 0
    Joined: 2023 Sep
    Reputation: 0
    #5
    2023-09-19, 04:24 PM
    (2023-07-28, 03:24 AM)IPQ Wrote: I would like to use some custom css to customise my jellyfin, I want to modify a theme but it is a bit tricky to edit one thing in a big file and then put it back in the custom CSS box and then save and reload, it would be easier to open the files in vs code and using the live server plugin, I would be able to attach a file to put all the custom CSS in and see live changes as I make them.
    Is this possible and if so how would I go about doing it?

    There is another option that may help you. You can edit the branding.xml file , you will locate it in the library directory, there is the same information there that you pick up from the "Use custom CSS code" box.

    That if you are going to have to restart Jellyfin, if you have it in a docker it is faster to do , and remember to clear the browser cache.

    Another faster thing to do is in the browser in developer mode F12, you can apply the CSS Styles changes on the fly, this can give you a more stable idea of how to implement it at the end. I hope you continue working with your customization and share with us your doubts or progress Smiling-face
    IPQ
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2023 Jul
    Reputation: 0
    Country:United Kingdom
    #6
    2023-09-27, 09:27 AM
    (2023-09-19, 04:24 PM)Niskeletor de Oscuridad Wrote: ...

    Another faster thing to do is in the browser in developer mode F12, you can apply the CSS Styles changes on the fly, this can give you a more stable idea of how to implement it at the end. I hope you continue working with your customization and share with us your doubts or progress Smiling-face

    What I ended up doing was using inspect element to edit, and then copying it onto vs code on my second monitor when I found what changes I liked, it was a bit tedious as I had to find individual classes that I had edited in the CSS file which was over 1000 lines but it worked out in the end, now I have a theme that I really like!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode