From 730a24c5c5a68c0d98154096eb4d3a468dcf4bb8 Mon Sep 17 00:00:00 2001 From: Iva Utikalova Date: Fri, 3 May 2024 13:08:20 +0200 Subject: [PATCH] custom copyright --- docusaurus.config.js | 8 +++----- src/css/custom.css | 5 +++++ src/theme/Footer/index.js | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 src/theme/Footer/index.js diff --git a/docusaurus.config.js b/docusaurus.config.js index 60e43af..22b514f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -92,15 +92,14 @@ const config = { label: 'Tutorials', }, { - to: 'playground#playground-hook', + to: 'playground', label: 'Playground', position: 'left', }, { to: 'docs-geovisto/', - docsPluginId: 'docs-geovisto', position: 'left', - label: 'Documentation', + label: 'Docs', activeBaseRegex: `docs-geovisto/README`, }, { @@ -143,7 +142,7 @@ const config = { items: [ { label: 'Playground', - to: '/playground#playground-hook', + to: '/playground', }, ], @@ -172,7 +171,6 @@ const config = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} Geovisto | VUT FIT Brno. Built with Docusaurus.`, }, prism: { theme: lightCodeTheme, diff --git a/src/css/custom.css b/src/css/custom.css index 4437717..1caea49 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -219,6 +219,11 @@ a.navbar__brand { } +.custom_footer_copyright { + display: flex; + flex-direction: column; +} + .search-form { width: 50%; } diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js new file mode 100644 index 0000000..396af44 --- /dev/null +++ b/src/theme/Footer/index.js @@ -0,0 +1,43 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import React from 'react'; +import {useThemeConfig} from '@docusaurus/theme-common'; +import FooterLinks from '@theme/Footer/Links'; +import FooterLogo from '@theme/Footer/Logo'; +import FooterCopyright from '@theme/Footer/Copyright'; +import FooterLayout from '@theme/Footer/Layout'; + +function Footer() { + const {footer} = useThemeConfig(); + + if (!footer) { + return null; + } + + const {copyright, links, logo, style} = footer; + return ( + 0 && } + logo={logo && } + copyright={copyright ? : } + /> + ); +} + +const CustomFooterCopyright = () => { + return ( +
+
Copyright © ${new Date().getFullYear()} Geovisto | VUT FIT Brno | MU ICS +
+
Built with Docusaurus.
+
+ ); +}; + + +export default React.memo(Footer);