How to add top bar?

AI-generated summary

In a support thread titled “How to add top bar?”, kudouyuzi asked how to replicate a top navigation bar seen on the Sublime Forum. fefrei provided a step-by-step guide: navigate to Admin > Customize, create a new theme component, and insert custom HTML in the Header section. A basic HTML skeleton was shared, featuring a styled unordered list with sample links, designed to match Discourse’s default theme. kudouyuzi noted the result didn’t look good, prompting BenM to clarify that the example was meant to be customized. fefrei agreed, encouraging personalization to fit desired aesthetics. The consensus is that while the provided code serves as a functional starting point, users should modify CSS and HTML to achieve their preferred look and feel.

How to add same this top bar?

This is the demo site link 3.0 (Build 3143) FAQ - General Discussion - Sublime Forum

That’s relatively easy to do :slight_smile:
Here’s how you get started: In Admin, go to Customize. There, you can create and edit themes and theme components. Create a new theme component, and give it a sensible name. Then, you can edit CSS and HTML there.

You’ll want to add the HTML for the bar in the Header section. Here’s a skeleton to get started – it’ll be themed like Discourse itself:

<div class="custom-header">
    <div id="top-navbar" class="wrap">
        <ul class="nav nav-pills" style="margin: 0px;">
            <li class="top-navbar-links">
                <a href="https://meta.discourse.org/">Amazing Link</a>
            </li>
            <li class="top-navbar-links">
                <a href="https://meta.discourse.org/">Wonderful Link</a>
            </li>
        </ul>
    </div>
</div>

Don’t forget to enable the new theme component in the Default theme when you’re done :slight_smile:

its does not look good

He said it will be themed as Discourse, change and modify yourself to make it a way you want.

Yeah, it’s just meant as a starting point. Make it your own! :slight_smile: