mirror of
https://ark.sudovanilla.org/Korbs/butterflyvu.git
synced 2024-12-22 23:33:54 +00:00
Highlight selected document
This commit is contained in:
parent
2007ea37a6
commit
e71d61bd3f
|
@ -7,4 +7,9 @@ import { SiteSettings, SidebarItems } from '@config'
|
||||||
{SidebarItems.map((item) => (
|
{SidebarItems.map((item) => (
|
||||||
item.heading ? <h2>{item.heading}</h2> : <a href={SiteSettings.SiteProtocol + '://' + SiteSettings.SiteDomain + SiteSettings.SiteBase + item.link}>{item.text}</a>
|
item.heading ? <h2>{item.heading}</h2> : <a href={SiteSettings.SiteProtocol + '://' + SiteSettings.SiteDomain + SiteSettings.SiteBase + item.link}>{item.text}</a>
|
||||||
))}
|
))}
|
||||||
</div>
|
</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