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

fix: some bugs #140

Merged
merged 5 commits into from
Aug 28, 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
14 changes: 8 additions & 6 deletions src/css/_doc.siderbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ html[data-theme="dark"] {
--ifm-menu-color-background-hover: transparent;
}

[class^="docRoot_"] {
width: 1440px !important;
}
@media screen and (min-width: 1140px) {
[class^="docRoot_"] {
width: 1440px !important;
}

[class^="docsWrapper_"] {
display: flex;
justify-content: center;
[class^="docsWrapper_"] {
display: flex;
justify-content: center;
}
}

//overrides
Expand Down
11 changes: 8 additions & 3 deletions src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,14 @@ a {

.navbar--fixed-top {
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
backdrop-filter: blur(8px); /* Apply the blur effect */
-webkit-backdrop-filter: blur(8px); /* Safari support */
background: transparent;
}

@media screen and (min-width: 1140px) {
.navbar--fixed-top {
backdrop-filter: blur(8px); /* Apply the blur effect */
-webkit-backdrop-filter: blur(8px); /* Safari support */
background: transparent;
}
}

.font-sans {
Expand Down
67 changes: 30 additions & 37 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
import React, { useEffect, useState } from "react";
import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import HomepageFeatures from "@site/src/components/HomepageFeatures";
import Benchmark from "../components/Benchmark";
import { useColorMode } from '@docusaurus/theme-common';
import StarrySky from "../components/StarrySky";
import styles from "./index.module.css";
import Translate from "@docusaurus/Translate";
import AnimatedGradientStarWithGithub from "../components/MagicUi/animated-shiny-text";
import NeonGradientCard from '../components/MagicUi/neon-gradient-card';
import BlurFade from "../components/MagicUi/blur-fade";
import BentoGridCard from "../components/MagicUi/card";
import { AuroraBackground } from "../components/ui/aurora-back";
import BrowserOnly from "@docusaurus/BrowserOnly";

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

return (
<header
className={clsx(
Expand Down Expand Up @@ -101,51 +97,48 @@ function HomepageHeader() {
);
}

const HomeBase = () => {

const HomeBaseContent = () => {
return (
<BrowserOnly>
{() => <HomeBaseContent />}
</BrowserOnly>
);
};
{() => {
const { colorMode } = useColorMode();
const MainContent = () => (
<main className="mb-20 my-10 max-w-7xl mx-auto w-full px-4 sm:px-6 lg:px-8max-w-6xl">
<AnimatedGradientStarWithGithub />
<HomepageHeader />
<BentoGridCard />
</main>
);

const HomeBaseContent = () => {
const { colorMode } = useColorMode();
const MainContent = () => (
<main className="mb-20 my-10 max-w-7xl mx-auto w-full px-4 sm:px-6 lg:px-8max-w-6xl">
<AnimatedGradientStarWithGithub />
<HomepageHeader />
<BentoGridCard />
</main>
if (colorMode === 'dark') {
return (
<>
<StarrySky />
<MainContent />
</>
);
} else {
return (
<AuroraBackground>
<MainContent />
</AuroraBackground>
);
}
}}
</BrowserOnly>
);

if (colorMode === 'dark') {
return (
<>
<StarrySky />
<MainContent />
</>
);
} else {
return (
<AuroraBackground>
<MainContent />
</AuroraBackground>
);
}
};

export default function Home() {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
//@ts-ignore
title={`${siteConfig.title} Documentation`}
description="Description will go into a meta tag in <head />"
>
<HomeBase />
{/* <NeonGradientCard height='18rem' borderRadius={0}> */}
{/* </NeonGradientCard> */}
{/* <HomepageFeatures /> */}
<HomeBaseContent />
</Layout >
);
}
Expand Down
116 changes: 53 additions & 63 deletions src/theme/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,82 +1,72 @@
import React from 'react';
import type FooterType from '@theme/Footer';
import type { WrapperProps } from '@docusaurus/types';
import { Github, Twitter } from 'lucide-react';
import { GitHubLogoIcon, TwitterLogoIcon, DiscordLogoIcon } from '@radix-ui/react-icons';
import NeonGradientCard from '../../components/MagicUi/neon-gradient-card';

type Props = WrapperProps<typeof FooterType>;

export default function FooterWrapper(props: Props): JSX.Element {
return (
<>
{/* <NeonGradientCard height='18rem' borderRadius={0}> */}
<section className="py-10 bg-zinc-950 sm:pt-12 lg:pt-20 text-white">
<div className="px-4 mx-auto sm:px-6 lg:px-8 max-w-7xl">
<div className='flex justify-between'>
<div className='flex-col flex gap-4'>
<img className="h-14 w-40 auto" src="https://www.farmfe.org/img/logo-farm.png" alt="" />
<span className='text-xl font-bold'>Extremely Fast Web Build Tool Written in Rust</span>
</div>
<div>
<div className="grid grid-cols-3 gap-x-5 gap-y-12 md:grid-cols-3 md:gap-x-12">
<div>
<p className="text-base text-gray-500">Guide</p>

<ul className="list-none mt-8 space-y-4 p-0">
<li>
<a href="#" title="" className="text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Quick Start </a>
</li>
<li>
<a href="#" title="" className="text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Introduction </a>
</li>
</ul>
</div>

<div>
<p className="text-base text-gray-500">Community</p>

<ul className="list-none mt-8 space-y-4 p-0">
<li>
<a href="#" title="" className="text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> WeChat Group </a>
</li>
<li>
<a href="#" title="" className="text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Discord </a>
</li>
</ul>
</div>

<div>
<p className="text-base text-gray-500">More</p>
<section className="py-8 bg-zinc-950 sm:py-10 lg:py-12 text-white">
<div className="px-4 mx-auto sm:px-6 lg:px-8 max-w-7xl">
<div className='flex flex-col items-center sm:items-start gap-8 sm:flex-row sm:justify-between'>
<div className='flex flex-col items-center sm:items-start gap-4'>
<img className="h-12 w-36 sm:h-14 sm:w-40" src="https://www.farmfe.org/img/logo-farm.png" alt="" />
<span className='text-lg sm:text-xl font-bold text-center sm:text-left'>Extremely Fast Web Build Tool Written in Rust</span>
</div>
<div className="w-full sm:w-auto">
<div className="grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-x-12">
<div>
<p className="text-base text-gray-500 font-semibold mb-4">Guide</p>
<ul className="list-none space-y-3 p-0">
<li>
<a href="#" title="" className="text-sm sm:text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Quick Start </a>
</li>
<li>
<a href="#" title="" className="text-sm sm:text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Introduction </a>
</li>
</ul>
</div>

<ul className=" list-none mt-8 space-y-4 p-0">
<li>
<a href="#" title="" className="text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Github </a>
</li>
<li>
<a href="#" title="" className="text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Twitter </a>
</li>
</ul>
</div>
<div>
<p className="text-base text-gray-500 font-semibold mb-4">Community</p>
<ul className="list-none space-y-3 p-0">
<li>
<a href="#" title="" className="text-sm sm:text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> WeChat Group </a>
</li>
<li>
<a href="#" title="" className="text-sm sm:text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Discord </a>
</li>
</ul>
</div>

<div>
<p className="text-base text-gray-500 font-semibold mb-4">More</p>
<ul className="list-none space-y-3 p-0">
<li>
<a href="#" title="" className="text-sm sm:text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Github </a>
</li>
<li>
<a href="#" title="" className="text-sm sm:text-base text-white transition-all duration-200 hover:text-opacity-80 focus:text-opacity-80"> Twitter </a>
</li>
</ul>
</div>
</div>
</div>
</div>

<div className="my-14" />

<div className="flex flex-wrap items-center justify-between">
<ul className="flex items-center space-x-3 md:order-1 gap-3 p-0">
<GitHubLogoIcon className='h-6 w-6' />
<TwitterLogoIcon className='h-6 w-6' />
<DiscordLogoIcon className='h-6 w-6' />
</ul>
<div className="my-8 sm:my-12" />

<div className="flex flex-col items-center sm:flex-row sm:justify-between">
<ul className="flex items-center space-x-4 mb-4 sm:mb-0 p-0">
<GitHubLogoIcon className='h-5 w-5 sm:h-6 sm:w-6' />
<TwitterLogoIcon className='h-5 w-5 sm:h-6 sm:w-6' />
<DiscordLogoIcon className='h-5 w-5 sm:h-6 sm:w-6' />
</ul>

<p className="w-full mt-8 text-sm text-center text-gray-100 md:mt-0 md:w-auto md:order-2">Copyright © 2024 Farm Community. Built with Docusaurus.</p>
</div>
<p className="text-xs sm:text-sm text-center text-gray-100">Copyright © 2024 Farm Community. Built with Docusaurus.</p>
</div>
</section>
{/* </NeonGradientCard> */}
</>
</div>
</section>
);
}
Loading