Skip to content

[NODEBB] Wallpapers BUG on Firefox Mobile ?

Solved Customisation
  • Hello @phenomlab

    My wallpapers works great on Chrome, Vivaldi, Brave on mobile but no on firefox.
    If I don’t scroll the page, wallpaper is OK. If i scroll on a category with lot of topics, i have a black color at the bottom of the sreeen after the wallpeper.

    ONLY on FIREFOX

    I have this code :

    /* Smartphone */
    @media (min-width: 320px) {
            body {
            background: url(https://domain.com/assets/customcss/backgrounds/default/default_01.png) no-repeat center center fixed; /*Background01*/
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
            background-color: transparent !important; 
        }
    }
    

    -moz-background-size: cover is declared for Gecho but I have this :

    d9b8067c-4943-47e7-83b7-73406fcc4524-image.png

    Thanks 😉

  • @phenomlab

    I have fixed the bug with a body: after like this :

    /* Smartphone */
    @media (min-width: 320px) {
            body {
            background: url(https://XXXX.XXX/assets/customcss/backgrounds/default/default_01.png) no-repeat center center scroll; /*Background01*/
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
            background-color: transparent !important; 
        }
        
        body:after{
          content:"";
          position:fixed; /* stretch a fixed position to the whole screen */
          top:0;
          height:100vh; /* fix for mobile browser address bar appearing disappearing */
          left:0;
          right:0;
          z-index:-1; /* needed to keep in the background */
          background: url(https://XXXX.XXXX/assets/customcss/backgrounds/default/default_01.png) center center;
          -webkit-background-size: cover;
          -moz-background-size: cover;
          -o-background-size: cover;
          background-size: cover;
          background-color: transparent !important; 
    }  
    }
    

    But I don’t know if this is a good solution.

    What do you think ?

    Could it be simpler than that?

  • @downpw This looks extremely complex. I think you should be looking at background-repeat - see https://www.w3schools.com/CSSref/pr_background-repeat.asp

  • I will test soon and let you know if it’s ok

    like this ?

    /* Smartphone */
    @media (min-width: 320px) {
            body {
            background-image: url(https://XXXX.XXX/assets/customcss/backgrounds/default/default_01.png) 
            background-repeat: repeat-y
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
            background-color: transparent !important; 
        }
    }
    
  • @downpw yes, that should work, but you probably need to experiment to get the best results.

  • @phenomlab

    Thats works but It’s really not very pretty 😞

    The code I have find on the web is complex, but it do the job perfectly.

    The result is exactly the same on Chrome based browsers and Firefox Mobile.
    and that’s what I’m looking for because I have a lot of FF users on mobile.

    I don’t understand why Firefox Mobile doesn’t interpret this code the same way.

    It is very frustrating 😞

    If you have better for the same result, I’m a taker of course 🙂

  • @downpw this is very odd. Firefox uses the Gecko engine and Chrome uses WebKit. They aren’t too far apart in terms of standards, so it should be the same across browsers.

  • the code which is complex does the job.

    He remove the black bar without repeating the wallpaper.

    I had trouble finding this code.

    A lot of people have the same problem apparently under Firefox Mobile app. On firefox desktop app, it’s OK.

    This is really a specificity of the mobile version.
    Maybe on the renderer.

  • @downpw I’m inclined to agree with this. There isn’t much else you can do, and provided it works with no odd looking artefacts in other browsers, then ok. The :before and :after are pseudo classes and very well supported across all browsers (except perhaps Internet Exploder, but who uses that these days ?)

  • phenomlabundefined phenomlab has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • 2 Votes
    4 Posts
    174 Views

    @Panda said in Sidebar Widget is no longer on the side!:

    Ah, so sidebar wont work on mobile?

    Correct. If you review the docs on bootstrap, you’ll notice that it is designed on a grid system

    https://getbootstrap.com/docs/5.0/layout/grid/

    What I mean by changing the category is moving it on here to general as you posted it in bugs, when it isn’t.

  • 1 Votes
    4 Posts
    475 Views

    @eeeee if you’re using the console, you could try

    node app.js > app.log 2>&1

    This would redirect stdout to a file named app.log and redirect stderr to stdout.

    I’m not sure about standard logging under NodeBB, but there is an error log located at logs/error.log.

    Failing that, you could always stop the NodeBB service then use ./nodebb dev from the console which would then provide debug output.

  • 6 Votes
    25 Posts
    2k Views

    @phenomlab said in Q&A Plugin Changes NodeBB:

    float: right;
    left: 10px;
    }

    worked thank you 🙂

  • 13 Votes
    21 Posts
    2k Views

    @pobojmoks that’s easily done by modifying the code provided here so that it targets background rather than border

    In essence, the below should work

    $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { $('.recent-card-container').each(function(i) { var dataId = $(this).attr("data-cid"); var color = $('[role="presentation"]', this).css("background-color"); console.log("data-cid " + dataId + " is " + color); $('[data-cid="' + dataId + '"] .recent-card').attr("style", "background-color: " + color); }); }); });
  • 3 Votes
    2 Posts
    555 Views

    @pwsincd welcome to sudonix, and thanks for the comments. What your looking for is here

    https://sudonix.com/topic/195/nodebb-welcome-message/3?_=1648295651358

  • 2 Votes
    10 Posts
    859 Views

    @DownPW

    We just have to change the cycles automatically according to each period ?

    Yes, this is by far the safest

    I think it is possible to achieve the goal, I have already seen this kind of thing on a site without any perf problems.

    It’s certainly possible, but not without issues or impact to performance (in my view)

  • [NODEBB] Welcome Message

    Solved Customisation
    18
    13 Votes
    18 Posts
    2k Views

    For anyone reviewing this post, there’s an updated version here that also includes an sunrise / sun / moon icon depending on the time of day

    https://sudonix.com/topic/233/nodebb-welcome-message-with-logo-footer-change/3?_=1645445273209

  • 9 Votes
    47 Posts
    4k Views

    @phenomlab said in RSS parser script [NodeBB]:

    @jac Not yet. Sorry. Have some other work commitments I need to prioritise. Hoping to get to this over the weekend.

    No worries at all mate, thanks 👍🏻