How to add header menu links


(Sam Saffron) #21

FWIW this is what my theme looks like at the moment, I do want to tweak it a bit more.

avatars and categories are there.

We have a pretty big pain point around sharing themes I would like us to address, all this cutting and pasting is just tedious and error prone.

Good luck with your new forum, let us know how you go, we are alway interested in feedback.

(Chris Saenz) #22

I’m using the latest version. I keep it on its own stylesheet which makes updates easy. My own overrides go on another sheet.

(ljpp) #23

Are you on beta or stable channel?

(Chris Saenz) #24

I’m on beta… That doesn’t affect the css though.

Pro tip: look at the source HTML on any Discourse forum page, it has the exact version number.

(ljpp) #25

The Minimal should work OOTB when copied to the Customizations? Tried it again and the Avatars and categories disappear.

(Sam Saffron) #26

You are running version 1.4.3, strongly recommend you update to the latest beta at least.

(ljpp) #27

Yeah I am running stable. Back in the days I started with beta branch (on different a project) and plugin breakage occurred due to updates (for example AdSense). When we start pushing 100K daily pageviews and 800 concurrent users next spring (Playoffs!), I have zero tolerance for breakage.

(Sam Saffron) #28

Fair enough, if that is the case I would strongly recommend keeping with the default theme and using CSS to slightly amend the visuals.

(ljpp) #29

Yes, true that. Luckily you can simply switch of customization that have been applied from the admin interface. But seriously loving Discourse - just looking for a slightly cleaner main view and a bit of polish to have that taylor made look.

(Kane York) #30

Huh? I think that the Export/Import buttons work. Are they just too nonobvious?

(Sam Saffron) #31

Import/export is very flawed, no way of dealing with versioning or updates. Complex to share.

Instead we should probably just allow us to point at a GitHub repo and update from GitHub repo with a refresh button.

Also customisations need versioning, no way to rollback changes or see who did what.

(Pad Pors) #32

that was a nice how-to, thanks.

wondering if there is a way to add elements to the header menu only on the topic-list-page or only on a topic page. does anyone have any idea how to do that?

(Pad Pors) #33

does this work with the new header?

(Chris Saenz) #34

Still working on my site,

(Pad Pors) #35

I put exactly the same codes you shared in the admin-customize panel, and nothing happened. should i modify any part? or do you have any idea why it’s not working?

(Chris Saenz) #36

Be sure you enable the customized sheet.

Please link to your site, maybe I can see what’s up.

(Drakon Dawn) #37

Where in the CSS code does it handle the padding between each entry? I’d like to have the links in the navbar of where the logo is right now but they’re all too squished to the right with no proper padding or fancy hover animations XD. Can someone point to me how I can do that? Thanks, I’m not a CSS expert, im very basic.

(Chris Saenz) #38

See section 3 (style the header links) in the original post. I arrived at 13px.

My code doesn’t have hover animations, as I’m not a Javascript whiz… you’re on your own there.

Best advice to anyone trying to customize this header… learn to use Firebug (or the Chrome equivalent). F12 brings it up. Inspect what’s already there, you can tweak it in real time, try and learn how it works. If you can make it happen in Firebug, then copy those changes into your own CSS sheet, and it will work there too.

(App) #39

Hi Chris - I’ve just published a new article on menu which auto hide on page scroll.

Hope that helps other folks.

(Mittineague) #40

That looks to work well.

Having seen this before I’ve always been hesitant to use the scroll event.

Since scroll events can fire at a high rate, the event handler shouldn’t execute computationally expensive operations such as DOM modifications. Instead, it is recommended to throttle the event using requestAnimationFrame, setTimeout or customEvent

Did your testing show this to not be a problem with that code?