Themecss question re file replacing itself



  • Not sure why but I can edit and save theme.css and every so often (i'm thinking maybe server reboot on my side or whatever) the file reverts back to original state.

    I'm guessing there is a detail I'm missing or f'in up so enlighten me!


  • Admin

    the theme.css file is dynamically compiled from the LESS files found in node_modules/nodebb-theme-vanilla

    ideally you should be modifying those, LESS is very identical to CSS so I'm sure you won't have too many problems. if you do though, let me know! 🙂



  • the theme.css file is dynamically compiled from the LESS files found in node_modules/nodebb-theme-vanilla

    ideally you should be modifying those, LESS is very identical to CSS so I'm sure you won't have too many problems. if you do though, let me know! 🙂

    looking at those now.. seems like LESS is MORE for keeping it all organized and neat.. looks like i'll have no issues with it.. now if they can fix the server the site is throwing 503's my way now i just can't get the time i need when it's available to work on the damn thing.


  • Admin

    p.s. if you have supervisor installed, run your nodebb with

    ./nodebb
    

    it will automatically restart nodebb when it detects changes to the files 🙂



  • p.s. if you have supervisor installed, run your nodebb with

    ./nodebb
    

    it will automatically restart nodebb when it detects changes to the files 🙂

    yup yup it's working well now for updating.. luckily I have the full adobe suite so dreamweaver is nice for editing LESS files and I can have all the ones i need open at once and bounce around making changes and hit refresh to view.. now i just need to draw up some ideas tonight on what i want it to look like..

    i'm actually happy with the stock setup, i think that is a big selling point it's simplicity. so it's more a matter of refining it and all the small 5px here and there changes so it has it's own flavor.


  • Admin

    sounds good. if you change things up drastically please feel compelled to release a theme 😉 (Y)



  • sounds good. if you change things up drastically please feel compelled to release a theme 😉 (Y)

    trying to make a more minimal theme on an already minimal theme is going to be painstaking! if it's different enough to package up I will but chances are more people are going to want the typical "i want it to look like XYZ from forum software platform 123" type of stuff.. sad but true..

    so far i'm just toying around.. I see the tpl files too so I can tell already i'm going to need to make some regular backups and see what I can change.



  • I want to make a new theme based on cyborg theme but it doesn't have a directory to @import. How would I go about cloning it?


  • Plugin & Theme Dev

    Thats what I thought at first... should I edit the theme.css... it was easy that way, but then whenever I restarted the app, it always disappeared. It happened 4 more times until I was like, "There's got to be an easier way". ... well yeah, editing the .less files is way more easier. If you're looking for a CSS to LESS converter, I use this:

    css2less.cc

    It's helped me out a ton!



  • I'm having issues with the less files located in node_modules/nodebb-theme-vanilla.
    I add a background-image to the body of my css, however it is slashed-out in the inspector when I restart the server.
    The changes are being detected, however they are not being applied. Has this happened to anyone?



  • Solved my own problem. I've been editing the vanilla theme, however it seems that the actual default theme which is cerulean is overriding my changes. Thought I'd share for the next person. 😉


  • GNU/Linux Admin

    Hi @dylenbrivera -- you're right, cerulean is enabled by default on new NodeBB installs, although most of the styles are done in the vanilla repo.

    Cerulean is a child theme of vanilla, and inherits all of its stylesets.



  • im having the same problem with lavander... trying to do the minimal changes (colors for start)... edited the .less files... nothing happend..

    "forked" the lavander theme (copy paste) the files... edited them... (style and variables) changed on the admin... restarted the server and the same color (purple) is on..... any thoughts? im new to less and node.. 😞


  • GNU/Linux Admin

    Hey @Leonardo-Galani! Where are the files for lavender saved for you, are they in /node_modules/nodebb-theme-lavender?


  • Admin

    give us a bit more details, what file exactly did you change in relative to root? I'm assuming mynodebb/node_modules/nodebb-theme-myforkoflavender/less/variables.less? and then you activated the correct theme and then restarted admin?

    in that file change @brand-primary to a diff colour and see if the purple changes, let us know if you aren't having any luck 🙂



  • Clear the cache? I have been moding my gaming site (xenforo) and every change meant clear cache before then changes where visible (not a dev just my experience, not sure if it applies to nodebb)


  • GNU/Linux Admin

    @psychobunny Oh, also, if he has lavender alongside "lavender-copy", his theme.json might not have been updated to show the new name, and NodeBB would've loaded just the one theme. (I actually don't know how it would handle two themes with the same id)


  • Admin

    ah yeah that's a good point, he should be changing the id as well, it'll load the original if that's what he did



  • This post is deleted!


  • Hi,.. thanks for tips..

    turns out that nodebb is not loading my theme.. its a lavander fork (copy the whole directory -R ) BUT with a different id on theme.json

    i thought it was not loading my changes.. but if i load another theme like.. Cosmo.. and then load my theme... nodebb still show Cosmo template... : /

    theme.json

    {
        "id": "nodebb-theme-fork",
        "name": "Lavender Theme fork",
        "description": "A simple theme for NodeBB. Check out the theming guide that accompanies this work at http://burnaftercompiling.com",
        "url": "https://www.github.com/psychobunny/nodebb-theme-lavender",
        "screenshot": null,
        "templates": "templates",
        "staticDir": "static"
    }
    

Log in to reply
 

Suggested Topics

| |