Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-01-28 00:28:29

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

cleaning up the menu

So im wandering
im using ce4 theme for wordpress and everything is working as expected php plugins is working but the look of the multi level navigation when viewed on a mobile device is to me messy with the navigation items {non ce4 but wordpress} which have sub directories in the middle while the top level navigation items align left.

surely php plugins are the way forwards for this and ive probably missed it somewhere but i just want a tidy menu structure with everything left aligning when in mobile view so i have nice clean menus and the items with dropdowns have the arrow on the right

Offline

#2 2015-01-28 00:48:32

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

actually, any menu styling should be coming from the TTG plug-in (hard to tell for certain without seeing what you're doing, can you post a link?)

In Lightroom, activate both side panels in the Web Module. You'll see the mobile menu icon. Click on that and you'll see what your menu will look like.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2015-01-28 00:56:04

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

my wordpress pages have overwritten/ deactivated the ce4 standard menu
http://www.jayclappphotography.co.uk

Offline

#4 2015-01-28 01:29:51

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

no, that's the ttg mobile styling being applied.

Look in Lightroom and open up the side panels to make the preview area smaller. You'll see the same thing happening there.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2015-01-28 01:50:15

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

okay we got that far but the collapsed view still has the drop down bit  center aligned as opposed to left aligned

Last edited by cwazywabit (2015-01-28 01:51:48)

Offline

#6 2015-01-28 02:00:21

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

well technically they are all center aligned but because of 2 links per line it forces the drop down ones out of line so just getting the menu items to display 1 per line would solve it

Offline

#7 2015-01-28 02:27:06

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

I don't think there is anything you can do about having two items per line. It's probably in the javascript.
You can change text alignment with custom css but you'll need to tailor it so it only affects the text and not the drop down icons.
And it looks like there are different selectors for items with-sub-menu and items without.

And you can style the menu with colors so that the layout will look cleaner:
http://ce4.theturninggate.net/docs/doku … tion_items


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2015-01-28 02:50:05

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

maybe Mathew can help with the javascript side of things or know a work around.
i realize colours will indeed help it separate out more and if need be ill have to go that route

Offline

#9 2015-01-28 04:12:03

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

ive just played about with the navigation css and got everything to left align and have one item per line job done smile

Offline

#10 2015-01-28 04:48:52

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

very cool
curious as to what you changed, I haven't had the time to play with it (and want to avoid going down the rabbit hole of curiousity wink ).


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#11 2015-01-28 04:58:32

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

the navigation css is in the lib folder towards the bottom you have the for small displays options
look for the only width 50% and change that to 100% and change the second and third text align to left align

Offline

#12 2015-01-28 05:03:05

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

ive just changed the trigger width to 35% from 20

Last edited by cwazywabit (2015-01-28 05:06:44)

Offline

#13 2015-01-28 05:54:31

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

got it. You saved me some inspecting wink

one thing to think about is that if you export your theme again, that css will be overwritten. So the safe thing to do is to use custom css via phplugins.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#14 2015-01-28 06:15:27

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

a little bit of padding on the drop-down arrow helps too

.js #r2d2-menu #nav li.has-submenu > a.expand-submenu {
    padding-left: 8px;
}

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#15 2015-01-28 06:45:03

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

Yeh good point I'm glad it's sorted now it was doing my head in haha

Offline

#16 2015-01-28 07:30:36

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

I'm glad you posted about this. That was a good exercise with some pretty good results.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#17 2015-01-28 09:59:28

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: cleaning up the menu

I like the one item per line in your mobile menu!


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#18 2015-01-28 10:23:24

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

I did too. So I stole the idea for my site wink


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#19 2015-01-28 15:02:51

cwazywabit
Member
Registered: 2013-12-26
Posts: 71

Re: cleaning up the menu

see now all we need is for one of you guys to write the code to paste into php plugins because im not very good on that side of things im better at finding the right bit of code to change

Offline

#20 2015-01-28 15:14:10

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

I'll post the custom css in the morning.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#21 2015-01-30 00:07:12

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: cleaning up the menu

oops a day late. But here's what I used (and I'm assuming is close to the same changes you made)

first, enable phplugins globally and then enable custom css in the phplugins.php file

and here's the css to put in the custom.css file:

@media only screen and (max-width: 784px) {
#nav span a, 
#nav span a:hover, 
#nav > span:first-child > a, 
#nav li a, 
#nav li a:hover, 
#nav li span, 
#nav li li a, 
#nav li li span,  
#nav > li:first-child > a     {
text-align: left;
}

.js #r2d2-menu ul#nav li {
        width: 100%;
        }
.js #r2d2-menu #nav li.has-submenu > a.expand-submenu {
    padding-left: 8px;
    width: 35%;
    width: calc(35% - 3px);
        }
}

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#22 2015-02-14 06:04:36

gaufde
Member
From: Ojai, CA
Registered: 2014-07-11
Posts: 72
Website

Re: cleaning up the menu

Thanks you guys for doing this as I really like the way this looks. I did play around with it some, and I added to the code so that drop-down menu items on mobile devices are indented 50px to make it easier to see. I am still learning, so if anyone sees an improvement to the code that I could make please let me know.
Here is what I am using now:

/*MENU ALIGNMENT*/
@media only screen and (max-width: 784px) {
#nav span a, 
#nav span a:hover, 
#nav > span:first-child > a, 
#nav li a, 
#nav li a:hover, 
#nav li span, 
#nav li li a, 
#nav li li span,  
#nav > li:first-child > a     {
text-align: left;
}
#nav li ul li > a {
    margin-left: 50px;
    }

#nav li ul li > a:hover {
    margin-left: 50px;
    }
.js #r2d2-menu ul#nav li {
        width: 100%;
        }
.js #r2d2-menu #nav li.has-submenu > a.expand-submenu {
    padding-left: 8px;
    width: 35%;
    width: calc(35% - 3px);
        }
}

Graceson Aufderheide
gracesonaufderheide.com

Offline

Board footer

Powered by FluxBB