Carousel only visible on community landing page?

It looks like they have a <div class="welcome-message"> that contains the landing page area on every page. It has probably been added with the admin>customize>css/html>top editor. It is set to display: none. What they are using as their landing page is the categories-list page. It adds a class of .categories-list to the page’s body tag. So if you add the css .categories-list .welcome-message{ display: block;} the previously hidden welcome message will show up on that page.

They have added this script. I’m guessing it has been added to the custom header html area. They are using the .showing-welcome class to push the Discourse header .d-header down 375px and to toggle the display of the welcome area. I think you could manage without it and just base the styles off of the .categories-list class.


    Discourse.DiscoveryCategoriesRoute.reopen({
        activate: function() {
            this._super();
            Em.run.next(function(){
              $('.welcome-message').show();
              $('.circle-img-welcome').show();
              $('body').addClass("showing-welcome");
            });
        },
        deactivate: function() {
            this._super();
            $('.welcome-message').hide();
            $('.circle-img-welcome').hide();
            $('body').removeClass("showing-welcome");
        }
    });
    $('.showing-welcome .d-header').waypoint('sticky', {
        offset: 70
    });

4 Likes