React 简历模板项目教程

React 简历模板项目教程

react-resume-templateA personal resume website template built with React.js, Typescript, Next.js, and styled with Tailwind css项目地址:https://gitcode.com/gh_mirrors/re/react-resume-template

1. 项目的目录结构及介绍

react-resume-template/
├── public/
│   ├── _next/
│   └── index.html
├── src/
│   ├── components/
│   ├── data/
│   ├── pages/
│   ├── styles/
│   ├── utils/
│   ├── _app.tsx
│   ├── _document.tsx
│   ├── index.tsx
│   └── resume-screenshot.jpg
├── .eslintrc
├── .gitignore
├── .prettierignore
├── .prettierrc
├── .yarnrc.yml
├── LICENSE
├── README.md
├── next-env.d.ts
├── next-sitemap.js
├── next.config.js
├── package.json
├── postcss.config.js
├── stylelint.config.js
├── tailwind.config.js
├── tsconfig.json
└── yarn.lock

目录结构介绍

  • public/: 存放静态资源文件,如 index.html
  • src/: 项目的源代码目录,包含组件、页面、样式等。
    • components/: 存放React组件。
    • data/: 存放数据文件,如简历信息。
    • pages/: 存放页面组件。
    • styles/: 存放样式文件。
    • utils/: 存放工具函数。
    • _app.tsx: 自定义App组件。
    • _document.tsx: 自定义Document组件。
    • index.tsx: 入口文件。
    • resume-screenshot.jpg: 简历截图。
  • .eslintrc: ESLint配置文件。
  • .gitignore: Git忽略文件配置。
  • .prettierignore: Prettier忽略文件配置。
  • .prettierrc: Prettier配置文件。
  • .yarnrc.yml: Yarn配置文件。
  • LICENSE: 项目许可证。
  • README.md: 项目说明文档。
  • next-env.d.ts: Next.js类型定义文件。
  • next-sitemap.js: 站点地图配置文件。
  • next.config.js: Next.js配置文件。
  • package.json: 项目依赖和脚本配置。
  • postcss.config.js: PostCSS配置文件。
  • stylelint.config.js: Stylelint配置文件。
  • tailwind.config.js: Tailwind CSS配置文件。
  • tsconfig.json: TypeScript配置文件。
  • yarn.lock: Yarn锁定文件。

2. 项目的启动文件介绍

入口文件

  • src/index.tsx: 这是项目的入口文件,负责渲染应用到DOM中。
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

自定义App组件

  • src/_app.tsx: 自定义App组件,用于包装所有页面组件。
import '../styles/globals.css';
import type { AppProps } from 'next/app';

function MyApp({ Component, pageProps }: AppProps) {
  return <Component {...pageProps} />;
}

export default MyApp;

自定义Document组件

  • src/_document.tsx: 自定义Document组件,用于修改服务端渲染的HTML结构。
import Document, { Html, Head, Main, NextScript } from 'next/document';

class MyDocument extends Document {
  render() {
    return (
      <Html lang="en">
        <Head />
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    );
  }
}

export default MyDocument;

3. 项目的配置文件介绍

Next.js配置文件

  • next.config.js: Next.js的配置文件,用于自定义Next.js的行为。
module.exports = {
  reactStrictMode: true,
};

react-resume-templateA personal resume website template built with React.js, Typescript, Next.js, and styled with Tailwind css项目地址:https://gitcode.com/gh_mirrors/re/react-resume-template

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

余鹤赛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值