Skip to content
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
14 changes: 12 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.tsx?$/,
use: ["@svgr/webpack"],
});

return config;
},
Comment on lines +5 to +13
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling we'll be using a lot of SVGs in this prototype. Instead of loading them async as images on the page, I figured it's more performant to load them inline so that they'll immediately display on the page.

};

module.exports = nextConfig;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"pre-commit": "pretty-quick --staged && lint-staged"
"pre-commit": "pretty-quick --staged && lint-staged",
"prepare": "husky install"
},
"dependencies": {
"@next/font": "13.1.1",
Expand All @@ -19,6 +20,7 @@
"devDependencies": {
"@commitlint/cli": "^17.4.1",
"@commitlint/config-conventional": "^17.4.0",
"@svgr/webpack": "^6.5.1",
"@types/node": "18.11.18",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
Expand Down
17 changes: 17 additions & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { PropsWithChildren } from "react";
import GoNoodleLogoLightSVG from "@src/svgs/gonoodle-logo-light.svg";

export interface LayoutProps {}

export default function Layout({ children }: PropsWithChildren<LayoutProps>) {
return (
<>
<header className="absolute top-0 p-4 sm:p-6">
<span className="sr-only">GoNoodle</span>
<GoNoodleLogoLightSVG className="w-32" aria-hidden />
</header>

<main>{children}</main>
</>
);
}
10 changes: 8 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import "@src/styles/globals.css";
import type { AppProps } from "next/app";
import Layout from "@src/components/Layout";

import "@src/styles/globals.css";

export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
return (
<Layout>
<Component {...pageProps} />
</Layout>
);
}
8 changes: 5 additions & 3 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Html, Head, Main, NextScript } from 'next/document'
import {
Html, Head, Main, NextScript,
} from "next/document";

export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<body className="bg-black">
<Main />
<NextScript />
</body>
</Html>
)
);
}
13 changes: 0 additions & 13 deletions src/pages/api/hello.ts

This file was deleted.

25 changes: 20 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
import Head from "next/head";
import SuperNoodleWorldLandscapeSVG from "@src/svgs/supernoodle-world-landscape.svg";
import SuperNoodleWorldCloudPairSVG from "@src/svgs/supernoodle-world-cloud-pair.svg";
import SuperNoodleWorldCloudSingleSVG from "@src/svgs/supernoodle-world-cloud-single.svg";

export default function Home() {
return (
<>
<div className="relative overflow-x-hidden min-h-screen bg-gradient-to-b from-purple/5 to-purple/30 bg-no-repeat">
Comment thread
gvjacob marked this conversation as resolved.
<Head>
<title>SuperNoodle</title>
<meta name="description" content="Generated by create next app" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<h1>SuperNoodle</h1>
</main>
</>

<SuperNoodleWorldLandscapeSVG
className="w-full absolute bottom-0"
aria-hidden
/>

<SuperNoodleWorldCloudPairSVG
className="w-72 absolute top-10 right-0 translate-x-1/4"
aria-hidden
/>

<SuperNoodleWorldCloudSingleSVG
className="w-40 absolute top-1/4 -left-12"
aria-hidden
/>
</div>
);
}
2 changes: 1 addition & 1 deletion src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;
15 changes: 15 additions & 0 deletions src/svgs/gonoodle-logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/svgs/supernoodle-world-cloud-pair.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/svgs/supernoodle-world-cloud-single.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading