Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cf747f4

Browse files
First commit with questions list, question body and solution body.
1 parent 26d67a8 commit cf747f4

27 files changed

+2641
-493
lines changed

‎.eslintrc.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": ["next/babel", "next/core-web-vitals"]
33
}

‎package-lock.json‎

Lines changed: 1772 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@material-tailwind/react": "^1.2.5",
1213
"@next/font": "13.1.2",
14+
"@supabase/supabase-js": "^2.4.0",
15+
"@uiw/codemirror-extensions-langs": "^4.19.6",
16+
"@uiw/codemirror-theme-github": "^4.19.6",
17+
"@uiw/codemirror-theme-material": "^4.19.6",
18+
"@uiw/react-codemirror": "^4.19.6",
1319
"eslint": "8.31.0",
1420
"eslint-config-next": "13.1.2",
1521
"next": "13.1.2",
22+
"next-themes": "^0.2.1",
1623
"react": "18.2.0",
17-
"react-dom": "18.2.0"
24+
"react-dom": "18.2.0",
25+
"react-html-parser": "^2.0.2",
26+
"react-icons": "^4.7.1",
27+
"tailwind-scrollbar": "^2.1.0"
28+
},
29+
"devDependencies": {
30+
"autoprefixer": "^10.4.13",
31+
"postcss": "^8.4.21",
32+
"tailwindcss": "^3.2.4"
1833
}
1934
}

‎postcss.config.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

‎public/Burtons.otf‎

41.6 KB
Binary file not shown.

‎src/app/DarkModeButton.jsx‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"use client";
2+
import { useTheme } from "next-themes";
3+
import { useState, useEffect } from "react";
4+
import { BsFillMoonStarsFill } from "react-icons/bs";
5+
6+
export const DarkModeButton = () => {
7+
const [mounted, setMounted] = useState(false);
8+
const { systemTheme, theme, setTheme } = useTheme();
9+
useEffect(() => {
10+
setMounted(true);
11+
}, []);
12+
if (!mounted) {
13+
return null;
14+
}
15+
16+
const currentTheme = theme === "system" ? systemTheme : theme;
17+
18+
return (
19+
<div>
20+
{currentTheme === "dark" ? (
21+
<BsFillMoonStarsFill
22+
className="cursor-pointer text-xl"
23+
onClick={() => setTheme("light")}
24+
/>
25+
) : (
26+
<BsFillMoonStarsFill
27+
className="cursor-pointer text-xl"
28+
onClick={() => setTheme("dark")}
29+
/>
30+
)}
31+
</div>
32+
);
33+
};

‎src/app/Providers.jsx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"use client";
2+
import { ThemeProvider } from "next-themes";
3+
export const Providers = ({ children }) => {
4+
return (
5+
<ThemeProvider enableSystem={true} attribute="class">
6+
{children}
7+
</ThemeProvider>
8+
);
9+
};

‎src/app/globals.css‎

