import Link from "next/link"; import { coverSvg } from "./cover"; import { useState, type CSSProperties, type ReactNode } from "react"; import { ArrowUpRight, ChevronLeft, ChevronRight, List, BookOpen, Check, ArrowDown } from "lucide-react"; import { chapters, seriesCover, sourceChecked, type Chapter, type Skill } from "./data"; function Footer({chapter,page}:{chapter:Chapter;page:number}) { return ; } function Sheet({chapter,page,children,className=""}:{chapter:Chapter;page:number;children:ReactNode;className?:string}) { return
学习资料自己做 / VOL. {chapter.number}THE LEARNING EDIT
{children}
; } function Sample({skill,index}:{skill:Skill;index:number}) { return
成品形态 · 排版示意{skill.sample.map((line,i)=>
{String(i+1).padStart(2,"0")}

{line}

{i===0&&}
)}
; } function SkillCard({skill,index}:{skill:Skill;index:number}) { return
{String(index+1).padStart(2,"0")}
{skill.category}

{skill.title}

{skill.name}

给它{skill.input}

得到{skill.output}

可以这样问

“{skill.prompt}”

{skill.note}

; } const labels=["系列封面","本篇索引","01—02","03—04","05—06","07—08","09—10","使用路线"]; export function LearningSeries({chapterKey,pageNumber,standalone=false}:{chapterKey:string;pageNumber?:number;standalone?:boolean}) { const chapter=chapters.find(c=>c.key===chapterKey)!; const [current,setCurrent]=useState(0);const page=pageNumber??current;const setPage=(value:number|((p:number)=>number))=>{const next=typeof value==='function'?value(page):value;if(standalone)location.href=`/p/${chapter.slug}/pages/${next+1}`;else setCurrent(next);};const [continuous,setContinuous]=useState(false); const boards:ReactNode[]=[
,
第 {chapter.number} 辑 · 10 个 Skills

{chapter.headline[0]}
{chapter.headline[1]}

{chapter.subtitle}

{chapter.audience}
{chapter.skills.map((skill,i)=>)}

按需求挑选,不必一次装完。点击条目查看介绍。

, ...Array.from({length:5},(_,i)=>
把工具用在具体的事情上

{["先整理,再开始。","把资料做成自己的。","让学习多一条路径。","把看过变成理解。","留下一份能复用的资料。"][i]}

{chapter.skills.slice(i*2,i*2+2).map((skill,j)=>)}
),
收藏之后,试着做一份。

先选一个需求,
再串成工作流。

不求用遍所有工具,先完成一份自己的资料。

    {chapter.workflow.map((line,i)=>
  1. {i+1}{line}{i<2&&}
  2. )}

10 个来源,放在这里了。

{chapter.skills.map((skill,i)=>{String(i+1).padStart(2,"0")}{skill.name})}

依据 GitHub 项目说明整理 · 核对于 {sourceChecked}
尚未逐项安装实测;文中小样为排版示意。

同系列还有{chapters.filter(c=>c.key!==chapter.key).map(c=>{c.number} / {c.subtitle})}
, ]; if(standalone)return
{boards[page]}
; return
系列 {chapter.number} / 03{chapter.subtitle}
{if(e.target!==e.currentTarget||continuous)return;if(e.key==="ArrowRight"){e.preventDefault();setPage(p=>Math.min(7,p+1));}if(e.key==="ArrowLeft"){e.preventDefault();setPage(p=>Math.max(0,p-1));}}} tabIndex={0} aria-label="图文画板,可使用左右方向键翻页">{continuous?boards:boards[page]}
{!continuous&&}
{labels.map((label,i)=>)}
学习资料自己做 · 系列三篇
{chapters.map(c=>{c.number}{c.key===chapter.key?"正在阅读 · ":""}{c.subtitle})}
; }