File tree Expand file tree Collapse file tree 9 files changed +37
-110
lines changed
Expand file tree Collapse file tree 9 files changed +37
-110
lines changed Original file line number Diff line number Diff line change 44 }
55
66 let { children }: Props = $props ();
7- let elem: HTMLElement = $state ();
7+ let elem: HTMLElement | undefined = $state ();
88 </script >
99
1010<div bind:this ={elem } class =" relative" >
1111 {@render children ?.()}
1212 <!-- Copy button -->
1313 <button
14+ aria-label =" Copy code"
1415 title =" Copy"
1516 onclick ={() => {
16- navigator .clipboard .writeText (elem .innerText );
17+ navigator .clipboard .writeText (elem ! .innerText );
1718 }}
1819 class ="
1920 absolute right-4 top-[min(50%_,_32px)] aspect-square -translate-y-1/2 transform
Original file line number Diff line number Diff line change 1818 </script >
1919
2020<div class ="container mb-4 w-full border-b border-neutral-800 px-4 pb-1 sm:px-6 {className }" >
21- <button onclick ={() => (enabled = ! enabled )} class =" text-neutral-500 hover:text-neutral-200" >
21+ <button
22+ aria-label =" Open sidebar"
23+ onclick ={() => (enabled = ! enabled )}
24+ class =" text-neutral-500 hover:text-neutral-200"
25+ >
2226 <iconify-icon icon =" ci:hamburger-lg" class =" text-3xl" ></iconify-icon >
2327 </button >
2428</div >
2933 <div class =" fixed bottom-0 left-0 top-0 z-10 rounded-r-xl bg-neutral-900" >
3034 <Sidebar class =" w-[20rem] px-4 py-4" />
3135 <button
36+ aria-label =" Close sidebar"
3237 onclick ={() => (enabled = false )}
3338 class =" absolute right-4 top-4 text-neutral-500 hover:text-neutral-200"
3439 >
Original file line number Diff line number Diff line change 5959
6060<svelte:window onkeydown ={handleKeydown } />
6161
62- <button onclick ={() => (open = ! open )} class =" mr-2 block aspect-square md:hidden" >
62+ <button
63+ aria-label =" Search"
64+ onclick ={() => (open = ! open )}
65+ class =" mr-2 block aspect-square md:hidden"
66+ >
6367 <iconify-icon icon =" ion:search" class =" text-2xl text-neutral-200" ></iconify-icon >
6468</button >
6569
Original file line number Diff line number Diff line change 4444 "@sveltejs/package" : " catalog:" ,
4545 "@sveltejs/vite-plugin-svelte" : " catalog:" ,
4646 "carta-md" : " workspace:*" ,
47- "publint" : " catalog" ,
47+ "publint" : " catalog: " ,
4848 "svelte" : " catalog:" ,
4949 "svelte-check" : " catalog:" ,
5050 "tslib" : " catalog:" ,
Original file line number Diff line number Diff line change 4343 "@sveltejs/vite-plugin-svelte" : " catalog:" ,
4444 "@types/node-emoji" : " catalog:" ,
4545 "carta-md" : " workspace:*" ,
46- "publint" : " catalog" ,
46+ "publint" : " catalog: " ,
4747 "svelte" : " catalog:" ,
4848 "svelte-check" : " catalog:" ,
4949 "tslib" : " catalog:" ,
Original file line number Diff line number Diff line change 4545 "@types/hast" : " ^3.0.4" ,
4646 "@types/node-emoji" : " catalog:" ,
4747 "carta-md" : " workspace:*" ,
48- "publint" : " catalog" ,
48+ "publint" : " catalog: " ,
4949 "svelte" : " catalog:" ,
5050 "svelte-check" : " catalog:" ,
5151 "tslib" : " catalog:" ,
Original file line number Diff line number Diff line change 4646 "@sveltejs/vite-plugin-svelte" : " catalog:" ,
4747 "@types/node-emoji" : " catalog:" ,
4848 "carta-md" : " workspace:*" ,
49- "publint" : " catalog" ,
49+ "publint" : " catalog: " ,
5050 "svelte" : " catalog:" ,
5151 "svelte-check" : " catalog:" ,
5252 "tslib" : " catalog:" ,
Original file line number Diff line number Diff line change 4444 "@sveltejs/vite-plugin-svelte" : " catalog:" ,
4545 "@types/node-emoji" : " catalog:" ,
4646 "carta-md" : " workspace:*" ,
47- "publint" : " catalog" ,
47+ "publint" : " catalog: " ,
4848 "svelte" : " catalog:" ,
4949 "svelte-check" : " catalog:" ,
5050 "tslib" : " catalog:" ,
You can’t perform that action at this time.
0 commit comments