export const frontendArticles = [
  {
    slug: "html",
    title: "HTML 高频知识点",
    description: "HTML 基础、语义化、HTML5 能力、浏览器渲染模式、表单与多媒体等知识点整理。",
    file: "html.html",
  },
  {
    slug: "css",
    title: "CSS 高频知识点",
    description: "CSS 选择器、布局、盒模型、定位、响应式、动画和工程实践等知识点整理。",
    file: "css.html",
  },
  {
    slug: "javascript-part-1",
    title: "JavaScript 高频知识点（上）",
    description: "JavaScript 基础、作用域、类型、原型、闭包、执行机制等知识点整理。",
    file: "javascript-part-1.html",
  },
  {
    slug: "javascript-part-2",
    title: "JavaScript 高频知识点（下）",
    description: "JavaScript 进阶、异步、模块、浏览器 API 和工程化相关知识点整理。",
    file: "javascript-part-2.html",
  },
  {
    slug: "vue-part-1",
    title: "Vue 高频知识点（上）",
    description: "Vue 基础、组件、响应式、生命周期、模板语法和常见机制整理。",
    file: "vue-part-1.html",
  },
  {
    slug: "vue-part-2",
    title: "Vue 高频知识点（下）",
    description: "Vue 进阶、路由、状态管理、源码机制和实践问题整理。",
    file: "vue-part-2.html",
  },
  {
    slug: "react-part-1",
    title: "React 高频知识点（上）",
    description: "React 基础、组件、状态、事件、Hooks 和渲染机制整理。",
    file: "react-part-1.html",
  },
  {
    slug: "react-part-2",
    title: "React 高频知识点（下）",
    description: "React 进阶、性能优化、状态管理、Fiber 和生态实践整理。",
    file: "react-part-2.html",
  },
  {
    slug: "network",
    title: "计算机网络",
    description: "HTTP、HTTPS、TCP、DNS、缓存、跨域和网络协议相关知识点整理。",
    file: "network.html",
  },
  {
    slug: "browser",
    title: "浏览器原理",
    description: "浏览器渲染、事件循环、缓存、安全、存储和页面加载机制整理。",
    file: "browser.html",
  },
  {
    slug: "performance",
    title: "前端性能优化",
    description: "加载性能、渲染性能、资源优化、监控指标和体验优化方案整理。",
    file: "performance.html",
  },
  {
    slug: "code-output",
    title: "代码输出结果",
    description: "异步编程、事件循环、作用域、this、类型转换等代码输出题整理。",
    file: "code-output.html",
  },
  {
    slug: "git",
    title: "Git 高频知识点",
    description: "Git 基础、提交流程、分支、stash、远程协作、SSH 和忽略清单等知识点整理。",
    file: "git.html",
  },
] as const;

export function getFrontendArticle(slug: string) {
  return frontendArticles.find((article) => article.slug === slug);
}
