mirror of https://github.com/usememos/memos
feat: not found page (#1081)
* feat: style for not found page (#1078) * chore: translation for not found page (#1078) * feat: add not found page (#1078) * chore: router for not found page (#1078) * fix: typopull/1003/head^2
parent
5455cb3164
commit
28405f6d24
@ -0,0 +1,18 @@
|
||||
.page-wrapper.not-found {
|
||||
@apply w-full h-full overflow-y-auto overflow-x-hidden bg-zinc-100 dark:bg-zinc-800;
|
||||
|
||||
> .page-container {
|
||||
@apply relative w-full min-h-full mx-auto flex flex-col justify-center items-center;
|
||||
|
||||
> .title-text {
|
||||
@apply text-xl sm:text-4xl text-gray-700 dark:text-gray-200;
|
||||
}
|
||||
|
||||
> .action-button-container {
|
||||
> .link-btn {
|
||||
@apply block text-gray-600 dark:text-gray-200 dark:border-gray-600 font-mono text-base py-1 border px-3 leading-8 rounded-xl hover:opacity-80 my-3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
import "../less/not-found.less";
|
||||
|
||||
const NotFound = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="page-wrapper not-found">
|
||||
<div className="page-container">
|
||||
<p className="title-text">{t("message.page-not-found")}</p>
|
||||
<div className="action-button-container">
|
||||
<Link to="/" className="link-btn">
|
||||
<span>🏠</span> {t("common.back-to-home")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFound;
|
Loading…
Reference in New Issue