Lines changed: 57 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,73 @@
1-
:root {
2-
--max-width: 1100px;
3-
--border-radius: 12px;
4-
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
5-
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
6-
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
74

8-
--foreground-rgb: 0, 0, 0;
9-
--background-start-rgb: 214, 219, 220;
10-
--background-end-rgb: 255, 255, 255;
11-
12-
--primary-glow: conic-gradient(
13-
from 180deg at 50% 50%,
14-
#16abff33 0deg,
15-
#0885ff33 55deg,
16-
#54d6ff33 120deg,
17-
#0071ff33 160deg,
18-
transparent 360deg
19-
);
20-
--secondary-glow: radial-gradient(
21-
rgba(255, 255, 255, 1),
22-
rgba(255, 255, 255, 0)
23-
);
24-
25-
--tile-start-rgb: 239, 245, 249;
26-
--tile-end-rgb: 228, 232, 233;
27-
--tile-border: conic-gradient(
28-
#00000080,
29-
#00000040,
30-
#00000030,
31-
#00000020,
32-
#00000010,
33-
#00000010,
34-
#00000080
35-
);
36-
37-
--callout-rgb: 238, 240, 241;
38-
--callout-border-rgb: 172, 175, 176;
39-
--card-rgb: 180, 185, 188;
40-
--card-border-rgb: 131, 134, 135;
5+
html,
6+
body {
7+
padding: 0;
8+
margin: 0;
9+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
10+
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
4111
}
4212

43-
@media (prefers-color-scheme: dark) {
44-
:root {
45-
--foreground-rgb: 255, 255, 255;
46-
--background-start-rgb: 0, 0, 0;
47-
--background-end-rgb: 0, 0, 0;
48-
49-
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
50-
--secondary-glow: linear-gradient(
51-
to bottom right,
52-
rgba(1, 65, 255, 0),
53-
rgba(1, 65, 255, 0),
54-
rgba(1, 65, 255, 0.3)
55-
);
56-
57-
--tile-start-rgb: 2, 13, 46;
58-
--tile-end-rgb: 2, 5, 19;
59-
--tile-border: conic-gradient(
60-
#ffffff80,
61-
#ffffff40,
62-
#ffffff30,
63-
#ffffff20,
64-
#ffffff10,
65-
#ffffff10,
66-
#ffffff80
67-
);
68-
69-
--callout-rgb: 20, 20, 20;
70-
--callout-border-rgb: 108, 108, 108;
71-
--card-rgb: 100, 100, 100;
72-
--card-border-rgb: 200, 200, 200;
73-
}
13+
a {
14+
color: inherit;
15+
text-decoration: none;
7416
}
7517

7618
* {
7719
box-sizing: border-box;
78-
padding: 0;
79-
margin: 0;
8020
}
8121

82-
html,
83-
body {
84-
max-width: 100vw;
85-
overflow-x: hidden;
22+
@font-face {
23+
font-family: "burtons";
24+
src: url("../../public/Burtons.otf");
8625
}
8726

88-
body {
89-
color: rgb(var(--foreground-rgb));
90-
background: linear-gradient(
91-
to bottom,
92-
transparent,
93-
rgb(var(--background-end-rgb))
94-
)
95-
rgb(var(--background-start-rgb));
27+
p {
28+
margin-bottom: 1rem;
9629
}
9730

98-
a {
99-
color: inherit;
100-
text-decoration: none;
31+
.dark code {
32+
background-color: hsla(0, 0%, 100%, 0.07);
33+
border-color: rgba(247, 250, 255, 0.12);
34+
color: rgba(239, 241, 246, 0.75);
35+
}
36+
code {
37+
background-color: rgba(0, 10, 32, 0.03);
38+
border-color: rgba(0, 0, 0, 0.05);
39+
border-radius: 5px;
40+
border-width: 1px;
41+
color: rgba(38, 38, 38, 0.75);
42+
font-family: sans-serif;
43+
font-size: 0.75rem;
44+
line-height: 1rem;
45+
padding: 0.125rem;
46+
white-space: pre-wrap;
47+
}
48+
49+
.dark pre {
50+
background-color: hsla(0, 0%, 100%, 0.07);
51+
color: rgba(239, 241, 246, 0.75);
52+
}
53+
54+
pre {
55+
background-color: rgba(0, 10, 32, 0.03);
56+
border-radius: 0.5rem;
57+
color: rgba(38, 38, 38, 0.75);
58+
font-family: sans-serif;
59+
font-size: 0.875rem;
60+
line-height: 1.25rem;
61+
margin-bottom: 1rem;
62+
margin-top: 1rem;
63+
padding: 1rem;
64+
white-space: pre-wrap;
10165
}
10266

103-
@media (prefers-color-scheme: dark) {
104-
html {
105-
color-scheme: dark;
106-
}
67+
ul {
68+
list-style-type: disc;
69+
margin-bottom: 1rem;
70+
margin-left: 1rem;
71+
margin-right: 1rem;
72+
padding: 1rem;
10773
}

‎src/app/head.jsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export default function Head() {
22
return (
33
<>
4-
<title>Create Next App</title>
4+
<title>ScuffedCode</title>
55
<meta content="width=device-width, initial-scale=1" name="viewport" />
66
<meta name="description" content="Generated by create next app" />
77
<link rel="icon" href="/favicon.ico" />
88
</>
9-
)
9+
);
1010
}

‎src/app/layout.jsx‎

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,51 @@
1-
import './globals.css'
1+
import "./globals.css";
2+
import Link from "next/link";
3+
import { AiFillLinkedin, AiFillGithub } from "react-icons/ai";
4+
import { SiGooglescholar } from "react-icons/si";
5+
import { Providers } from "./Providers";
26

7+
import { DarkModeButton } from "./DarkModeButton";
38
export default function RootLayout({ children }) {
49
return (
510
<html lang="en">
6-
{/*
7-
<head /> will contain the components returned by the nearest parent
8-
head.jsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
9-
*/}
10-
<head />
11-
<body>{children}</body>
11+
<body>
12+
<Providers>
13+
<main className="dark:bg-primary-800 min-h-screen px-10 flex-col overflow-y-scroll">
14+
<section title="Navigation Bar" className="min-w-full mx-auto">
15+
<nav className="flex pt-10 mb-12">
16+
<div className="flex-grow">
17+
<Link href="/">
18+
<h1 className="text-xl font-burtons text-left">
19+
scuffedcode
20+
</h1>
21+
</Link>
22+
</div>
23+
<ul className="flex space-x-5 list-none m-0 p-0 text-right">
24+
<li>
25+
<DarkModeButton />
26+
</li>
27+
<li>
28+
<Link href="https://www.linkedin.com/in/nikhil--ravi/">
29+
<AiFillLinkedin className="cursor-pointer text-xl" />
30+
</Link>
31+
</li>
32+
<li>
33+
<Link href="https://scholar.google.com/citations?user=Ka5q7nIAAAAJ&hl=en">
34+
<SiGooglescholar className="cursor-pointer text-xl" />
35+
</Link>
36+
</li>
37+
<li>
38+
<Link href="https://github.com/nikhil-ravi">
39+
<AiFillGithub className="cursor-pointer text-xl" />
40+
</Link>
41+
</li>
42+
</ul>
43+
</nav>
44+
</section>
45+
<section className="flex flex-grow">{children}</section>
46+
</main>
47+
</Providers>
48+
</body>
1249
</html>
13-
)
50+
);
1451
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /