File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import { Icon } from " @iconify/vue" ;
23import { useData } from " vitepress" ;
34import VPLink from " vitepress/dist/client/theme-default/components/VPLink.vue" ;
45import { computed } from " vue" ;
@@ -39,6 +40,9 @@ const getFileHref = (path: string) =>
3940
4041const getFileTitle = (path : string ) =>
4142 path .replace (/ ^ @[/] reference[/][^ /] + [/] / , " " ).replace (" com/example/docs" , " ..." );
43+
44+ const getFileExtension = (path : string ) =>
45+ path .replace (/ ^ . * [. ] ([^ . ] + )$ / , " $1" ).replace (/ ^ classtweaker$ / , " document" );
4246 </script >
4347
4448<template >
@@ -49,8 +53,13 @@ const getFileTitle = (path: string) =>
4953 </VPLink >
5054
5155 <h2 v-if =" files.length" >{{ options.files }}</h2 >
52- <VPLink v-for =" (f, i) in files" :key =" f" :href =" getFileHref(f)" :title =" getFileTitle(f)" >
53- <code >{{ shortestUniquePaths[i] }}</code >
56+ <VPLink v-for =" (f, i) in files" :key =" f" :href =" getFileHref(f)" :title =" getFileTitle(f)" noIcon >
57+ <Icon :icon =" `material-icon-theme:${getFileExtension(f)}`" />
58+ <code >
59+ <template v-for =" (seg , j ) in shortestUniquePaths [i ].split (' /' ) " :key =" j " >
60+ <template v-if =" j !== 0 " >/<wbr /></template >{{ seg }}
61+ </template >
62+ </code >
5463 </VPLink >
5564
5665 <div />
8089 color : var (--vp-c-text-2 );
8190}
8291
83- .VPLink :has (code ) {
84- align-items : center ;
85- }
86-
8792.VPLink :hover {
8893 color : var (--vp-c-text-1 );
8994}
9095
96+ svg {
97+ flex-shrink : 0 ;
98+ margin-top : 2px ;
99+ }
100+
91101img {
92102 margin-top : 1px ;
93103}
Original file line number Diff line number Diff line change 6161 scrollbar-color : var (--vp-c-gray-1 ) var (--vp-c-bg-alt );
6262}
6363
64+ @media (min-width : 1525px ) {
65+ .aside-container {
66+ width : 300px !important ;
67+ }
68+ }
69+
6470.aside-container ::-webkit-scrollbar {
6571 display : block;
6672}
You can’t perform that action at this time.
0 commit comments