- This topic has 19 replies, 3 voices, and was last updated 10 years, 1 month ago by
Evandro Arruda.
-
AuthorPosts
-
February 22, 2016 at 11:23 pm #174577
Sven
Hi Tom,
I actually stumbled over a theme.
I like the nav bar at the right side for the vertical navigation between sections. Do you know such a plugin (or key words to search for)? Or can it be implemented directly into GP?
Regards,
Sven-
This topic was modified 10 years, 1 month ago by
Tom.
February 22, 2016 at 11:37 pm #174586Tom
Lead DeveloperLead DeveloperNot aware of any plugins, but it’s worth searching for.
Something like this could definitely be integrated into GP.
I want to add more one-page features into GP, this would be one of them – maybe in Menu Plus ๐
February 23, 2016 at 5:51 am #174653Sven
What about that idea: one creates and positions a “flying box” within the page. In this box the links could easily be arranged with anchor per section…!?
like a
.my-handmade-vertical-menu {
properties like position, width, ul/li etc
}What do you think about that?
February 23, 2016 at 9:56 am #174722Tom
Lead DeveloperLead DeveloperCould absolutely be done using GP Hooks.
For example:
<?php if ( is_page( 'my-specific-page' ) ) : ?> <div class="my-handmade-vertical-menu"> <ul> <li><a href="#first-section">First section</a></li> <li><a href="#second-section">Second section</a></li> <li><a href="#third-section">Third section</a></li> <li><a href="#fourth-section">Fourth section</a></li> </ul> </div> <?php endif; ?>Then some CSS:
.my-handmade-vertical-menu { position: fixed; top: 40%; right: 0; } .my-handmade-vertical-menu ul, .my-handmade-vertical-menu li { list-style-type: none; margin:0; padding: 0; width: 200px; background: #222222; } .my-handmade-vertical-menu li a { display: block; padding: 5px 10px; color: #FFF; }Something along those lines ๐
February 23, 2016 at 11:23 am #174743Sven
WOW – thumbs up! ๐
And I’m nearly done… two open tasks:
1. sections with background-images float in the front, so the list isn’t on top (floats behind the images)
2. how to format the list, so that
a. text appears on hover over the bulletpoint
b. the actual anchor (as bulletpoints I want to have “O”s) is marked strongIt’s on my start page: http://sven-koeck.de
February 23, 2016 at 11:56 am #174761Sven
1.: hooked it to “wp_footer” and voila!
2.: seems more tricky to me…
February 23, 2016 at 1:07 pm #174783Sven
1. understanding now “z-index”! ๐
2. I changed the style (from list to words) and rotated the text 90ยฐ – but I cannot place that “menu” on the right side of the page… any ideas?
/* define vertical menu */ .my-handmade-vertical-menu { position: fixed; bottom: 0; right: 0; margin:0; padding: 0; width: 100%; color: #000; background-color: #fff; white-space:nowrap; z-index: 3; -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); //For IE support writing-mode: tb-rl; } .my-handmade-vertical-menu a { display: inline; padding: 5px 2px; color: #000; } .my-handmade-vertical-menu a:hover { font-weight: bold; cursor: pointer; }php/wp_footer:
<?php if ( is_front_page() ) : ?> <div class="my-handmade-vertical-menu"> <a href="#focus">Mandanten</a> <a href="#aboutus">warum ich</a> <a href="#team">V-Cards</a> <a href="#testimonials">Kundenstimmen</a> <a href="#ribbonright">Bewerten</a> <a href="#latestnews">Aktuelles</a> <a href="#kontakt">Kontakt</a> </div> <?php endif; ?>February 23, 2016 at 9:50 pm #174857Tom
Lead DeveloperLead DeveloperDid you take it out for now? I’m not seeing it on your site.
Let me know ๐
February 23, 2016 at 10:21 pm #174860Sven
Took it out, because I couldn’t get it working as I wanted it… ๐
Added again, so you can take a look: http://sven-koeck.de
February 24, 2016 at 11:40 am #174966Tom
Lead DeveloperLead DeveloperHmm I’m not too sure what you’re trying to do? Why is the text all rotated 90 degrees?
February 24, 2016 at 10:02 pm #175047Sven
I rotated the text, because I thought it would look nicer. I was wrong!
Actual status: list of “fa fa-circle-o”s, on hover: each is replaced with text
I try to replace the “fa fa-circle-o” with “fa fa-circle” on hover/active (as in most image sliders, only vertical not horizontal), but the script hides the “i”-class cempletely! Fiddling around… ideas?
<?php if ( is_front_page() ) : ?> <div class="my-handmade-vertical-menu"> <ul> <li class="top"><i class="fa fa-circle-o"></i><a href="#top">Start</a></li> <li class="focus"><i class="fa fa-circle-o"></i><a href="#focus">Mandanten</a></li> <li class="aboutus"><i class="fa fa-circle-o"></i><a href="#aboutus">warum ich</a></li> <li class="team"><i class="fa fa-circle-o"></i><a href="#team">E-Visitenkarten</a></li> <li class="testimonials"><i class="fa fa-circle-o"></i><a href="#testimonials">Kundenstimmen</a></li> <li class="ribbonright"><i class="fa fa-circle-o"></i><a href="#ribbonright">Bewerten sie mich</a></li> <li class="latestnews"><i class="fa fa-circle-o"></i><a href="#latestnews">Aktuelles</a></li> <li class="contact"><i class="fa fa-circle-o"></i><a href="#contact">Kontakt aufnehmen</a></li></ul> </div> <?php endif; ?>/* define vertical menu */ .my-handmade-vertical-menu { position: fixed; top: 348px; left: -60px; margin: 0px; padding: 20px; width: 58px; color: #000; background-color: rgba(255, 255, 255, 0.2); white-space:nowrap; z-index: 3; } .my-handmade-vertical-menu a { display: block; } /* replace and re-show text in vertical menu */ .my-handmade-vertical-menu ul .top, .my-handmade-vertical-menu ul .focus, .my-handmade-vertical-menu ul .aboutus, .my-handmade-vertical-menu ul .team, .my-handmade-vertical-menu ul .testimonials, .my-handmade-vertical-menu ul .ribbonright, .my-handmade-vertical-menu ul .latestnews, .my-handmade-vertical-menu ul .contact { background: none; } .my-handmade-vertical-menu ul li:hover i:before { content:""; } .my-handmade-vertical-menu ul li i{ display: block; } .my-handmade-vertical-menu ul li:hover i{ display: none; } .my-handmade-vertical-menu ul li a{ display: none; } .my-handmade-vertical-menu ul li:hover a{ display: block; color: #12324e; }February 25, 2016 at 12:30 am #175068Tom
Lead DeveloperLead DeveloperTry this..
.my-handmade-vertical-menu li a:before { font-family: FontAwesome; content: "\f111"; } .my-handmade-vertical-menu li:hover a:before { font-family: FontAwesome; content: "\f10c"; }Then you can completely remove the
<i>element from the HTML ๐February 25, 2016 at 3:24 am #175126Sven
Thank you for that piece of code!
–> now the text appears by default… I only want to have it shown on hover!
here’s the actual code:
<?php if ( is_front_page() ) : ?> <div class="my-handmade-vertical-menu"> <ul> <li class="top"><a href="#top">Start</a></li> <li class="focus"><a href="#focus">Mandanten</a></li> <li class="aboutus"><a href="#aboutus">warum ich</a></li> <li class="team"><a href="#team">vCards</a></li> <li class="testimonials"><a href="#testimonials">Kunden</a></li> <li class="ribbonright"><a href="#ribbonright">Bewerten</a></li> <li class="latestnews"><a href="#latestnews">Aktuelles</a></li> <li class="contact"><a href="#contact">Kontakt</a></li></ul> </div> <?php endif; ?>/* define vertical menu */ .my-handmade-vertical-menu { position: fixed; bottom: 40px; left: -60px; right: 100px; margin: 0px; padding: 20px; width: 58px; color: #000; background-color: rgba(255, 255, 255, 0.2); white-space:nowrap; z-index: 3; } .my-handmade-vertical-menu a { display: block; } /* hide and reshow text in vertical menu */ .my-handmade-vertical-menu ul .top, .my-handmade-vertical-menu ul .focus, .my-handmade-vertical-menu ul .aboutus, .my-handmade-vertical-menu ul .team, .my-handmade-vertical-menu ul .testimonials, .my-handmade-vertical-menu ul .ribbonright, .my-handmade-vertical-menu ul .latestnews, .my-handmade-vertical-menu ul .contact { background: none; } .my-handmade-vertical-menu ul li { display: block; } .my-handmade-vertical-menu ul li:hover a { display: block; color: #12324e; } .my-handmade-vertical-menu li a:before { font-family: FontAwesome; content: "\f111"; } .my-handmade-vertical-menu li:hover a:before { font-family: FontAwesome; content: "\f10c"; }February 25, 2016 at 11:52 am #175194Tom
Lead DeveloperLead DeveloperSo you only want the words to appear on hover?
Wrap them in a span:
<li class="top"><a href="#top"><span>Start</span></a></li>.my-handmade-vertical-menu li a span { display: none; } .my-handmade-vertical-menu li:hover a span { display: block; }February 25, 2016 at 12:36 pm #175203Sven
with
.my-handmade-vertical-menu li:hover a span { display: inline-table; }it worked exactly as I want it: http://sven-koeck.de
THUMBS UP!!! Thank you deeply!
-
This topic was modified 10 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.