Hi guys, im trying to costumize the bar that stays in the top of the site, my objective is put a logo in the middle of the bar like in the example:
I have the image already in the nuBuilder files.
There is a simple way of doing this??????
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Costumizing nuBuilder bar
-
- Posts: 5
- Joined: Thu Mar 16, 2023 1:37 pm
Costumizing nuBuilder bar
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Costumizing nuBuilder bar
Hi,
Here's an example how to add a logo to the Breadcrumb Holder.
Add this JS in Setup -> Header, inside the nuOnLoad() function:
Here's an example how to add a logo to the Breadcrumb Holder.
Add this JS in Setup -> Header, inside the nuOnLoad() function:
Code: Select all
// Create a new image element
var image = $('<img>', {
src: 'core/graphics/logo.png', // Replace with the actual image URL
alt: 'Centered Image'
});
// Append the image to the nuBreadcrumbHolder div
$('#nuBreadcrumbHolder').append(image);
// Function to center the image horizontally
function centerImageHorizontally() {
var parentWidth = $('#nuBreadcrumbHolder').width();
var imageWidth = image.width();
var marginLeft = (parentWidth - imageWidth) / 2;
image.css('margin-left', marginLeft + 'px');
}
// Call the function initially
centerImageHorizontally();
// Call the function again whenever the window is resized
$(window).resize(function() {
centerImageHorizontally();
});