PageSourceSearch

https://nickz.ai/assets/js/index-DrKzhq5M.js

js nickz.ai collected 2026-10-05 14:20:55 UTC 5,861 bytes, 1 lines download raw bytes

1import{u as s,r as e,j as l,L as i}from"./vendor-react-DejgYtBM.js";import{l as t}from"./vendor-semi-D8d7bTtM.js";import{u as a,z as c}from"./index-BeIIFw6E.js";import{S as n}from"./SkillCard-DR9tbVwe.js";import{f as r}from"./api-CrGMGlHj.js";import{X as o,Y as d,Z as h,C as m,_ as j}from"./vendor-icons-EJvJ5X-w.js";import"./vendor-motion-Chfy_MiU.js";import"./utils-BVu1rv8Y.js";function x({title:s,subtitle:e,viewAllTo:t,t:a}){return l.jsxs("div",{className:"skills-section-header",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"skills-section-title",children:s}),e&&l.jsx("p",{className:"skills-section-subtitle",children:e})]}),t&&l.jsxs(i,{to:t,className:"skills-view-all",children:[a("查看全部"),l.jsx(d,{size:16})]})]})}function k({items:s,loading:e}){return e?l.jsx("div",{className:"flex justify-center py-16",children:l.jsx(t,{size:"large"})}):s.length?l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(s=>l.jsx(n,{skill:s,layout:"grid"},s.id))}):l.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400 py-12 text-sm",children:"—"})}const u=[{icon:h,titleKey:"优质收录",descKey:"收录社区优质 Skills,提供完整的内容预览和详细信息"},{icon:m,titleKey:"一键复制使用",descKey:"无需复杂配置,一键复制 SKILL.md 即可快速开始使用"},{icon:j,titleKey:"详细预览",descKey:"完整展示 SKILL.md 内容、目录结构和使用说明,方便快速了解"}],N=[{n:1,titleKey:"浏览和筛选",descKey:"通过分类、搜索和排序功能,找到最适合你需求的 Skill"},{n:2,titleKey:"查看详情",descKey:"点击进入详情页,查看 SKILL.md 内容、目录结构和使用说明"},{n:3,titleKey:"一键复制使用",descKey:"点击「复制 SKILL.md」按钮,将内容保存到你的 Claude 配置中即可使用"}];function p(){const{t}=a(),n=s(),h=c()||t("技能中心"),[m,j]=e.useState(""),[p,g]=e.useState([]),[y,v]=e.useState([]),[b,K]=e.useState(!0),[f,S]=e.useState(!0);e.useEffect(()=>{const s=new AbortController;let e=!1;return r({featured:!0,size:6,sort:"stars-desc",p:1},{signal:s.signal}).then(s=>{!e&&s.success&&g(s.data?.items||[])}).catch(()=>{}).finally(()=>{e||K(!1)}),r({sort:"trending",size:6,p:1},{signal:s.signal}).then(s=>{!e&&s.success&&v(s.data?.items||[])}).catch(()=>{}).finally(()=>{e||S(!1)}),()=>{e=!0,s.abort()}},[]);const w=()=>{const s=m.trim();n(s?`/skills/browse?keyword=${encodeURIComponent(s)}`:"/skills/browse")};return l.jsxs("div",{className:"skills-home",children:[l.jsxs("section",{className:"skills-hero",children:[l.jsx("div",{className:"skills-hero-glow","aria-hidden":!0}),l.jsxs("div",{className:"skills-hero-inner",children:[l.jsxs("h1",{className:"skills-hero-title",children:[l.jsx("span",{children:t("发现优质的")}),l.jsx("span",{className:"skills-hero-title-accent",children:"Claude Skills"})]}),l.jsx("p",{className:"skills-hero-lead",children:t("一站式 Claude Skills 导航平台")}),l.jsx("p",{className:"skills-hero-desc",children:t("帮助你快速找到、评估和使用最适合的 AI 技能")}),l.jsxs("div",{className:"skills-hero-search",children:[l.jsxs("div",{className:"skills-hero-search-box",children:[l.jsx(o,{size:20,className:"text-gray-400 shrink-0"}),l.jsx("input",{placeholder:t("按名称、作者或描述搜索..."),value:m,onChange:s=>j(s.target.value),onKeyDown:s=>"Enter"===s.key&&w()})]}),l.jsx("button",{type:"button",className:"skills-search-btn",onClick:w,children:t("搜索")})]}),l.jsxs(i,{to:"/skills/browse",className:"skills-hero-cta skills-hero-cta-outline",children:[t("浏览 Skills"),l.jsx(d,{size:18})]})]})]}),!b&&p.length>0&&l.jsxs("section",{className:"skills-home-section",children:[l.jsx(x,{title:t("精选技能"),subtitle:t("社区最受欢迎的优质技能"),viewAllTo:"/skills/browse?featured=true",t}),l.jsx(k,{items:p,loading:!1})]}),b&&l.jsxs("section",{className:"skills-home-section",children:[l.jsx(x,{title:t("精选技能"),subtitle:t("社区最受欢迎的优质技能"),t}),l.jsx(k,{items:[],loading:!0})]}),!f&&y.length>0&&l.jsxs("section",{className:"skills-home-section",children:[l.jsx(x,{title:t("热门技能"),subtitle:t("skills.sh 社区最热门的技能"),viewAllTo:"/skills/trending",t}),l.jsx(k,{items:y,loading:!1})]}),f&&l.jsxs("section",{className:"skills-home-section",children:[l.jsx(x,{title:t("热门技能"),subtitle:t("skills.sh 社区最热门的技能"),t}),l.jsx(k,{items:[],loading:!0})]}),l.jsxs("section",{className:"skills-home-section skills-about-section",children:[l.jsxs("div",{className:"skills-about-header",children:[l.jsx("h2",{className:"skills-section-title",children:t("关于 {{name}} Skills Hub",{name:h})}),l.jsx("p",{className:"skills-section-subtitle",children:t("发现、评估和使用最优秀的 Claude Skills,提升 AI 助手的能力和工作效率")})]}),l.jsx("div",{className:"skills-about-grid",children:u.map(({icon:s,titleKey:e,descKey:i})=>l.jsxs("div",{className:"skills-about-item",children:[l.jsx("div",{className:"skills-feature-icon",children:l.jsx(s,{size:22,className:"text-[#0084FF]"})}),l.jsx("h3",{children:t(e)}),l.jsx("p",{children:t(i)})]},e))})]}),l.jsxs("section",{className:"skills-home-section skills-how-section",children:[l.jsx("h2",{className:"skills-section-title skills-how-title",children:t("如何使用")}),l.jsx("div",{className:"skills-steps-list",children:N.map(({n:s,titleKey:e,descKey:i})=>l.jsxs("div",{className:"skills-step-row",children:[l.jsx("div",{className:"skills-step-num",children:s}),l.jsxs("div",{className:"skills-step-content",children:[l.jsx("h3",{children:t(e)}),l.jsx("p",{children:t(i)})]})]},s))}),l.jsx("div",{className:"skills-how-cta",children:l.jsxs(i,{to:"/skills/browse",className:"skills-hero-cta",children:[t("开始探索 Skills"),l.jsx(d,{size:18})]})})]})]})}export{p as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.