Jump to content

bootstrap icon block topmenu


Recommended Posts

it will be great but... it will be a little hard to achieve, so i don't think so that it will be developed so fast ;) maybe in the future someone like me will develop it on github...  great idea! :D

 

honestly i dont think its so hard, im too newbie in PS for doing that, but im a php developer.

maybe could be useful for you see the T3-Framework Megamenu solution.

see?kinda easy  :)

post-748713-0-26622200-1396301057_thumb.gif

Edited by alfredopacino (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

okay but what is your code that you used?

and where you used it? how?

can you show it?

 

blocktopmenu.php

row 540th

doesn't work even like that, no conditions, i added just the icon

$this->_menu .= '<li '.$selected.'>
				<i class="fa fa-envelope-o"></i>';
				$this->_menu .= '<a href="'.$links[0]['link'].'">'.$cms->meta_title.'</a>';
				$this->_menu .= '</li>';
Edited by alfredopacino (see edit history)
Link to comment
Share on other sites

Doesn't that require modifying css too? I'm working on modifying top menu in default-bootsrap theme and saw the following code in superfish-modified.css that suppose to show a "+" and "-" icon. But when do these icons show up?

  @media (max-width: 767px) {
    .sf-menu > li {
      float: none;
      position: relative;
      border-right: none; }
      .sf-menu > li span {
        position: absolute;
        right: 6px;
        top: 20px;
        width: 30px;
        height: 30px;
        z-index: 2; }
        .sf-menu > li span:after {
          font-family: "FontAwesome";
          content: "\f067";
          font-size: 26px; }
        .sf-menu > li span.active:after {
          content: "\f068"; } }

Link to comment
Share on other sites

I noticed that the default bootstrap theme still uses fontawesome 3.2.1 which uses the .icon class (not .fa)

http://fortawesome.github.io/Font-Awesome/3.2.1/icons/

 

So if you add the relevant class icon- to an element and give it font-family "FontAwesome" the icon should show up.

I guess that's beacause they still take into account old "retarted" browsers, i.e IE.

And to answer my question, I think that css code is for mobile devices.. it's been a while I haven't worked with web design..

Link to comment
Share on other sites

  • 2 weeks later...

up?i'm stuck :(

If you're trying to have a home icon instead of text-only, "Home", it's very easy. Vekia did post a css code for this but I can't find his post. He suggested to add the code in global.css but I added it in superfish-modified.css instead and it worked for me.

For me, and I think this is how it is in default setup of prestashop with the default bootstrap theme, the first menu item "Home" was listed as a category link. I deleted this item and added a new link to the frontpage, "/" or whatever is your path, in Modules > Top horizontal menu > Add a new link. Leave "label" blank and click Add. Now add your new item from "Available items" to "Selected items" and move it to the top. Save and proceed with css code:

  /***************** Home icon instead of text **********************************************/
  .sf-menu li:first-child a:before{
  color:white!important;
  content: "\f015";
  font-family: "FontAwesome";
  display: inline-block;
  font-size: 33px;
  line-height: 10px;
}

.sf-menu li ul li a:before{
  content:none!important;
}
/***********************************************************************************************/

Hope it works.

Link to comment
Share on other sites

ok it works, :)

for the indicization it would be better find the way to let be the label contains "home"..any idea?

 

anyway this is my code, it covers the mobile/tablet size too (with content"home")  :)

/*-------home icon---------*/
  @media (min-width: 768px) {
  .sf-menu>li:first-child a:before{
  color:white!important;
  content: "\f015";
  font-family: "FontAwesome";
  display: inline-block;
  font-size: 21px;
  line-height: 10px;
font-weight: normal;
}

.sf-menu>li ul li a:before{
  content:none!important;
[spam-filter]
  @media (max-width: 768px) {
    .sf-menu>li:first-child a:before{
	  content: "Home";
}
}
/*-------home icon---------*/
Edited by alfredopacino (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...