File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
adi_doctools/theme/cosmic/scripts Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,10 @@ export class HotReload {
139139 }
140140 } )
141141 }
142+ init_others ( ) {
143+ let logo = DOM . get ( '.sphinxsidebarwrapper > a' )
144+ logo . href = logo . href . replace ( / # $ / , '' )
145+ }
142146 popstate ( ev ) {
143147 let url = new URL ( location . href )
144148 url . hash = ''
@@ -151,7 +155,8 @@ export class HotReload {
151155 init ( ) {
152156 this . location_href = location . href
153157
154- this . init_toctree ( )
158+ this . init_toctree ( )
159+ this . init_others ( )
155160 this . hot_links ( )
156161 window . addEventListener ( 'popstate' , ( ev ) => {
157162 this . popstate ( ev )
Original file line number Diff line number Diff line change @@ -55,13 +55,15 @@ export class Links {
5555 let home = "index.html"
5656 this . $ . linksOverlay = [ ]
5757 this . $ . linksSidebar = [ ]
58+ let self_link = this . parent . state . offline ?
59+ this . parent . state . content_root :
60+ new URL ( this . parent . state . content_root , location . href )
5861 for ( const [ key , value ] of Object . entries ( obj ) ) {
5962 if ( ! ( 'name' in value ) )
6063 continue
6164
6265 let base = key == this . parent . state . repository ?
63- this . parent . state . content_root :
64- `${ prefix } ${ key } /`
66+ self_link : `${ prefix } ${ key } /`
6567 this . $ . linksSidebar . push ( new DOM ( 'a' , {
6668 'href' : `${ base } ${ home } ` ,
6769 'className' : this . parent . state . repository === key ? 'current' : '' ,
You can’t perform that action at this time.
0 commit comments