Goal: Make the mobile logo invert (switch color) only while overlapping the homepage slideshow banner, mirroring desktop behavior.
What happened:
A custom solution was suggested: add code to the Shopify theme.liquid file before .
After adding it, the logo inverted correctly, but on product pages (no slideshow) the logo initially appeared inverted and reverted only after scrolling.
Fix provided:
Update the implementation by wrapping the logic in a Liquid conditional so it only runs on the homepage:
Use a template check (e.g., {% if template == ‘index’ %} … {% endif %}).
This scopes the inversion effect to the home page with the slideshow; other pages keep the original logo at all times.
Notes:
Attachments (screenshots) illustrated the incorrect inversion on product pages.
Edits involved Shopify Liquid (theme.liquid) and a template condition targeting the index (homepage) template.
Outcome: The requester confirmed the update resolved the issue; discussion closed/resolved.
Summarized with AI on December 16.
AI used: gpt-5.
I have added your code, and it worked almost perfectly.
However for instance when I go to product, the logo at the start is inverted. Once i scroll down it changes to original.
Any option to have it original all the time on all the pages that do not have slideshow banner image on top.
So inverted logo is only active while in overlay of banner, otherwise it is always original logo.