Skip to content

Fixed background to nodebb forum

Solved Configure
25 2 8.1k 1
  • I’ve been asked to do this:

    On the forum, mobile friendly and on PC you’ll get a fire coloured gradient for the background with everything within a frame on top of that background so the frame can be scrolled but the background doesn’t change.
    Centred experience such as tumblr or twitter in the sense that it’s the info that gets scrolled but not the whole page

    The forum is nodebb hosted, so although I can add custom CSS or Javascript, where can I upload the image to use?
    Also what CSS to write please?

  • I’ve been asked to do this:

    On the forum, mobile friendly and on PC you’ll get a fire coloured gradient for the background with everything within a frame on top of that background so the frame can be scrolled but the background doesn’t change.
    Centred experience such as tumblr or twitter in the sense that it’s the info that gets scrolled but not the whole page

    The forum is nodebb hosted, so although I can add custom CSS or Javascript, where can I upload the image to use?
    Also what CSS to write please?

    @Panda this is untested as I’m not in front of a PC currently, but should work

    body {
    background-image: url("/path/to/your/image.jpg");
    min-height: 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    }
    

    The image can be hosted anywhere outside of the NodeBB ecosystem provided it is reachable from any machine with an Internet connection. It doesn’t necessarily need to be on the site itself

  • @Panda this is untested as I’m not in front of a PC currently, but should work

    body {
    background-image: url("/path/to/your/image.jpg");
    min-height: 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    }
    

    The image can be hosted anywhere outside of the NodeBB ecosystem provided it is reachable from any machine with an Internet connection. It doesn’t necessarily need to be on the site itself

    @phenomlab there was error, close } without opening {

    Is there missing line at start?

    On that topic the brackets and some words in that code block (center , cover etc) are very feint to read on my device?

  • Ah I figured out needed
    body {

    Its working but got this funny response as if background is being clicked, and slightly moves sometimes, when you scroll up and down on forum content

  • Apart from the slight move issue
    The dark background was also too stong and making forum text hard to read.

    I asked chatGPT for fix, both its suggestions didnt work

    1st suggestion change alpha value on rgb made no difference

    Screenshot_20230730_153940_Chrome~2.jpg

    2nd idea, filter:

    Screenshot_20230730_154031_Chrome~2.jpg

    This only made forum text weaker!

    Its now saying I need to edit the image in a paint program, and save it with more transparency, but as Im loading from website I cant do that

    Is there a CSS way to reduce alpha value on image from external url?

  • Ah I figured out needed
    body {

    Its working but got this funny response as if background is being clicked, and slightly moves sometimes, when you scroll up and down on forum content

    @Panda yes, sorry. I’ve updated the original post

  • Apart from the slight move issue
    The dark background was also too stong and making forum text hard to read.

    I asked chatGPT for fix, both its suggestions didnt work

    1st suggestion change alpha value on rgb made no difference

    Screenshot_20230730_153940_Chrome~2.jpg

    2nd idea, filter:

    Screenshot_20230730_154031_Chrome~2.jpg

    This only made forum text weaker!

    Its now saying I need to edit the image in a paint program, and save it with more transparency, but as Im loading from website I cant do that

    Is there a CSS way to reduce alpha value on image from external url?

    @Panda there is. What you are seeing here with the image moving when clicked is called Cumulative Layout Shift which occurs when the body height is set incorrectly.

    Filter and Opacity are a bad idea as you are targeting the body element meaning all ancestors are affected by that change which in turn makes the text even harder to read.

    Tired want to use a overlay with the image, to add background color with transparency which should solve the issue.

  • @Panda there is. What you are seeing here with the image moving when clicked is called Cumulative Layout Shift which occurs when the body height is set incorrectly.

    Filter and Opacity are a bad idea as you are targeting the body element meaning all ancestors are affected by that change which in turn makes the text even harder to read.

    Tired want to use a overlay with the image, to add background color with transparency which should solve the issue.

    @phenomlab
    I did try putting 95% height, but didnt solve it

    Re: putting a background color on…
    If you look at the aignite site can you suggest what line to put to make the dark background more transparent

    I try to avoid CSS, so dont know it!

  • @phenomlab
    I did try putting 95% height, but didnt solve it

    Re: putting a background color on…
    If you look at the aignite site can you suggest what line to put to make the dark background more transparent

    I try to avoid CSS, so dont know it!

    @Panda said in Fixed background to nodebb forum:

    I try to avoid CSS, so dont know it!

    You’ll never avoid having to use it. I’d recommend you start to learn it because you’ll come across this in all aspects of web development.

  • @Panda said in Fixed background to nodebb forum:

    I try to avoid CSS, so dont know it!

    You’ll never avoid having to use it. I’d recommend you start to learn it because you’ll come across this in all aspects of web development.

    @phenomlab making min height 90% fixed it 😊

  • Pandaundefined Panda has marked this topic as solved on
  • @phenomlab making min height 90% fixed it 😊

    @Panda Good. And the background image with the text?

  • @Panda Good. And the background image with the text?

    @phenomlab
    Sort of …
    Its taken me ages to get a skin that looks ok even over a feint background

    If I pick a skin can I change just one of the colors if its not dark enough?

  • @phenomlab
    Sort of …
    Its taken me ages to get a skin that looks ok even over a feint background

    If I pick a skin can I change just one of the colors if its not dark enough?

    @Panda yes, but you should start with a sane value and work backwards. The lower the last number in terms of rgba the higher the transparency.

  • @Panda yes, but you should start with a sane value and work backwards. The lower the last number in terms of rgba the higher the transparency.

    @phenomlab ah ok
    So how do I change one color in a skin?

  • @phenomlab ah ok
    So how do I change one color in a skin?

    @Panda first, define “skin”

  • @Panda first, define “skin”

    @phenomlab I go to admin menu and select skins
    Current one is Quartz

  • @phenomlab I go to admin menu and select skins
    Current one is Quartz

    @Panda ok, but which code runs this? Is it mine, or someone else’s work (it does make a difference.

    Edit - ok, unless I login, I cannot change the skin if it’s under admin. I’m being forced to wear sunglasses currently.

  • @Panda ok, but which code runs this? Is it mine, or someone else’s work (it does make a difference.

    Edit - ok, unless I login, I cannot change the skin if it’s under admin. I’m being forced to wear sunglasses currently.

    @phenomlab
    on aignite.nodebb.com I want to pick skin with colors that look ok over back image.
    But all the skins I try have at least one text color that is light and hard to see over image

  • @phenomlab
    on aignite.nodebb.com I want to pick skin with colors that look ok over back image.
    But all the skins I try have at least one text color that is light and hard to see over image

    @Panda it seems you are using the NodeBB skins which frankly, are terrible. They are all based on bootswatch and all have issues.

    You really need to custom develop a skin if your want it to look right.

  • @Panda it seems you are using the NodeBB skins which frankly, are terrible. They are all based on bootswatch and all have issues.

    You really need to custom develop a skin if your want it to look right.

    @phenomlab yea, this is what Im asking,
    Using a skin but maybe modifying one of the color choices


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Nodebb and emails

    Solved Configure nodebb
    27
    5 Votes
    27 Posts
    7k Views
    @Panda it will use SMTP. In all cases, I never use any plugin to send email. I’ll always send it raw.
  • MogoDB v6 to v7 upgrade

    Solved Configure nodebb
    5
    1 Votes
    5 Posts
    2k Views
    @Panda if you used the Ubuntu PPA, I think this only goes as far as 6.x if I recall correctly.
  • navigation menu panel on mobile

    Solved Customisation nodebb css
    8
    1
    7 Votes
    8 Posts
    2k Views
    @crazycells hmm. That’s odd. I haven’t made any changes from recollection but I could be wrong. I’ll need to check. EDIT - very strange. I honestly don’t recall adding the below CSS block to alter the bottom bar, but you’re right… .bottombar-nav { padding: 0px !important; } I’ve removed this so it reflects stock Harmony.
  • Nodebb design

    Solved General nodebb
    2
    1 Votes
    2 Posts
    1k Views
    @Panda said in Nodebb design: One negative is not being so good for SEO as more Server side rendered forums, if web crawlers dont run the JS to read the forum. From recollection, Google and Bing have the capability to read and process JS, although it’s not in the same manner as a physical person will consume content on a page. It will be seen as plain text, but will be indexed. However, it’s important to note that Yandex and Baidu will not render JS, although seeing as Google has a 90% share of the content available on the web in terms of indexing, this isn’t something you’ll likely lose sleep over. @Panda said in Nodebb design: The “write api” is preferred for server-to-server interactions. This is mostly based around overall security - you won’t typically want a client machine changing database elements or altering data. This is why you have “client-side” which could be DOM manipulation etc, and “server-side” which performs more complex operations as it can communicate directly with the database whereas the client cannot (and if it can, then you have a serious security flaw). Reading from the API is perfectly acceptable on the client-side, but not being able to write. A paradigm here would be something like SNMP. This protocol exists as a UDP (UDP is very efficient, as it is “fire and forget” and does not wait for a response like TCP does) based service which reads performance data from a remote source, thus enabling an application to parse that data for use in a monitoring application. In all cases, SNMP access should be “RO” (Read Only) and not RW (Read Write). It is completely feasible to assume complete control over a firewall for example by having RW access to SNMP and then exposing it to the entire internet with a weak passphrase. You wouldn’t do it (at least, I hope you wouldn’t) and the same ethic applies to server-side rendering and the execution of commands.
  • MailGun Not Working NodeBB

    Solved Configure mail mailgun
    6
    1 Votes
    6 Posts
    2k Views
    @phenomlab did it i did not create smtp user on mailgun. everything is working now. [image: 1667569376261-6cc6061f-ed5d-41f6-8eb7-5d98f98b3706-image.png]
  • [NodeBB] First post customization

    Solved Customisation nodebb
    5
    4 Votes
    5 Posts
    2k Views
    @phenomlab thanks
  • NodeBB metadata

    Solved Configure nodebb
    4
    2 Votes
    4 Posts
    2k Views
    @phenomlab said in NodeBB metadata: @jac Are you sure ? https://www.google.co.uk/search?q=site%3Astockportcounty.fans&sxsrf=AOaemvLwnaZL-PliU_2dBOg_Eo1pMVhBjg%3A1638982328139&source=hp&ei=uOKwYeatBcOsad3yp7AE&iflsig=ALs-wAMAAAAAYbDwyLBSDcG5XYoFCKwQFhgz94wTxOcV&ved=0ahUKEwjm6dX71NT0AhVDVhoKHV35CUYQ4dUDCAk&uact=5&oq=site%3Astockportcounty.fans&gs_lcp=Cgdnd3Mtd2l6EAM6BAgjECc6CwgAEIAEELEDEIMBOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQowI6BQguEIAEOggIABCABBCxAzoFCAAQgAQ6CAguELEDEIMBOgsILhCABBDHARCvAToICC4QgAQQsQM6BQgAELEDOgsILhCABBDHARDRAzoLCAAQgAQQsQMQyQM6BQgAEJIDUABYySZg0CdoAHAAeACAAW2IAa0NkgEEMjMuMpgBAKABAQ&sclient=gws-wiz Fair enough 🤪🤪.
  • Iframely (Nodebb)

    Solved Configure
    40
    4 Votes
    40 Posts
    12k Views
    @DownPW This is now resolved. The issue was an incorrect URL specified in the Nodebb plugin. I’ve corrected this, and now it works as intended.