Skip to content

Commit 78461bf

Browse files
authoredAug 7, 2024··
Add Faq to Fury website. (#147)
Add Faq to Fury website. apache/fury#1793
1 parent d83960b commit 78461bf

File tree

6 files changed

+71
-3
lines changed

6 files changed

+71
-3
lines changed
 

‎docusaurus.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ const config: Config = {
9999
to: 'download',
100100
label: 'Download',
101101
},
102+
{
103+
position: 'right',
104+
to: 'https://github.com/apache/fury/issues/1793',
105+
label: 'FAQ',
106+
},
102107
{to: '/blog', label: 'Blog', position: 'right'},
103108
{
104109
type: 'dropdown',

‎i18n/en/docusaurus-theme-classic/navbar.json

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"message": "Download",
2828
"description": "Navbar item with label Download"
2929
},
30+
"item.label.FAQ": {
31+
"message": "FAQ",
32+
"description": "Navbar item with label FAQ"
33+
},
3034
"item.label.Blog": {
3135
"message": "Blog",
3236
"description": "Navbar item with label Blog"

‎i18n/zh-CN/docusaurus-theme-classic/navbar.json

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"message": "下载",
2828
"description": "Navbar item with label Download"
2929
},
30+
"item.label.FAQ": {
31+
"message": "FAQ",
32+
"description": "Navbar item with label FAQ"
33+
},
3034
"item.label.Blog": {
3135
"message": "博客",
3236
"description": "Navbar item with label Blog"

‎package-lock.json

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@docusaurus/core": "3.0.1",
1919
"@docusaurus/preset-classic": "3.0.1",
2020
"@mdx-js/react": "^3.0.0",
21+
"aos": "^2.3.4",
2122
"clsx": "^2.0.0",
2223
"docusaurus-lunr-search": "^3.3.1",
2324
"prism-react-renderer": "^2.3.0",

‎src/pages/index.tsx

+36-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React, { useEffect } from "react";
12
import clsx from "clsx";
23
import Link from "@docusaurus/Link";
34
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
@@ -6,12 +7,27 @@ import HomepageFeatures from "@site/src/components/HomepageFeatures";
67
import Heading from "@theme/Heading";
78
import styles from "./index.module.css";
89
import Translate, { translate } from "@docusaurus/Translate";
9-
import React from "react";
10+
import AOS from "aos";
11+
import "aos/dist/aos.css";
1012

1113
function HomepageHeader() {
1214
const { siteConfig } = useDocusaurusContext();
15+
16+
useEffect(() => {
17+
AOS.init({
18+
offset: 100,
19+
duration: 700,
20+
easing: "ease-out-quad",
21+
once: true,
22+
});
23+
window.addEventListener("load", AOS.refresh);
24+
}, []);
25+
1326
return (
14-
<header className={clsx("hero hero--primary", styles.heroBanner)}>
27+
<header
28+
className={clsx("hero hero--primary", styles.heroBanner)}
29+
data-aos="fade-up"
30+
>
1531
<div className="container">
1632
<Heading as="h1" className="hero__title">
1733
<Translate id="homepage.hero.title">{siteConfig.title}</Translate>
@@ -25,6 +41,8 @@ function HomepageHeader() {
2541
<Link
2642
className="button button--secondary button--lg"
2743
to="https://github.com/apache/fury"
44+
data-aos="fade-up"
45+
data-aos-delay="200"
2846
>
2947
<Translate
3048
id="homepage.githubButton"
@@ -36,6 +54,8 @@ function HomepageHeader() {
3654
<Link
3755
className="button button--secondary button--lg"
3856
to="/docs/start/install"
57+
data-aos="fade-up"
58+
data-aos-delay="400"
3959
>
4060
<Translate
4161
id="homepage.getStartedButton"
@@ -52,6 +72,17 @@ function HomepageHeader() {
5272

5373
export default function Home(): JSX.Element {
5474
const { siteConfig } = useDocusaurusContext();
75+
76+
useEffect(() => {
77+
AOS.init({
78+
offset: 100,
79+
duration: 700,
80+
easing: "ease-out-quad",
81+
once: true,
82+
});
83+
window.addEventListener("load", AOS.refresh);
84+
}, []);
85+
5586
return (
5687
<>
5788
<Layout
@@ -64,7 +95,9 @@ export default function Home(): JSX.Element {
6495
>
6596
<HomepageHeader />
6697
<main>
67-
<HomepageFeatures />
98+
<div data-aos="fade-up" data-aos-delay="600">
99+
<HomepageFeatures />
100+
</div>
68101
</main>
69102
</Layout>
70103
</>

0 commit comments

Comments
 (0)
Please sign in to comment.