Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update homepage and theme #430

Merged
merged 3 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ root.render(<App />);
const link = document.createElement('link');
link.setAttribute('type', 'image/x-icon');
link.setAttribute('rel', 'icon');
link.setAttribute('href', 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/logo/rsdoctor.png');
document.head.appendChild(link);
link.setAttribute(
'href',
'https://assets.rspack.dev/rsdoctor/rsdoctor-logo-960x960.png',
);
document.head.appendChild(link);
53 changes: 43 additions & 10 deletions packages/components/src/components/Layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { TranslationOutlined } from '@ant-design/icons';
import { Col, Dropdown, Layout, Row, Typography } from 'antd';
import React from 'react';
import { Language, Size } from '../../constants';
import {
useI18n,
useTheme
} from '../../utils';
import { useI18n, useTheme } from '../../utils';
import { OverlayAlertsWithButton } from '../Alerts';
import { BuilderSelect } from './builder-select';
import { Menus } from './menus';
Expand Down Expand Up @@ -43,11 +40,44 @@ export const Header: React.FC = () => {
transition: 'none',
}}
>
<Row justify="space-between" align="middle" style={{ height: Size.NavBarHeight }} wrap={false}>
<Col style={{ height: Size.NavBarHeight, lineHeight: `${Size.NavBarHeight + 2}px` }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', height: '100%' }}>
<img style={{ height: 30 }} src={'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/logo/rsdoctor.png'} className="web-doctor-logo" alt="logo" />
<Typography.Text style={{ color: 'inherit', fontSize: 18, marginLeft: 4, marginTop: 8 }}>Rsdoctor</Typography.Text>
<Row
justify="space-between"
align="middle"
style={{ height: Size.NavBarHeight }}
wrap={false}
>
<Col
style={{
height: Size.NavBarHeight,
lineHeight: `${Size.NavBarHeight + 2}px`,
}}
>
<div
style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
height: '100%',
}}
>
<img
style={{ height: 30 }}
src={
'https://assets.rspack.dev/rsdoctor/rsdoctor-logo-960x960.png'
}
className="web-doctor-logo"
alt="logo"
/>
<Typography.Text
style={{
color: 'inherit',
fontSize: 18,
marginLeft: 4,
marginTop: 8,
}}
>
Rsdoctor
</Typography.Text>
<BuilderSelect />
</div>
</Col>
Expand Down Expand Up @@ -90,7 +120,10 @@ export const Header: React.FC = () => {
selectedKeys: [i18n.language],
}}
>
<TranslationOutlined className="header-icon" style={iconStyle} />
<TranslationOutlined
className="header-icon"
style={iconStyle}
/>
</Dropdown>
</Col>
</Row>
Expand Down
2 changes: 1 addition & 1 deletion packages/document/docs/en/guide/more/rules.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rule Index

import RuleIndex from '@src/components/RuleIndex';
import RuleIndex from '@components/RuleIndex';

<RuleIndex />
2 changes: 1 addition & 1 deletion packages/document/docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hero:
text: Quick Start
link: /guide/start/quick-start
image:
src: https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/logo/rsdoctor.png
src: https://assets.rspack.dev/rsdoctor/rsdoctor-logo-960x960.png
alt: Rsdoctor Logo

features:
Expand Down
2 changes: 1 addition & 1 deletion packages/document/docs/zh/guide/more/rules.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rule Index

import RuleIndex from '@src/components/RuleIndex';
import RuleIndex from '@components/RuleIndex';

<RuleIndex />
2 changes: 1 addition & 1 deletion packages/document/docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hero:
text: 快速开始
link: /zh/guide/start/quick-start
image:
src: https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/logo/rsdoctor.png
src: https://assets.rspack.dev/rsdoctor/rsdoctor-logo-960x960.png
alt: Rsdoctor Logo

features:
Expand Down
10 changes: 10 additions & 0 deletions packages/document/i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"toolStackTitle": {
"en": "Tool Stack",
"zh": "工具栈"
},
"toolStackDesc": {
"en": "High-performance tool stack built around Rspack to boost modern web development",
"zh": "围绕 Rspack 打造的高性能工具栈,助力现代 Web 开发"
}
}
10 changes: 4 additions & 6 deletions packages/document/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@
"@types/react-dom": "^18",
"react": "18.2.0",
"react-dom": "18.2.0",
"rsbuild-plugin-google-analytics": "^1.0.0",
"rsbuild-plugin-open-graph": "1.0.0",
"rsbuild-plugin-google-analytics": "^1.0.1",
"rsbuild-plugin-open-graph": "^1.0.1",
"rspress-plugin-font-open-sans": "^1.0.0",
"typescript": "^5.2.2"
},
"dependencies": {
"framer-motion": "^10.18.0",
"react-markdown": "^9.0.1",
"rsfamily-nav-icon": "^1.0.3",
"rspress": "^1.25.1",
"tailwindcss": "^3.4.0"
"rsfamily-doc-ui": "^1.0.3",
"rspress": "^1.26.1"
}
}
7 changes: 1 addition & 6 deletions packages/document/rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
root: path.join(__dirname, 'docs'),
title: 'Rsdoctor',
description: 'A one-stop build analyzer for Rspack and Webpack.',
icon: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/logo/rsdoctor-large.png',
icon: 'https://assets.rspack.dev/rsdoctor/rsdoctor-logo-960x960.png',
lang: 'en',
base: '/',
logo: {
Expand Down Expand Up @@ -88,10 +88,5 @@ export default defineConfig({
'@zh': path.join(__dirname, 'docs/zh'),
},
},
tools: {
postcss(config, { addPlugins }) {
addPlugins([require('tailwindcss')]);
},
},
},
});
11 changes: 0 additions & 11 deletions packages/document/tailwind.config.js

This file was deleted.

57 changes: 0 additions & 57 deletions packages/document/theme/components/HomeFeatures/index.module.scss

This file was deleted.

72 changes: 0 additions & 72 deletions packages/document/theme/components/HomeFeatures/index.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions packages/document/theme/components/HomeFooter/index.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions packages/document/theme/components/HomeHero/index.module.scss

This file was deleted.

Loading
Loading