Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Random Username on January 27, 2023, 05:30:44 AM

Title: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 05:30:44 AM
Could someone throw me a bone? I'd like symbols only for both text and mobile...

Thank you.  ;D
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Kindred on January 27, 2023, 06:56:04 AM
It's a bad idea...  but if you must, adjust the css
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 08:28:11 AM
Hey, Kindred. I love how you're always looking out for me and the software and your team. You're a good guy. Why is it a bad idea? Any hint on where in the CSS? I'm really getting better at this stuff but I'm still a rookie. ;)
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Kindred on January 27, 2023, 08:32:51 AM
It's a bad idea, because not all users are visually cued by icons.
It's done on Mobile devices because the space savings is more important,  but on a screen that has the space,  icon+words is best, words only is ok, icon only is recommended as no.

I don't know the specific css section off the top of my head, but i do know that that's how the wide screen vs mobile screen shift is controlled in the first place
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 08:40:50 AM
That's cool. My menu is fairly crowded though because I combined the two menus into the top one. Vertical space is critical foy my site. In time I will be wanting to add a couple things to the menu via the CMS so the space is going to come in handy. Thanks. I will find it. ;)
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: TwitchisMental on January 27, 2023, 10:59:46 AM
This should do the trick -

.dropmenu .textmenu, #top_info .textmenu {
  display: none;
}
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 12:28:03 PM
Hey @TwitchisMental, I super appreciate the help but I can't find that anywhere. I searched every css file in my theme and then in the pristine install package to no avail? What am I missing? lol
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: [chrisB] on January 27, 2023, 12:31:05 PM
Quote from: Random Username on January 27, 2023, 12:28:03 PMHey @TwitchisMental, I super appreciate the help but I can't find that anywhere. I searched every css file in my theme and then in the pristine install package to no avail? What am I missing? lol
Add it to your responsive.css at the very bottom.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 12:39:57 PM
Hey, unfortunately when I did that Messages and Alerts weren't there at all anymore. Weird.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 12:44:04 PM
Well, I guess it makes sense because there aren't symbols for those on desktop.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Steve on January 27, 2023, 12:56:00 PM
Quote from: [chrisB] on January 27, 2023, 12:31:05 PMAdd it to your responsive.css at the very bottom.
Try adding it to the default theme's index.css instead.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 01:02:31 PM
Same thing, I'm afraid. No Messages or Alerts. Strange there are symbols for everything else on desktop. I prefer consistency. Figure my users will learn the icons.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Steve on January 27, 2023, 01:05:39 PM
Okay, will have to wait for @TwitchisMental to respond to your which file question then.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 01:13:53 PM
I appreciate all the help. You guys rock.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Kindred on January 27, 2023, 03:17:25 PM
That's because messages and alerts are a different sort of menu and, as you noted, don't have icons.

You opted to do a custom menu that combines things that smf had kept separate....  so you're going to need custom coding and css as well
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 03:48:13 PM
Understood.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: TwitchisMental on January 27, 2023, 03:59:04 PM
Quote from: Random Username on January 27, 2023, 12:39:57 PMHey, unfortunately when I did that Messages and Alerts weren't there at all anymore. Weird.
Ah yes, you'd have to allow those icons to show in desktop view.

open your index.css and find -

#pm_menu_top .main_icons, #alerts_menu_top .main_icons {
  display: none;
}

change to

#pm_menu_top .main_icons, #alerts_menu_top .main_icons {
  display: inline-block;
}
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 04:23:13 PM
Hey, that worked like a charm! But, see, I was also hoping it was going to solve a problem I have. The larger user control panel drop down and the alert and message dropdowns aren't overlapping the background elements as they should. I thought it was because there wasn't enough room on the menu bar but apparently I was wrong. I made a mistake thinking the difference was caused by limitations in the test site when I only checked one theme. I've changed all the template files out and sources and the problem persists. It can only be something in the .css file I messed up. It seems like a needle in a haystack to me. Can you possible point me in the right direction? And, regardless, @TwitchisMental, if you shoot me a PM, I'd like to buy you a beer for the help already given.Untitled-1.jpgUntitled-2.jpg

*Just thought there must be tools to compare text files...so on hunt.*
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: TwitchisMental on January 27, 2023, 04:43:33 PM
Quote from: Random Username on January 27, 2023, 04:23:13 PMHey, that worked like a charm! But, see, I was also hoping it was going to solve a problem I have. The larger user control panel drop down and the alert and message dropdowns aren't overlapping the background elements as they should. I thought it was because there wasn't enough room on the menu bar but apparently I was wrong. I made a mistake thinking the difference was caused by limitations in the test site when I only checked one theme. I've changed all the template files out and sources and the problem persists. It can only be something in the .css file I messed up. It seems like a needle in a haystack to me. Can you possible point me in the right direction? And, regardless, @TwitchisMental, if you shoot me a PM, I'd like to buy you a beer for the help already given.[url="https://www.simplemachines.org/community/index.php?action=dlattach;attach=285409;type=preview;file"]Untitled-1.jpg[/url][url="https://www.simplemachines.org/community/index.php?action=dlattach;attach=285411;type=preview;file"]Untitled-2.jpg[/url]

*Just thought there must be tools to compare text files...so on hunt.*
It would be easier for me to find the issue with a link to the site in question.

You can PM me the link if needed.  I will take a look in a few hours.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 27, 2023, 05:44:27 PM
Hey, no idea how it happened but I had a bunch of extra stuff in the css file. Thank you very much, @TwitchisMental. Shoot me an email and I'll throw you a reward.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 28, 2023, 06:30:49 AM
Hey, I still have a problem on mobile. When logged out, the menu items are listing down the screen instead of across it.  Sigh. This menu is going to kill me. ;)

Thanks again!!tempFileForShare_20230128-062650.2jpg.jpg
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Antechinus on January 28, 2023, 05:48:21 PM
Quote from: Kindred on January 27, 2023, 08:32:51 AMIt's a bad idea, because not all users are visually cued by icons.
It's done on Mobile devices because the space savings is more important,  but on a screen that has the space,  icon+words is best...
TBH, I find that most of the time icons just get in the way of scanning the menu, but it depends how many items there are. If there are only a few, icons are ok. If there is a list of a dozen items, I'd rather just have the text.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 28, 2023, 07:08:29 PM
I haven't decided whether to keep the icons only. I thought the problem was because the menu was too crowded. It seems that isn't the case. I just don't want to mess with the code until I find a solution. I probably will use both text and icons.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: TwitchisMental on January 30, 2023, 11:13:08 AM
Quote from: Random Username on January 28, 2023, 06:30:49 AMHey, I still have a problem on mobile. When logged out, the menu items are listing down the screen instead of across it.  Sigh. This menu is going to kill me. ;)

Thanks again!!tempFileForShare_20230128-062650.2jpg.jpg (https://www.simplemachines.org/community/index.php?action=dlattach;attach=285416;type=preview;file)
To be fair this is the way it is designed since it is for mobile.. Making this left to right is most likely not going to fit horizontal wise on mobile devices.

If you must do this using display: inline for the dropmenu li is what you would need to do in the responsive css.
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 30, 2023, 04:07:25 PM
I hear what you're saying. If it doesn't fit, I have another idea. I added this to the bottom of responsive.css but it didn't work:
.dropmenu li {
    display:inline;
}
Title: Re: Help removing text from menu, leaving just symbols like mobile?
Post by: Random Username on January 30, 2023, 05:11:30 PM
So, this is resolved. My developer made a toggle to make the menu go on and off screen.

Thank you for all the help!