Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: disclaimer and no-index tag #11

Merged
merged 3 commits into from
May 8, 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
36 changes: 36 additions & 0 deletions src/components/Disclaimer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { styled, Box, Typography } from '@mui/material';

import { DISCLAIMER_HEIGHT } from '~/utils';

export const Disclaimer = () => {
return (
<Container>
<Typography variant='h1'>
Disclaimer: This application is currently in beta. Please proceed at your own risk. Any funds lost through its
use are non-recoverable.
</Typography>
</Container>
);
};

export const Container = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1rem 1.6rem;
height: ${DISCLAIMER_HEIGHT}rem;
width: 100%;
margin: 0 auto;
background-color: white;

h1 {
font-size: 1rem;
color: #121212;
font-weight: 500;
letter-spacing: 1;
@media (max-width: 720px) {
font-size: 0.8rem;
}
}
`;
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './Theme';
export * from './Disclaimer';
4 changes: 2 additions & 2 deletions src/containers/Landing/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { styled } from '@mui/material/styles';

import { MAIN_HEIGHT } from '~/utils';
import { DISCLAIMER_HEIGHT, SURROUND_HEIGHT } from '~/utils';

export const Landing = () => {
return (
Expand All @@ -13,7 +13,7 @@ export const Landing = () => {
const LandingContainer = styled('div')({
display: 'flex',
flexDirection: 'column',
height: `calc(100vh - ${MAIN_HEIGHT}rem)`,
height: `calc(100vh - ${SURROUND_HEIGHT}rem - ${DISCLAIMER_HEIGHT}rem)`,
padding: '0 8rem',
alignItems: 'center',
justifyContent: 'center',
Expand Down
4 changes: 3 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default function MyDocument(props: DocumentProps & DocumentHeadTagsProps)
<meta name='twitter:description' content={descriptionText} />

<meta name='twitter:image' content={bannerImage} />
<meta name='robots' content='index, follow' />

{/* To prevent all search engines from indexing */}
<meta name='robots' content='noindex' />
</Head>
<body>
<Main />
Expand Down
4 changes: 4 additions & 0 deletions src/pages/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { Box, CssBaseline, styled } from '@mui/material';

import { Disclaimer } from '~/components';
import { Footer, Header } from '~/containers';

export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
<CssBaseline />
<Disclaimer />

<MainContent>
<NoScriptMessage>
<p>This website requires JavaScript to function properly.</p>
Expand Down
3 changes: 2 additions & 1 deletion src/utils/Variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const zIndex = {
TOAST: 500,
};

export const DISCLAIMER_HEIGHT = 3;
export const HEADER_HEIGHT = 8; // Header height in rem units
export const FOOTER_HEIGHT = 8; // Footer height in rem units
export const MAIN_HEIGHT = HEADER_HEIGHT + FOOTER_HEIGHT;
export const SURROUND_HEIGHT = HEADER_HEIGHT + FOOTER_HEIGHT;
Loading