Download lecture-05/assets/slidev/notes-edit-CT3D_gWN.js from DeepLearning-VT/DeepLearning_2026: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/spaces/DeepLearning-VT/DeepLearning_2026/resolve/main/lecture-05/assets/slidev/notes-edit-CT3D_gWN.js
- Command line
-
hf download hf://spaces/DeepLearning-VT/DeepLearning_2026/lecture-05/assets/slidev/notes-edit-CT3D_gWN.js
-
curl -L -o notes-edit-CT3D_gWN.js https://huggingface.co/spaces/DeepLearning-VT/DeepLearning_2026/resolve/main/lecture-05/assets/slidev/notes-edit-CT3D_gWN.js
2.14 kB
| import{$ as e,S as t,_ as n,b as r,et as i,l as a,m as o,ut as s,w as c,x as l,z as u}from"../modules/shiki-CkJq9tSf.js";import{$ as d,t as f}from"../useNav-BqAsyLif.js";import{O as p}from"../modules/vue-Dz2ojcKF.js";import{h as m,t as h}from"../index-DdzHTFh8.js";import{t as g}from"./IconButton-CfFb_8Iy.js";import{t as _}from"./Modal-Bum_LA_c.js";var v={class:`flex my-1`},y={class:`h-full`},b={class:`slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main`},x=c({__name:`notes-edit`,setup(c){let x=/^---\s*#(\d+)\s*$/;m({title:`Notes Edit - ${d}`});let{slides:S}=f(),C=s(!1),w=s(T(S.value));function T(e){let t=[];for(let n of e)n.meta.slide.note?.trim()&&(t.push(`--- #${n.no}`),t.push(``),t.push(n.meta.slide.note),t.push(``));return t.join(` | |
| `)}function E(e,t){let n=e.split(/^(---\s*#\d+\s*)$/gm);n.forEach((e,r)=>{let i=e.match(x);if(i){let e=Number.parseInt(i[1]),a=n[r+1].trim(),o=t.find(t=>t.no===e);o&&(o.meta.slide.note=a,h(e).update({note:a}))}})}return p(w,e=>{E(e,S.value)},{debounce:300}),(s,c)=>(u(),r(o,null,[t(_,{modelValue:C.value,"onUpdate:modelValue":c[1]||=e=>C.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:e(()=>[c[4]||=n(`div`,{class:`flex gap-2 text-xl`},[n(`div`,{class:`i-carbon:information my-auto`}),l(` Help `)],-1),c[5]||=n(`div`,{class:`prose dark:prose-invert`},[n(`p`,null,`This is the batch notes editor. You can edit the notes for all the slides at once here.`),n(`p`,null,[l(`The note for each slide are separated by `),n(`code`,null,`--- #[no]`),l(` lines, you might want to keep them while editing.`)])],-1),n(`div`,v,[n(`button`,{class:`slidev-form-button`,onClick:c[0]||=e=>C.value=!1},` Close `)])]),_:1},8,[`modelValue`]),n(`div`,y,[n(`div`,b,[t(g,{title:`Help`,class:`rounded-full`,onClick:c[2]||=e=>C.value=!0},{default:e(()=>[...c[6]||=[n(`div`,{class:`i-carbon:help text-2xl`},null,-1)]]),_:1})]),i(n(`textarea`,{"onUpdate:modelValue":c[3]||=e=>w.value=e,class:`prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!`},null,512),[[a,w.value]])])],64))}});export{x as default}; |