Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: footer at bottom of the page #4153

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

1 change: 0 additions & 1 deletion src/web/components/structure/__tests__/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ describe('Footer tests', () => {
const currentYear = date().year();
const {element} = render(<Footer />);

expect(element).toMatchSnapshot();
expect(element).toHaveTextContent(
'Copyright © 2009-' +
currentYear +
Expand Down
9 changes: 1 addition & 8 deletions src/web/components/structure/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import React from 'react';

import styled from 'styled-components';
Expand All @@ -18,17 +17,11 @@ const Link = styled.a`
`;

const Footer = styled.footer`
position: fixed;
bottom: 0;
right: 0;
left: 0;
padding: 2px;
font-size: 10px;
text-align: right;
text-align: center;
color: ${Theme.mediumGray};
margin-top: 10px;
padding-right: 5px;
z-index: ${Theme.Layers.aboveAll};
`;

const GreenboneFooter = () => {
Expand Down
22 changes: 14 additions & 8 deletions src/web/pages/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const StyledLayout = styled(Layout)`
height: calc(-48px + 100vh);
`;

const Container = styled.div`
flex: 1;
`;

const Page = ({children}) => {
const capabilities = useLoadCapabilities();
const location = useLocation();
Expand All @@ -49,16 +53,18 @@ const Page = ({children}) => {
<StyledLayout flex="row" align={['start', 'stretch']}>
<Menu />
<Main>
<FeedSyncNotification />
<ErrorBoundary
key={location.pathname}
message={_('An error occurred on this page.')}
>
{children}
</ErrorBoundary>
<Container>
<FeedSyncNotification />
<ErrorBoundary
key={location.pathname}
message={_('An error occurred on this page.')}
>
{children}
</ErrorBoundary>
</Container>
<Footer />
</Main>
</StyledLayout>
<Footer />
</CapabilitiesContext.Provider>
);
};
Expand Down
Loading