Skip to content

Commit

Permalink
docs: complete dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Aug 16, 2024
1 parent 031be56 commit be6c838
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 91 deletions.
Binary file removed website/components/landingpage/Background.png
Binary file not shown.
3 changes: 0 additions & 3 deletions website/components/landingpage/WhyRspack/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
:global {
}

.featuresContainer {
display: flex;
padding: 32px 144px;
Expand Down
3 changes: 1 addition & 2 deletions website/components/landingpage/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@
}

.landingPage {
background-size: contain;
position: relative;
}

.background {
position: absolute;
top: 0;
top: calc(-1 * var(--rp-nav-height));
left: 0;
width: 100%;
z-index: -1;
Expand Down
13 changes: 13 additions & 0 deletions website/components/landingpage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useEffect, useMemo } from 'react';
import { useDark } from 'rspress/runtime';
import BackgroundUrl from './Background.simple.png';
import { Benchmark } from './Benchmark';
import BuiltWithRspack from './BuiltWithRspack';
Expand All @@ -16,6 +18,17 @@ const Background = () => {
const LandingPage = () => {
return (
<div className={styles.landingPage}>
<style>
{`:root {
--rp-c-bg: #0b0c0e;
}
:root:not(.dark) {
--rp-c-bg: #fff;
}
.rspress-nav {
background: transparent !important;
}`}
</style>
<Background />
<Hero />
<WhyRspack />
Expand Down
43 changes: 0 additions & 43 deletions website/docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,4 @@
pageType: home

link-rss: blog-rss

hero:
name: Rspack
text: |
The fast Rust-based
web bundler
tagline: Seamlessly replace webpack with compatible API
image:
src: https://assets.rspack.dev/rspack/rspack-logo.svg
alt: logo
actions:
- theme: brand
text: Get Started
link: /guide/start/quick-start
- theme: alt
text: Learn More
link: /guide/start/introduction

features:
- title: Fast Startup
details: Combining TypeScript and Rust with a parallelized architecture to bring you the ultimate developer experience.
icon: 🚀
link: /guide/start/introduction
- title: Lightning HMR
details: A built-in incremental compilation mechanism provides superior Hot Module Replacement performance for large-scale projects.
icon:
link: /guide/start/introduction
- title: Webpack Compatible
details: Compatible with plugins and loaders in the webpack ecosystem, seamlessly integrating excellent libraries built by the community.
icon: 📦
link: /guide/compatibility/plugin
- title: Module Federation
details: Provide first-class support for Module Federation to facilitate the development of large-scale web applications.
icon: 🎨
link: /guide/features/module-federation
- title: Production Optimizations
details: Core optimizations such as tree shaking and minification have integrated implementations rather than deferring to plugins.
icon: 🛠️
link: /guide/optimization/production
- title: Framework Agnostic
details: Not bound to any frontend framework. Everyone can use it!
icon: 🎯
link: /guide/tech/react
---
43 changes: 0 additions & 43 deletions website/docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,4 @@
pageType: home

link-rss: blog-rss-zh

hero:
name: Rspack
text: |
基于 Rust 的高性能
Web 打包工具
tagline: 使用兼容 API 无缝替换 webpack
image:
src: https://assets.rspack.dev/rspack/rspack-logo.svg
alt: logo
actions:
- theme: brand
text: 快速开始
link: /zh/guide/start/quick-start
- theme: alt
text: 深入了解
link: /zh/guide/start/introduction

features:
- title: 启动速度极快
details: 基于 Rust,项目启动速度极快,带给你极致的开发体验。
icon: 🚀
link: /zh/guide/start/introduction
- title: 闪电般的 HMR
details: 内置增量编译机制,HMR 速度极快,完全胜任大型项目的开发。
icon:
link: /zh/guide/start/introduction
- title: 兼容 webpack
details: 兼容 webpack 生态中的 plugin 和 loader,无缝衔接社区中沉淀的优秀库。
icon: 📦
link: /zh/guide/compatibility/plugin
- title: 模块联邦
details: 为 Module Federation 提供一流的支持,助力开发规模化的 Web 应用。
icon: 🎨
link: /guide/features/module-federation
- title: 默认生产优化
details: 默认内置多种优化策略,如 Tree Shaking、代码压缩等等。
icon: 🛠️
link: /zh/guide/optimization/production
- title: '框架无关'
details: 不和任何前端框架绑定,保证足够的灵活性。
icon: 🎯
link: /zh/guide/tech/react
---

0 comments on commit be6c838

Please sign in to comment.