Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Home button
« Reply #15, on March 10th, 2012, 08:28 PM »
Same in a different palette?

Aaron

  • Posts: 356
Re: Home button
« Reply #16, on March 11th, 2012, 12:50 AM »
Why not give the community menu a speech bubble instead?
"The entire British Empire was built on cups of tea … and if you think I'm going to war without one, mate, you're mistaken."

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Home button
« Reply #17, on March 11th, 2012, 01:05 AM »
Well, I was lazy and mindful of a few things. The way it's implemented is that there is the original Home menu and an extra site_home item before it. In the event that the home URL is empty, the site_home item is show = false, and the normal menu is the 'home' item (caption determined the same way). This has the side benefit that all the usual action detection/highlighting the right item works as expected.

In the event that the home URL is populated, this extra menu is show = true, the caption of the regular menu item is also changed, but in all other respects, it's business as usual.

Since the icon is set in CSS, it's keyed off .m_home (which would make the other keyed off .m_site_home)... if we wanted to have the "home button" have the house icon when the extra button is off, but have another icon when not, we'd need to alter the key itself of the menu, so that we can use different CSS for it.

Which would ultimately mean either unsetting and re-inserting a new array item, which isn't the cheapest thing in the world, or we bastardise the menu thusly:

Code: [Select]
'site_home' => array(...),
(empty($settings['home_url']) ? 'home' : 'community') => array(...),

And I'm not even sure that's legal syntax, even if it is, it's ugly. But that's the only ways to do it.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Home button
« Reply #18, on March 11th, 2012, 07:44 AM »
You're too concerned about a small detail ;)

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Home button
« Reply #19, on March 11th, 2012, 08:00 AM »
Ahem... icon,, no icon, icon, icon...  yeah. Either the extra menu item gets an icon or they all go plain text.
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Home button
« Reply #20, on March 11th, 2012, 09:30 AM »
Again use the same icon. In grayscale.
filter: gray()