diff --git a/src/assets/css/common.scss b/src/assets/css/common.scss
index 98f3115..e1716f7 100644
--- a/src/assets/css/common.scss
+++ b/src/assets/css/common.scss
@@ -1,7 +1,4 @@
-$main-color: #00D4FF;
-$background-color: #F5F5F5;
-$font-main-color: #4D4D4D;
-$font-secondary-color: #9E9E9E;
+@use '@/assets/css/constants.scss' as constants;
#root {
height: 100vh;
@@ -9,7 +6,7 @@ $font-secondary-color: #9E9E9E;
}
.body {
- color: $font-main-color;
+ color: constants.$font-main-color;
user-select: none;
min-width: 900px;
min-height: 400px;
@@ -107,4 +104,12 @@ $font-secondary-color: #9E9E9E;
width: 23px;
height: 23px;
}
+}
+
+.flex-horizontal {
+ flex-direction: row;
+}
+
+.flex-vertical {
+ flex-direction: column;
}
\ No newline at end of file
diff --git a/src/assets/css/components/common/indicator.scss b/src/assets/css/components/common/indicator.scss
new file mode 100644
index 0000000..85981c8
--- /dev/null
+++ b/src/assets/css/components/common/indicator.scss
@@ -0,0 +1,28 @@
+@use '@/assets/css/constants.scss' as constants;
+
+.dot-list {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+
+ .item {
+ flex: auto;
+
+ .dot {
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ border: {
+ width: 2px;
+ color: constants.$font-secondary-color;
+ style: solid;
+ };
+ }
+ }
+
+ .active>* {
+ background-color: constants.$font-secondary-color;
+ }
+}
\ No newline at end of file
diff --git a/src/assets/css/components/home/home.scss b/src/assets/css/components/home/home.scss
new file mode 100644
index 0000000..f339e4f
--- /dev/null
+++ b/src/assets/css/components/home/home.scss
@@ -0,0 +1,11 @@
+.indicator {
+ position: fixed;
+ margin: {
+ right: 20px;
+ };
+ width: 20px;
+ height: 100px;
+ right: 0;
+ top: 50%;
+ transform: translateY(-50%);
+}
\ No newline at end of file
diff --git a/src/assets/css/components/home/slogan.scss b/src/assets/css/components/home/slogan.scss
index 58134a9..018eec3 100644
--- a/src/assets/css/components/home/slogan.scss
+++ b/src/assets/css/components/home/slogan.scss
@@ -1,4 +1,4 @@
-@use "../../mixins" as mixins;
+@use "@/assets/css/mixins" as mixins;
.center-box {
display: flex;
diff --git a/src/assets/css/constants.scss b/src/assets/css/constants.scss
new file mode 100644
index 0000000..78451a4
--- /dev/null
+++ b/src/assets/css/constants.scss
@@ -0,0 +1,4 @@
+$main-color: #00D4FF;
+$background-color: #F5F5F5;
+$font-main-color: #4D4D4D;
+$font-secondary-color: #9E9E9E;
diff --git a/src/assets/css/pages/header.scss b/src/assets/css/pages/header.scss
index 69f6e16..37180a9 100644
--- a/src/assets/css/pages/header.scss
+++ b/src/assets/css/pages/header.scss
@@ -1,4 +1,4 @@
-@use "../mixins" as mixins;
+@use "@/assets/css/mixins" as mixins;
.nav {
display: flex;
diff --git a/src/components/Project.tsx b/src/components/Project.tsx
deleted file mode 100644
index 5175273..0000000
--- a/src/components/Project.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react'
-
-const Project: React.FC = () => {
- return (
- <>
-
App
- >
- )
-}
-
-export default Project
diff --git a/src/components/common/FitCenter.tsx b/src/components/common/FitCenter.tsx
index 9bb4a35..b33d8e6 100644
--- a/src/components/common/FitCenter.tsx
+++ b/src/components/common/FitCenter.tsx
@@ -1,13 +1,21 @@
import React from 'react'
import '@/assets/css/components/common/fit-center.scss'
-const FitCenter: React.FC<
- React.DetailedHTMLProps, HTMLDivElement>
-> = (props) => {
- const { className, ..._props } = props
+interface FitCenterProps
+ extends React.DetailedHTMLProps, HTMLDivElement> {
+ vertical?: boolean
+}
+
+const FitCenter: React.FC = (props) => {
+ const { className, vertical, ..._props } = props
return (
<>
-
+
>
)
}
diff --git a/src/components/common/Indicator.tsx b/src/components/common/Indicator.tsx
new file mode 100644
index 0000000..e234fe9
--- /dev/null
+++ b/src/components/common/Indicator.tsx
@@ -0,0 +1,39 @@
+import React from 'react'
+import _ from 'lodash'
+import '@/assets/css/components/common/indicator.scss'
+
+interface IndicatorProps {
+ total: number
+ current: number
+ onSwitch?: (index: number) => void
+}
+
+const Indicator: React.FC = (props) => {
+ const { total, current, onSwitch } = props
+
+ const handleClick = (index: number) => {
+ return () => {
+ onSwitch && onSwitch(index)
+ }
+ }
+
+ return (
+ <>
+
+ {_.range(0, total).map((_value, index) => {
+ return (
+ -
+
+
+ )
+ })}
+
+ >
+ )
+}
+
+export default Indicator
diff --git a/src/components/home/OxygenToolbox.tsx b/src/components/home/OxygenToolbox.tsx
new file mode 100644
index 0000000..6423e3b
--- /dev/null
+++ b/src/components/home/OxygenToolbox.tsx
@@ -0,0 +1,17 @@
+import React from 'react'
+import FitCenter from '@/components/common/FitCenter.tsx'
+
+const OxygenToolbox: React.FC = () => {
+ return (
+ <>
+
+
+
Oxygen Toolbox
+
is coming soon...
+
+
+ >
+ )
+}
+
+export default OxygenToolbox
diff --git a/src/components/home/index.tsx b/src/components/home/index.tsx
index 31e793b..cc26b1a 100644
--- a/src/components/home/index.tsx
+++ b/src/components/home/index.tsx
@@ -1,13 +1,16 @@
import React, { useEffect } from 'react'
+import '@/assets/css/components/home/home.scss'
import FitFullScreen from '@/components/common/FitFullScreen'
import FitCenter from '@/components/common/FitCenter'
import { MainFrameworkContext } from '@/pages/MainFramework'
import Slogan from '@/components/home/Slogan'
+import OxygenToolbox from '@/components/home/OxygenToolbox'
+import Indicator from '@/components/common/Indicator.tsx'
const Home: React.FC = () => {
const {
hideScrollbarRef,
- navbarHiddenState: { setNavbarHidden },
+ navbarHiddenState: { navbarHidden, setNavbarHidden },
preventScrollState: { setPreventScroll }
} = useContext(MainFrameworkContext)
@@ -121,6 +124,7 @@ const Home: React.FC = () => {
if (event.key === 'ArrowDown') {
handleScrollDown()
}
+ console.log(content.length)
}
const content = [
@@ -129,7 +133,7 @@ const Home: React.FC = () => {
ref: fitFullScreenRef,
children:
},
- { children: 2 },
+ { children: },
{ children: 3 }
]
@@ -148,6 +152,10 @@ const Home: React.FC = () => {
return
})}
+
+
+
+
>
)
}
diff --git a/src/router/index.tsx b/src/router/index.tsx
index f5c342e..808527a 100644
--- a/src/router/index.tsx
+++ b/src/router/index.tsx
@@ -38,16 +38,6 @@ const routes: RouteObject[] = [
menu: true,
auth: false
}
- },
- {
- path: 'project',
- id: 'project',
- Component: React.lazy(() => import('@/components/Project')),
- handle: {
- name: '项目',
- menu: true,
- auth: false
- }
}
]
},