Skip to content

Whitespace fixes in Nodebb

Solved Customisation
18 3 3.2k 1
  • I would like to create my own theme, but dont know where to start really.

    In the interim is there CSS that can be added to thin down the whitespace on the header, which takes up half the screen on my mobile.
    So here is screenshot of a forum
    Screenshot_20230629_120030_Chrome~2.jpg

    Although the Title isnt very high there is whitespace below and above it.
    And there is even more whitespace before the first category heading.

    As comparison, there is also a lot of whitespace on sudonix site, but that banner does contain more graphics.
    But its similar in taking up >50% screen before posts begin (on mobile).

    Screenshot_20230629_120306_Chrome~2.jpg

    What I would like to achieve is the title remaining as it is, but with less whitespace above and below it?

  • I would like to create my own theme, but dont know where to start really.

    In the interim is there CSS that can be added to thin down the whitespace on the header, which takes up half the screen on my mobile.
    So here is screenshot of a forum
    Screenshot_20230629_120030_Chrome~2.jpg

    Although the Title isnt very high there is whitespace below and above it.
    And there is even more whitespace before the first category heading.

    As comparison, there is also a lot of whitespace on sudonix site, but that banner does contain more graphics.
    But its similar in taking up >50% screen before posts begin (on mobile).

    Screenshot_20230629_120306_Chrome~2.jpg

    What I would like to achieve is the title remaining as it is, but with less whitespace above and below it?

    Just as further example, going into a post the whole screen is taken up before the post text shows.
    Also @phenomlab are you aware these badges overlap (circled)
    IMG_20230629_122257_814.jpg

  • What screen size are you using, and what device? I’m not seeing that issue on my OnePlus 9 Pro

  • What screen size are you using, and what device? I’m not seeing that issue on my OnePlus 9 Pro

    @phenomlab Samsung Flip4
    3088 high
    x 1440 wide

    Perhaps it is my device then, it has narrower screen in comparison to height

  • Pandaundefined Panda has marked this topic as solved on
  • @phenomlab Samsung Flip4
    3088 high
    x 1440 wide

    Perhaps it is my device then, it has narrower screen in comparison to height

    @Panda With a resolution like that, it shouldn’t be an issue. However, there are a number of things you can do with custom CSS. I wouldn’t recommend creating a new theme unless you really have to

  • @Panda just circling back on this based on your list concerning badges overlapping.

    This is what I see on my mobile

    Screenshot_2023-06-29-21-11-41-68_e4424258c8b8649f6e67d283a50a2cbc.jpg

  • This is exactly why I never really liked CSS. It can so easily go wrong on different resolution screens!
    When I wrote games, I would use Javascript on Canvas, with my own font so that everything was scaled as % of screen width and height.
    I had my own library for this. It was the only way to guarantee everything works on all devices.

    Look at this: its a mess, and Flip4 is not an uncommon device
    Screenshot_20230629_235950_Chrome~2.jpg

    What does having this extra Tag saying Author really add?
    I dont want to be critical, but it might be better to have the user group badges as shorter names, then that would reduce overlaps?

  • This is exactly why I never really liked CSS. It can so easily go wrong on different resolution screens!
    When I wrote games, I would use Javascript on Canvas, with my own font so that everything was scaled as % of screen width and height.
    I had my own library for this. It was the only way to guarantee everything works on all devices.

    Look at this: its a mess, and Flip4 is not an uncommon device
    Screenshot_20230629_235950_Chrome~2.jpg

    What does having this extra Tag saying Author really add?
    I dont want to be critical, but it might be better to have the user group badges as shorter names, then that would reduce overlaps?

    @Panda it looks to me like you’re using enlarged fonts at least. Can you confirm? You can’t cater for literally every device of course.

  • @Panda it looks to me like you’re using enlarged fonts at least. Can you confirm? You can’t cater for literally every device of course.

    @phenomlab yes thats a point that font size is an Android system setting, so another variable.
    Screenshot_20230630_070745_Settings~2.jpg

    So its not on largest but more than half way up

  • @phenomlab yes thats a point that font size is an Android system setting, so another variable.
    Screenshot_20230630_070745_Settings~2.jpg

    So its not on largest but more than half way up

    @Panda yes, that will play havoc with rendering. I’m curious to know if setting it to the normal size resolves it.

  • Yes with text 4/8 size its fine.
    Screenshot_20230630_173532_Chrome~2.jpg
    Athough my suggestion to have shorter group names might be worth taking.
    Collaborator is quite a long badge name,
    Whats your list of all the group categories? Is Sage top, how did you chose these names?

  • Yes with text 4/8 size its fine.
    Screenshot_20230630_173532_Chrome~2.jpg
    Athough my suggestion to have shorter group names might be worth taking.
    Collaborator is quite a long badge name,
    Whats your list of all the group categories? Is Sage top, how did you chose these names?

    @Panda said in Whitespace fixes in Nodebb:

    Collaborator is quite a long badge name,

    Yes, I need to re-think these names actually.

    @Panda said in Whitespace fixes in Nodebb:

    Whats your list of all the group categories? Is Sage top, how did you chose these names?

    See below

    08a3a12c-3a1c-4855-bfbe-54269c8ce8bf-image.png

    In actual fact, even “Supreme” won’t be the top rank - at 50,000 upvotes, you’d need to be almost god-like 🙂

  • @Panda said in Whitespace fixes in Nodebb:

    Collaborator is quite a long badge name,

    Yes, I need to re-think these names actually.

    @Panda said in Whitespace fixes in Nodebb:

    Whats your list of all the group categories? Is Sage top, how did you chose these names?

    See below

    08a3a12c-3a1c-4855-bfbe-54269c8ce8bf-image.png

    In actual fact, even “Supreme” won’t be the top rank - at 50,000 upvotes, you’d need to be almost god-like 🙂

    @phenomlab
    Interesting. Because it is not obvious which name is what rank, I suggest an alphabetical list.
    For example, something like
    ACE (highest)
    COMMANDER
    EXPERT
    GURU
    ROOKIE
    STARTER (lowest)

  • @phenomlab
    Interesting. Because it is not obvious which name is what rank, I suggest an alphabetical list.
    For example, something like
    ACE (highest)
    COMMANDER
    EXPERT
    GURU
    ROOKIE
    STARTER (lowest)

    @Panda I see your point, but I won’t be changing to an alphabetic system - but would consider stars. I know @crazycells uses ranking like this.

  • @Panda I see your point, but I won’t be changing to an alphabetic system - but would consider stars. I know @crazycells uses ranking like this.

    @phenomlab yeap, I like the stars… very intuitive…

    we have them from 1 to 5, but I am considering extending it to 7. additionally we have small icons such as a youtube sign for users with youtube channels, etc.

    Screen Shot 2023-06-30 at 12.47.43.png

    in the past , forums used to have military rankings… captain, major, general etc. that is what the initial recommendation by our users was… sometimes these ranks would have lines and stars next to it… so the idea in the forum evolved to have only stars as ranks… users are happy with this…

  • @phenomlab yeap, I like the stars… very intuitive…

    we have them from 1 to 5, but I am considering extending it to 7. additionally we have small icons such as a youtube sign for users with youtube channels, etc.

    Screen Shot 2023-06-30 at 12.47.43.png

    in the past , forums used to have military rankings… captain, major, general etc. that is what the initial recommendation by our users was… sometimes these ranks would have lines and stars next to it… so the idea in the forum evolved to have only stars as ranks… users are happy with this…

    @crazycells You’re both raising really good points here. The wording in all honesty was to get it started, but it’s become much more than that - particularly as original members have much higher rankings. I’ll take a look at this over the weekend.

  • This is exactly why I never really liked CSS. It can so easily go wrong on different resolution screens!
    When I wrote games, I would use Javascript on Canvas, with my own font so that everything was scaled as % of screen width and height.
    I had my own library for this. It was the only way to guarantee everything works on all devices.

    Look at this: its a mess, and Flip4 is not an uncommon device
    Screenshot_20230629_235950_Chrome~2.jpg

    What does having this extra Tag saying Author really add?
    I dont want to be critical, but it might be better to have the user group badges as shorter names, then that would reduce overlaps?

    @Panda said in Whitespace fixes in Nodebb:

    What does having this extra Tag saying Author really add?

    Missed this question. This specific tag adds “author” to who originally created the topic. It’s a useful way of identifying the original poster throughout a long thread.

  • @phenomlab
    Interesting. Because it is not obvious which name is what rank, I suggest an alphabetical list.
    For example, something like
    ACE (highest)
    COMMANDER
    EXPERT
    GURU
    ROOKIE
    STARTER (lowest)

    @Panda Just circling back here with something of an update (which I think you’ll like). I’ve completely restructured the ranking system. There are now less ranks, with a higher point threshold to reach them.

    More importantly, if you reload the site, you’ll notice that the ranks are now icons.

    I also removed the “Author” badge, and made this a single icon, which (to me) looks much better.


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
  • Test of youtube embeds

    Solved Configure nodebb
    14
    11 Votes
    14 Posts
    2k Views
    @phenomlab Perfect!!! Many thanks.
  • MogoDB v6 to v7 upgrade

    Solved Configure nodebb
    5
    1 Votes
    5 Posts
    1k Views
    @Panda if you used the Ubuntu PPA, I think this only goes as far as 6.x if I recall correctly.
  • How to fix size of photos & videos NodeBB

    Solved Customisation nodebb nodebb size
    7
    3 Votes
    7 Posts
    1k Views
    @crazycells pleasure. Using percentages makes much more sense in this case. It’s the same argument with px vs pt vs em with fonts, margins, padding, etc., in the sense that em is generally preferred over px and pt https://stackoverflow.com/questions/609517/why-em-instead-of-px
  • Changing Background on NodeBB

    Solved Customisation background image nodebb
    4
    0 Votes
    4 Posts
    1k Views
    @cagatay You’d target the body tag and use the below line of CSS background: url(/assets/customcss/backgrounds/default/default.png) no-repeat center center fixed; Obviously, you need to change the path to suit where your image is being stored. More info around the background property can be found here https://www.w3schools.com/cssref/css3_pr_background.php
  • Title on homepage of nodebb forum

    Solved Customisation nodebb
    2
    1 Votes
    2 Posts
    1k Views
    @eveh Welcome board The code you are referring to is custom written as no such functionality exists under NodeBB. However, adding the functionality is relatively trivial. Below are the required steps Navigate to /admin/appearance/customise#custom-header Add the below code to your header, and save once completed <ol id="mainbanner" class="breadcrumb"><li id="addtext">Your Title Goes Here</li></ol> Navigate to /admin/appearance/customise#custom-js and add the below code, then save $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { // Initialise mainbanner ID, but hide it from view $('#mainbanner').hide(); var pathname = window.location.pathname; if (pathname === "/") { $("#addtext").text("Your Title"); $('#mainbanner').show(); } else {} // If we want to add a title to a sub page, uncomment the below and adjust accordingly //if (pathname === "/yourpath") { //$("#addtext").text("Your Title"); //$('#mainbanner').show(); //} }); }); Navigate to /admin/appearance/customise#custom-css and add the below CSS block .breadcrumb { right: 0; margin-right: auto; text-align: center; background: #0086c4; color: #ffffff; width: 100vw; position: relative; margin-left: -50vw; left: 50%; top: 50px; position: fixed; z-index: 1020; } Note, that you will need to adjust your CSS code to suit your own site / requirements.
  • Adjusting the size of boxes in posts-list class

    Solved Customisation nodebb
    3
    3 Votes
    3 Posts
    1k Views
    @phenomlab thanks a lot, this combination works best .posts-list .posts-list-item .content { overflow: auto; max-height: 600px; }
  • [NODEBB] Reply Button/arrow answer

    Solved Customisation css nodebb
    25
    4
    4 Votes
    25 Posts
    6k Views
    Topic open https://sudonix.com/topic/207/nodebb-help-for-my-custom-css
  • [NODEBB] Welcome Message

    Solved Customisation css html nodebb
    20
    2
    13 Votes
    20 Posts
    5k Views
    @DownPW the ‘js’ code for the banner takes the time from the client, so what it displays really depends on the regional settings for the operating system. I’ve not seen this issue myself but would like to see some examples of screenshots if possible.