diff --git a/src/components/Homepage/Aside/index.js b/src/components/Homepage/Aside/index.js index c2709f85..9a85b0b8 100644 --- a/src/components/Homepage/Aside/index.js +++ b/src/components/Homepage/Aside/index.js @@ -1,6 +1,7 @@ import React from 'react'; import {ShareButtons} from "/src/components/ShareButtons"; +import { ToTopButton } from '/src/components/ToTopButton' import styles from './styles.module.scss'; import clsx from "clsx"; @@ -38,6 +39,7 @@ export default function Aside({editUrl}){
+
diff --git a/src/components/ShareButtons/index.js b/src/components/ShareButtons/index.js index 618ffe9c..f755c754 100644 --- a/src/components/ShareButtons/index.js +++ b/src/components/ShareButtons/index.js @@ -78,7 +78,7 @@ export const ShareButtons = ({className}) => { }} > Copy page link - {showTip && (Copied!)} + {showTip && (Copied!)} ) diff --git a/src/components/ToTopButton/index.js b/src/components/ToTopButton/index.js new file mode 100644 index 00000000..d5cffa46 --- /dev/null +++ b/src/components/ToTopButton/index.js @@ -0,0 +1,25 @@ +import React from 'react' +import Button from '../Button' +import clsx from 'clsx' +import Translate from '@docusaurus/Translate'; + +export const ToTopButton = ({ className }) => { + + return ( + + ) +} diff --git a/src/theme/BlogAside/index.js b/src/theme/BlogAside/index.js index 2236b077..e3d2bcf6 100644 --- a/src/theme/BlogAside/index.js +++ b/src/theme/BlogAside/index.js @@ -7,6 +7,7 @@ import clsx from "clsx"; import {FeedbackForm} from "/src/components/FeedbackForm"; import Translate from '@docusaurus/Translate'; +import { ToTopButton } from '../../components/ToTopButton' export default function BlogAside({editUrl}){ return
@@ -27,6 +28,7 @@ export default function BlogAside({editUrl}){
+
diff --git a/src/theme/DocItem/Aside/index.js b/src/theme/DocItem/Aside/index.js index 0804cacd..24ace006 100644 --- a/src/theme/DocItem/Aside/index.js +++ b/src/theme/DocItem/Aside/index.js @@ -12,6 +12,7 @@ import MoreActions from "@theme/DocItem/MoreActions"; import clsx from "clsx"; import styles from './styles.module.scss'; +import { ToTopButton } from '../../../components/ToTopButton' const DocTOCDesktop = () => { const {frontMatter, toc} = useDoc(); @@ -32,6 +33,7 @@ export default function DocItemAside() {
+
diff --git a/src/theme/Layout/SVGSprite/index.js b/src/theme/Layout/SVGSprite/index.js index e1e6c83f..dd2bba23 100644 --- a/src/theme/Layout/SVGSprite/index.js +++ b/src/theme/Layout/SVGSprite/index.js @@ -74,6 +74,9 @@ export default function SVGSprite() { + + +