mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-25 12:35:18 -05:00
Add Mantis
This commit is contained in:
28
packages/frontend/components/layout.tsx
Normal file
28
packages/frontend/components/layout.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
2965
packages/frontend/package-lock.json
generated
2965
packages/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
8
packages/frontend/pages/_document.tsx
Normal file
8
packages/frontend/pages/_document.tsx
Normal 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;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
@@ -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: [],
|
||||
};
|
||||
Reference in New Issue
Block a user