Add Mantis

This commit is contained in:
Kalle (Sendou)
2021-10-25 12:08:34 +03:00
parent 7c68d994e6
commit 7697a30358
8 changed files with 1272 additions and 1821 deletions

View File

@@ -0,0 +1,28 @@
import styled from "@emotion/styled";
import { ReactNode } from "react";
const _Button = styled.button`
padding: 32px;
background-color: hotpink;
font-size: 24px;
border-radius: 4px;
color: black;
font-weight: bold;
&:hover {
color: white;
}
`;
const Container = styled.div`
background-color: var(--bg);
`;
export function Layout({ children }: { children: ReactNode }) {
return (
<Container>
<header className="font-bold p-4">sendou.ink</header>
<_Button>hello</_Button>
<main>{children}</main>
</Container>
);
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,15 +7,16 @@
"start": "next start"
},
"dependencies": {
"@emotion/styled": "^11.3.0",
"@mantine/core": "^3.0.5",
"@mantine/hooks": "^3.0.5",
"@mantine/next": "^3.0.5",
"next": "^11.1.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"swr": "^1.0.1"
},
"devDependencies": {
"@types/react": "^17.0.32",
"autoprefixer": "^10.3.7",
"postcss": "^8.3.11",
"tailwindcss": "^2.2.17"
"@types/react": "^17.0.32"
}
}

View File

@@ -3,7 +3,18 @@
--colors-text: rgba(255, 255, 255, 0.85);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
background-color: var(--colors-bg);
color: var(--colors-text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
line-height: 1.55;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: antialiased;
}

View File

@@ -1,21 +1,43 @@
import type { AppProps } from "next/app";
import { SWRConfig } from "swr";
import "tailwindcss/tailwind.css";
import "./_app.css";
function MyApp({ Component, pageProps }: AppProps) {
import { AppProps } from "next/app";
import Head from "next/head";
import { MantineProvider, NormalizeCSS } from "@mantine/core";
import { SWRConfig } from "swr";
import { Layout } from "../components/layout";
export default function App(props: AppProps) {
const { Component, pageProps } = props;
return (
<SWRConfig
value={{
fetcher: (resource, init) =>
fetch(process.env.NEXT_PUBLIC_BACKEND_URL + resource, init).then(
(res) => res.json()
),
}}
>
<Component {...pageProps} />
</SWRConfig>
<>
<Head>
<title>Page title</title>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width"
/>
</Head>
<MantineProvider
theme={{
colorScheme: "dark",
}}
>
<NormalizeCSS />
<SWRConfig
value={{
fetcher: (resource, init) =>
fetch(process.env.NEXT_PUBLIC_BACKEND_URL + resource, init).then(
(res) => res.json()
),
}}
>
<Layout>
<Component {...pageProps} />
</Layout>
</SWRConfig>
</MantineProvider>
</>
);
}
export default MyApp;

View File

@@ -0,0 +1,8 @@
import Document from "next/document";
import { createGetInitialProps } from "@mantine/next";
const getInitialProps = createGetInitialProps();
export default class _Document extends Document {
static getInitialProps = getInitialProps;
}

View File

@@ -1,6 +0,0 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View File

@@ -1,12 +0,0 @@
module.exports = {
mode: "jit",
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
darkMode: false,
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
};