various path fixes
This commit is contained in:
		
							parent
							
								
									532bc61025
								
							
						
					
					
						commit
						6f9a29c174
					
				
					 3 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
    }
 | 
			
		||||
</style>
 | 
			
		||||
<script>
 | 
			
		||||
  const curPage = {{ strings.TrimRight "/" .Page.RelPermalink }}
 | 
			
		||||
  const curPage = {{ strings.TrimRight "/" .Page.RelPermalink }}.replace({{strings.TrimRight "/" .Site.BaseURL }}, "")
 | 
			
		||||
  const pathColors = {{$.Site.Data.graphConfig.paths}}
 | 
			
		||||
  let depth = {{$.Site.Data.graphConfig.depth}}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,10 +7,11 @@
 | 
			
		|||
    return template.content.firstChild
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const pathRegex = /\.\.(\/\.\.)*/
 | 
			
		||||
  document.addEventListener("DOMContentLoaded", () => {
 | 
			
		||||
    [...document.getElementsByClassName("internal-link")]
 | 
			
		||||
      .forEach(li => {
 | 
			
		||||
        const linkDest = content[li.dataset.src]
 | 
			
		||||
        const linkDest = content[li.dataset.src.replace(pathRegex, '')]
 | 
			
		||||
        if (linkDest) {
 | 
			
		||||
          const popoverElement = `<div class="popover">
 | 
			
		||||
    <h3>${linkDest.title}</h3>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue