perf(explorer): client side explorer (#1810)
* start work on client side explorer * fix tests * fmt * generic test flag * add prenav hook * add highlight class * make flex more consistent, remove transition * open folders that are prefixes of current path * make mobile look nice * more style fixes
This commit is contained in:
		@@ -3,6 +3,7 @@ import style from "./styles/backlinks.scss"
 | 
			
		||||
import { resolveRelative, simplifySlug } from "../util/path"
 | 
			
		||||
import { i18n } from "../i18n"
 | 
			
		||||
import { classNames } from "../util/lang"
 | 
			
		||||
import OverflowList from "./OverflowList"
 | 
			
		||||
 | 
			
		||||
interface BacklinksOptions {
 | 
			
		||||
  hideWhenEmpty: boolean
 | 
			
		||||
@@ -29,7 +30,7 @@ export default ((opts?: Partial<BacklinksOptions>) => {
 | 
			
		||||
    return (
 | 
			
		||||
      <div class={classNames(displayClass, "backlinks")}>
 | 
			
		||||
        <h3>{i18n(cfg.locale).components.backlinks.title}</h3>
 | 
			
		||||
        <ul class="overflow">
 | 
			
		||||
        <OverflowList id="backlinks-ul">
 | 
			
		||||
          {backlinkFiles.length > 0 ? (
 | 
			
		||||
            backlinkFiles.map((f) => (
 | 
			
		||||
              <li>
 | 
			
		||||
@@ -41,12 +42,13 @@ export default ((opts?: Partial<BacklinksOptions>) => {
 | 
			
		||||
          ) : (
 | 
			
		||||
            <li>{i18n(cfg.locale).components.backlinks.noBacklinksFound}</li>
 | 
			
		||||
          )}
 | 
			
		||||
        </ul>
 | 
			
		||||
        </OverflowList>
 | 
			
		||||
      </div>
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  Backlinks.css = style
 | 
			
		||||
  Backlinks.afterDOMLoaded = OverflowList.afterDOMLoaded("backlinks-ul")
 | 
			
		||||
 | 
			
		||||
  return Backlinks
 | 
			
		||||
}) satisfies QuartzComponentConstructor
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user