I am looking to customize my top navbar for two different webpages, the root URL (/) and firstpage (/firstpage). The top navbar contains 2 images that I want to switch based on which page the user is currently on. Here is the code snippet:
<img class="dark" src="/images/icons/IMAGE_home.png">
<img class="light" src="/images/icons/IMAGE1_page2.png">
When a user is on the homepage, they should see the first image and the second image should be hidden. Conversely, when the user navigates to the second page, they should see the second image and hide the first.
Are there any CSS, Angular, or JavaScript techniques that can help achieve this functionality?
Thank you in advance!