docs: add basic home page
This commit is contained in:
parent
ba1ee15476
commit
4bf54c59b0
@ -23,7 +23,7 @@ a {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 滚动条 */
|
/* Scrollbar */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
|
@ -1,3 +1,38 @@
|
|||||||
@tailwind base;
|
@tailwind base;
|
||||||
|
|
||||||
|
@layer base {
|
||||||
|
/* Scrollbar */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-corner {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
@apply bg-black bg-opacity-10;
|
||||||
|
border-color: transparent;
|
||||||
|
background-clip: padding-box;
|
||||||
|
border-width: 2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
@apply bg-black bg-opacity-20;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
@apply bg-black bg-opacity-5;
|
||||||
|
border-color: transparent;
|
||||||
|
background-clip: padding-box;
|
||||||
|
border-width: 2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
@ -6,25 +6,25 @@
|
|||||||
|
|
||||||
/* You can override the default Infima variables here. */
|
/* You can override the default Infima variables here. */
|
||||||
:root {
|
:root {
|
||||||
--ifm-color-primary: #2e8555;
|
--ifm-color-primary: #147af3;
|
||||||
--ifm-color-primary-dark: #29784c;
|
--ifm-color-primary-dark: #0b6de1;
|
||||||
--ifm-color-primary-darker: #277148;
|
--ifm-color-primary-darker: #0b67d5;
|
||||||
--ifm-color-primary-darkest: #205d3b;
|
--ifm-color-primary-darkest: #0955af;
|
||||||
--ifm-color-primary-light: #33925d;
|
--ifm-color-primary-light: #2d88f4;
|
||||||
--ifm-color-primary-lighter: #359962;
|
--ifm-color-primary-lighter: #3a8ff5;
|
||||||
--ifm-color-primary-lightest: #3cad6e;
|
--ifm-color-primary-lightest: #5fa4f7;
|
||||||
--ifm-code-font-size: 95%;
|
--ifm-code-font-size: 95%;
|
||||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||||
[data-theme='dark'] {
|
[data-theme='dark'] {
|
||||||
--ifm-color-primary: #25c2a0;
|
--ifm-color-primary: #4791eb;
|
||||||
--ifm-color-primary-dark: #21af90;
|
--ifm-color-primary-dark: #2b80e8;
|
||||||
--ifm-color-primary-darker: #1fa588;
|
--ifm-color-primary-darker: #1e78e6;
|
||||||
--ifm-color-primary-darkest: #1a8870;
|
--ifm-color-primary-darkest: #1563c1;
|
||||||
--ifm-color-primary-light: #29d5b0;
|
--ifm-color-primary-light: #63a1ee;
|
||||||
--ifm-color-primary-lighter: #32d8b4;
|
--ifm-color-primary-lighter: #70aaef;
|
||||||
--ifm-color-primary-lightest: #4fddbf;
|
--ifm-color-primary-lightest: #9ac2f4;
|
||||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
/**
|
|
||||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
|
||||||
* and scoped locally.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.heroBanner {
|
|
||||||
padding: 4rem 0;
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 996px) {
|
|
||||||
.heroBanner {
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
@ -1,32 +1,72 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'clsx';
|
|
||||||
import Link from '@docusaurus/Link';
|
import Link from '@docusaurus/Link';
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import Layout from '@theme/Layout';
|
import Layout from '@theme/Layout';
|
||||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
import LogoSvg from '@site/static/img/logo.svg';
|
||||||
|
|
||||||
import styles from './index.module.css';
|
|
||||||
|
|
||||||
function HomepageHeader() {
|
function HomepageHeader() {
|
||||||
const { siteConfig } = useDocusaurusContext();
|
const { siteConfig } = useDocusaurusContext();
|
||||||
return (
|
return (
|
||||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
<header className="container">
|
||||||
<div className="container">
|
<div className="text-center mt-10">
|
||||||
<h1 className="hero__title">{siteConfig.title}</h1>
|
<LogoSvg className="w-40 h-40" />
|
||||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
<h1 className="text-5xl">
|
||||||
<div className={styles.buttons}>
|
<span className="text-gradient font-bold">{siteConfig.title}</span>
|
||||||
|
</h1>
|
||||||
|
<p className="text-black text-opacity-60 text-2xl">
|
||||||
|
{siteConfig.tagline}
|
||||||
|
</p>
|
||||||
|
<p className="opacity-60">
|
||||||
|
Tianji brings all your commonly used tools together in one place
|
||||||
|
</p>
|
||||||
|
<div className="text-xl">
|
||||||
|
<span className="underline font-semibold">Website analytics</span> +{' '}
|
||||||
|
<span className="underline font-semibold">Uptime Monitor</span> +{' '}
|
||||||
|
<span className="underline font-semibold">Server Status</span> ={' '}
|
||||||
|
<span className="text-gradient font-bold">Tianji</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="text-center my-6">
|
||||||
<Link
|
<Link
|
||||||
className="button button--secondary button--lg"
|
className="button button--primary button--lg"
|
||||||
to="/docs/intro"
|
to="mailto:moonrailgun@gmail.com?subject=I want to apply for Tianji early access account&body=Here is my account: <Here place your username>"
|
||||||
>
|
>
|
||||||
Docusaurus Tutorial - 5min ⏱️
|
Early Access
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function HomepageMain() {
|
||||||
|
return (
|
||||||
|
<main className="container pb-8">
|
||||||
|
<div className="flex flex-wrap gap-2 justify-around mt-4 mb-8">
|
||||||
|
<div className="px-4 py-2 border rounded border-solid border-gray-300 checked-item">
|
||||||
|
✔ No cookies
|
||||||
|
</div>
|
||||||
|
<div className="px-4 py-2 border rounded border-solid border-gray-300 checked-item">
|
||||||
|
✔ GDPR & CCPA compliant
|
||||||
|
</div>
|
||||||
|
<div className="px-4 py-2 border rounded border-solid border-gray-300 checked-item">
|
||||||
|
✔ Open API
|
||||||
|
</div>
|
||||||
|
<div className="px-4 py-2 border rounded border-solid border-gray-300 checked-item">
|
||||||
|
✔ Open Source
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="text-center">
|
||||||
|
<img
|
||||||
|
className="border-8 border-solid border-gray-200 rounded-lg shadow-lg"
|
||||||
|
src="/img/preview.png"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export default function Home(): JSX.Element {
|
export default function Home(): JSX.Element {
|
||||||
const { siteConfig } = useDocusaurusContext();
|
const { siteConfig } = useDocusaurusContext();
|
||||||
return (
|
return (
|
||||||
@ -35,9 +75,8 @@ export default function Home(): JSX.Element {
|
|||||||
description="Description will go into a meta tag in <head />"
|
description="Description will go into a meta tag in <head />"
|
||||||
>
|
>
|
||||||
<HomepageHeader />
|
<HomepageHeader />
|
||||||
<main>
|
|
||||||
<HomepageFeatures />
|
<HomepageMain />
|
||||||
</main>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
website/static/img/preview.png
Normal file
BIN
website/static/img/preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 85 KiB |
@ -1,8 +0,0 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
module.exports = {
|
|
||||||
content: ['./src/**/*.{html,tsx}'],
|
|
||||||
theme: {
|
|
||||||
extend: {},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
}
|
|
24
website/tailwind.config.ts
Normal file
24
website/tailwind.config.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import type { Config } from 'tailwindcss';
|
||||||
|
import { PluginCreator } from 'tailwindcss/types/config';
|
||||||
|
|
||||||
|
const plugin: PluginCreator = (api) => {
|
||||||
|
api.addUtilities({
|
||||||
|
'.text-gradient': {
|
||||||
|
background:
|
||||||
|
'linear-gradient(270deg, #00E725 -33.33%, #0799B9 17.93%, #940DFF 105.3%)',
|
||||||
|
backgroundClip: 'text',
|
||||||
|
color: 'transparent',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
corePlugins: {
|
||||||
|
preflight: false,
|
||||||
|
},
|
||||||
|
content: ['./src/**/*.{html,tsx}'],
|
||||||
|
theme: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [plugin],
|
||||||
|
} satisfies Config;
|
Loading…
Reference in New Issue
Block a user