Skip to content

Commit

Permalink
Add Faq to Fury website. (#147)
Browse files Browse the repository at this point in the history
Add Faq to Fury website.

apache/fury#1793
  • Loading branch information
LofiSu authored Aug 7, 2024
1 parent d83960b commit 78461bf
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ const config: Config = {
to: 'download',
label: 'Download',
},
{
position: 'right',
to: 'https://github.com/apache/fury/issues/1793',
label: 'FAQ',
},
{to: '/blog', label: 'Blog', position: 'right'},
{
type: 'dropdown',
Expand Down
4 changes: 4 additions & 0 deletions i18n/en/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"message": "Download",
"description": "Navbar item with label Download"
},
"item.label.FAQ": {
"message": "FAQ",
"description": "Navbar item with label FAQ"
},
"item.label.Blog": {
"message": "Blog",
"description": "Navbar item with label Blog"
Expand Down
4 changes: 4 additions & 0 deletions i18n/zh-CN/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"message": "下载",
"description": "Navbar item with label Download"
},
"item.label.FAQ": {
"message": "FAQ",
"description": "Navbar item with label FAQ"
},
"item.label.Blog": {
"message": "博客",
"description": "Navbar item with label Blog"
Expand Down
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@docusaurus/core": "3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@mdx-js/react": "^3.0.0",
"aos": "^2.3.4",
"clsx": "^2.0.0",
"docusaurus-lunr-search": "^3.3.1",
"prism-react-renderer": "^2.3.0",
Expand Down
39 changes: 36 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React, { useEffect } from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
Expand All @@ -6,12 +7,27 @@ import HomepageFeatures from "@site/src/components/HomepageFeatures";
import Heading from "@theme/Heading";
import styles from "./index.module.css";
import Translate, { translate } from "@docusaurus/Translate";
import React from "react";
import AOS from "aos";
import "aos/dist/aos.css";

function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();

useEffect(() => {
AOS.init({
offset: 100,
duration: 700,
easing: "ease-out-quad",
once: true,
});
window.addEventListener("load", AOS.refresh);
}, []);

return (
<header className={clsx("hero hero--primary", styles.heroBanner)}>
<header
className={clsx("hero hero--primary", styles.heroBanner)}
data-aos="fade-up"
>
<div className="container">
<Heading as="h1" className="hero__title">
<Translate id="homepage.hero.title">{siteConfig.title}</Translate>
Expand All @@ -25,6 +41,8 @@ function HomepageHeader() {
<Link
className="button button--secondary button--lg"
to="https://github.com/apache/fury"
data-aos="fade-up"
data-aos-delay="200"
>
<Translate
id="homepage.githubButton"
Expand All @@ -36,6 +54,8 @@ function HomepageHeader() {
<Link
className="button button--secondary button--lg"
to="/docs/start/install"
data-aos="fade-up"
data-aos-delay="400"
>
<Translate
id="homepage.getStartedButton"
Expand All @@ -52,6 +72,17 @@ function HomepageHeader() {

export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();

useEffect(() => {
AOS.init({
offset: 100,
duration: 700,
easing: "ease-out-quad",
once: true,
});
window.addEventListener("load", AOS.refresh);
}, []);

return (
<>
<Layout
Expand All @@ -64,7 +95,9 @@ export default function Home(): JSX.Element {
>
<HomepageHeader />
<main>
<HomepageFeatures />
<div data-aos="fade-up" data-aos-delay="600">
<HomepageFeatures />
</div>
</main>
</Layout>
</>
Expand Down

0 comments on commit 78461bf

Please sign in to comment.