Highlight selected document
This commit is contained in:
parent
2007ea37a6
commit
e71d61bd3f
1 changed files with 6 additions and 1 deletions
|
@ -8,3 +8,8 @@ import { SiteSettings, SidebarItems } from '@config'
|
|||
item.heading ? <h2>{item.heading}</h2> : <a href={SiteSettings.SiteProtocol + '://' + SiteSettings.SiteDomain + SiteSettings.SiteBase + item.link}>{item.text}</a>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<script is:inline define:vars={{SiteSettings}}>
|
||||
var CurrentURLPath = window.location.pathname
|
||||
document.querySelector('.sidebar > a[href="' + SiteSettings.SiteProtocol + '://' + SiteSettings.SiteDomain + SiteSettings.SiteBase + CurrentURLPath + '"]').style.background = '#323232'
|
||||
</script>
|
Loading…
Reference in a new issue