Brand header theme component

theme-component

(Vinoth Kannan) #65

Sure, I will try to improve it to support no_ember pages too. But in that case somehow we should have access to the theme_settings.


(David Kingham) #67

For anyone that wants to add fontawesome icons here is a simple css solution.

.b-header a::before{
      padding-right: 8px;
      font-family: "FontAwesome"
    }

.b-header .nav-pills > li:nth-child(1) a::before{
	content: "\f015";
}

.b-header .nav-pills > li:nth-child(2) a::before{
	content: "\f086";
}

.b-header .nav-pills > li:nth-child(3) a::before{
	content: "\f1ea";
}

.b-header .nav-pills > li:nth-child(4) a::before{
	content: "\f005";
}

.b-header .nav-pills > li:nth-child(5) a::before{
	content: "\f187";
}

.b-header .nav-pills > li:nth-child(6) a::before{
	content: "\f05a";
}

.b-header .nav-pills > li:nth-child(7) a::before{
	content: "\f0e0";
}

(David Kingham) #68

I really need to have only one of the links open in a new tab, I do not have the skills to modify this plugin myself, so can anyone tell me if there is a way to overide the html to add target="_blank" to that link?


#69

@davidkingham I would try adding the following code to the </head> section of your main theme or in a new component:

<script>
    $(function() {
        $("[title='Archive']").click(function(e){ 
            e.preventDefault(); 
            var url = $(this).attr('href'); 
            window.open(url, '_blank');
        });
    });
</script>

Whenever possible you want to avoid modifying the remote theme itself. This ensures you can get the latest updates and that those updates don’t overwrite your customizations.


(David Kingham) #70

Thank you! Unfortunately it does not seem to work even though it shows up when I inspect it


#71

No problem. I had edited my post very soon after I posted it because I noticed that the original code did just what you are describing. Can you confirm that you are using the code that is currently displayed in my post above?


(David Kingham) #72

That makes sense, I had copied the code from the email, this works brilliantly. Thank you so much!


(Craig Davison) #73

The CSS for this still loads on no_ember pages causing page rendering errors. e.g. https://eurodiscover.eu/404


(Vinoth Kannan) #74

It’s not yet done. I may work on this in coming weeks.