Jump to content

7.1 Split Navigation script - nav items on right disappear or wrong color

Go to solution Solved by Beyondspace,

Recommended Posts

I implemented footer injection script shared in this thread but am getting inconsistent results with nav showing on right side -- it is either hidden or in wrong color, and varies from page-to-page, whether or not I am logged in, and between Safari and Chrome. 
 

I currently have this in footer injection:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  jQuery(document).ready(function($){
  $('.header-display-desktop nav.header-nav-list').clone().insertAfter('.header-actions.header-actions--right>.showOnMobile');
})
</script>
<style>
  .header-display-desktop .header-actions--right .header-nav-list .header-nav-item:nth-child(-n+2) {display: none;}
.header-display-desktop .header-title-nav-wrapper .header-nav-list .header-nav-item:nth-child(n+3) {display: none;}
  .header-nav-item:nth-child(n+2) {
    margin-right: 4vw;
}
</style>

And these screenshots show the two nav items on right either missing or in black. (Interestingly, on the pages where the words News and Commissions aren't visible, I can still click that area and link to the page... words just don't show.)

Screenshot2024-03-23at8_00_35PM.thumb.png.8b0edd8517f2a1a0c5e526fb257454d1.pngScreenshot2024-03-23at8_00_49PM.thumb.png.0d0dce28c7d9c533a5b8a1d13f3a102e.png

The site is: angelaart.squarespace.com
pw: angela

I sincerely appreciate any advice anyone can share!
Christine

 

Link to comment
  • Replies 2
  • Views 499
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
6 hours ago, christined said:

 

I implemented footer injection script shared in this thread but am getting inconsistent results with nav showing on right side -- it is either hidden or in wrong color, and varies from page-to-page, whether or not I am logged in, and between Safari and Chrome. 
 

I currently have this in footer injection:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  jQuery(document).ready(function($){
  $('.header-display-desktop nav.header-nav-list').clone().insertAfter('.header-actions.header-actions--right>.showOnMobile');
})
</script>
<style>
  .header-display-desktop .header-actions--right .header-nav-list .header-nav-item:nth-child(-n+2) {display: none;}
.header-display-desktop .header-title-nav-wrapper .header-nav-list .header-nav-item:nth-child(n+3) {display: none;}
  .header-nav-item:nth-child(n+2) {
    margin-right: 4vw;
}
</style>

And these screenshots show the two nav items on right either missing or in black. (Interestingly, on the pages where the words News and Commissions aren't visible, I can still click that area and link to the page... words just don't show.)

Screenshot2024-03-23at8_00_35PM.thumb.png.8b0edd8517f2a1a0c5e526fb257454d1.pngScreenshot2024-03-23at8_00_49PM.thumb.png.0d0dce28c7d9c533a5b8a1d13f3a102e.png

The site is: angelaart.squarespace.com
pw: angela

I sincerely appreciate any advice anyone can share!
Christine

 

I find thé following code make that navigation on the right disappear

 

image.thumb.png.89053b28052142e7cf3527a3c27e55fc.png

You can try the following code to overwrite it

.header-nav-item.header-nav-item--collection  a {
  opacity: 1;
  color: var(--solidHeaderNavigationColor);
}

Hope it can help

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.