Files
5chan/src/components/views/NotFound.jsx
T

71 lines
1.9 KiB
React
Raw Normal View History

2023-08-08 20:41:08 +02:00
import React, { useEffect } from 'react';
2023-04-21 10:47:39 +02:00
import { Helmet } from 'react-helmet-async';
2023-03-06 18:38:33 +01:00
import { Link } from "react-router-dom";
2023-05-24 12:15:43 +02:00
import { Container, Header, Logo, Page, Boards, BoardsTitle } from '../styled/views/Home.styled';
2023-04-24 20:00:11 +00:00
import packageJson from '../../../package.json'
const {version} = packageJson
2023-03-06 18:38:33 +01:00
2023-05-27 12:55:16 +02:00
const NotFound = () => {
2023-03-17 17:49:30 +01:00
useEffect(() => {
2023-08-08 20:41:08 +02:00
const yotsubaBodyStyle = {
2023-04-29 12:47:30 +02:00
background: "#ffe url(assets/fade.png) top repeat-x",
2023-03-17 17:49:30 +01:00
color: "maroon",
2023-08-08 20:41:08 +02:00
fontFamily: "Arial, Helvetica, sans-serif"
};
const originalBodyStyles = {
background: document.body.style.background,
color: document.body.style.color,
fontFamily: document.body.style.fontFamily
};
for (const [key, value] of Object.entries(yotsubaBodyStyle)) {
document.body.style[key] = value;
}
2023-05-27 12:55:16 +02:00
return () => {
2023-08-08 20:41:08 +02:00
for (const [key, value] of Object.entries(originalBodyStyles)) {
document.body.style[key] = value;
}
2023-05-27 12:55:16 +02:00
};
2023-08-08 20:41:08 +02:00
}, []);
2023-03-06 18:38:33 +01:00
return (
2023-04-21 10:47:39 +02:00
<>
<Helmet>
<title>plebchan - 404 Not Found</title>
</Helmet>
<Container>
<Header>
<Logo>
<Link to="/">
2023-04-29 12:47:30 +02:00
<img alt="plebchan" src="assets/logo/logo-transparent.png" />
2023-04-21 10:47:39 +02:00
</Link>
</Logo>
</Header>
<Page>
<Boards>
<BoardsTitle>
<h2 style={{textAlign: 'center'}}>404 Not Found</h2>
</BoardsTitle>
2023-04-29 12:47:30 +02:00
<img src="assets/plebchan-husbando.jpg" alt="plebchan" style={{
2023-04-21 10:47:39 +02:00
display: "block",
margin: "auto",
padding: "15px",
width: "50%"
}}></img>
</Boards>
</Page>
2023-04-22 13:11:42 +02:00
<div style={{
textAlign: "center",
fontSize: "11px",
2023-04-23 11:57:13 +02:00
marginTop: "2em",
2023-04-22 13:11:42 +02:00
}}>
2023-04-24 20:00:11 +00:00
plebchan v{version}. GPL-2.0
2023-04-22 13:11:42 +02:00
</div>
2023-04-21 10:47:39 +02:00
</Container>
</>
2023-03-06 18:38:33 +01:00
);
}
export default NotFound;