Skip to content

Commit

Permalink
custom copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
avi278 committed May 3, 2024
1 parent 2077767 commit 730a24c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
},
{
Expand Down Expand Up @@ -143,7 +142,7 @@ const config = {
items: [
{
label: 'Playground',
to: '/playground#playground-hook',
to: '/playground',
},

],
Expand Down Expand Up @@ -172,7 +171,6 @@ const config = {
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Geovisto | VUT FIT Brno. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
Expand Down
5 changes: 5 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ a.navbar__brand {

}

.custom_footer_copyright {
display: flex;
flex-direction: column;
}

.search-form {
width: 50%;
}
Expand Down
43 changes: 43 additions & 0 deletions src/theme/Footer/index.js
Original file line number Diff line number Diff line change
@@ -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 (
<FooterLayout
style={style}
links={links && links.length > 0 && <FooterLinks links={links} />}
logo={logo && <FooterLogo logo={logo} />}
copyright={copyright ? <FooterCopyright copyright={copyright}/> : <CustomFooterCopyright />}
/>
);
}

const CustomFooterCopyright = () => {
return (
<div className='custom_footer_copyright'>
<div>Copyright © ${new Date().getFullYear()} Geovisto | <a href='https://www.fit.vut.cz/.en' target="_blank">VUT FIT Brno</a> | <a href='https://www.ics.muni.cz/en' target="_blank">MU ICS</a>
</div>
<div>Built with Docusaurus.</div>
</div>
);
};


export default React.memo(Footer);

0 comments on commit 730a24c

Please sign in to comment.