Skip to content

Commit a02d297

Browse files
committed
Initial commit
0 parents  commit a02d297

26 files changed

+5185
-0
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel
35+
36+
# netlify
37+
.netlify

components/ArrowIcon.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export default function ArrowIcon({ className, color = "text-primary" }) {
2+
return (
3+
<svg
4+
xmlns="http://www.w3.org/2000/svg"
5+
width="24"
6+
height="24"
7+
fill="none"
8+
viewBox="0 0 24 24"
9+
className={className}
10+
>
11+
<path
12+
className={`stroke-current ${color}`}
13+
strokeLinecap="round"
14+
strokeLinejoin="round"
15+
strokeWidth="2"
16+
d="M5 12h14M12 19l7-7-7-7"
17+
></path>
18+
</svg>
19+
);
20+
}

components/CustomLink.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Link from "next/link";
2+
3+
export default function CustomLink({ as, href, ...otherProps }) {
4+
return (
5+
<>
6+
<Link as={as} href={href}>
7+
<a {...otherProps} />
8+
</Link>
9+
</>
10+
);
11+
}

components/Footer.js

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
const sunIcon = (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="25"
5+
height="24"
6+
fill="none"
7+
viewBox="0 0 25 24"
8+
className="dark:opacity-50"
9+
>
10+
<g
11+
stroke="#fff"
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
strokeWidth="2"
15+
clipPath="url(#clip0_192_823)"
16+
>
17+
<path d="M12.5 17a5 5 0 100-10 5 5 0 000 10zM12.5 1v2M12.5 21v2M4.72 4.22l1.42 1.42M18.86 18.36l1.42 1.42M1.5 12h2M21.5 12h2M4.72 19.78l1.42-1.42M18.86 5.64l1.42-1.42"></path>
18+
</g>
19+
<defs>
20+
<clipPath id="clip0_192_823">
21+
<path
22+
className="fill-current text-white"
23+
d="M0 0H24V24H0z"
24+
transform="translate(.5)"
25+
></path>
26+
</clipPath>
27+
</defs>
28+
</svg>
29+
);
30+
31+
const moonIcon = (
32+
<svg
33+
xmlns="http://www.w3.org/2000/svg"
34+
width="21"
35+
height="20"
36+
fill="none"
37+
viewBox="0 0 21 20"
38+
>
39+
<path
40+
stroke="#fff"
41+
strokeLinecap="round"
42+
strokeLinejoin="round"
43+
strokeWidth="2"
44+
className="stroke-current text-gray-400 dark:text-white"
45+
d="M19.5 10.79A9 9 0 119.71 1a7 7 0 009.79 9.79v0z"
46+
></path>
47+
</svg>
48+
);
49+
50+
const ThemeSwitcher = () => {
51+
return (
52+
<div className="flex mt-6 bg-white justify-center dark:bg-gray-900 rounded-3xl p-1">
53+
<button
54+
type="button"
55+
aria-label="Use Dark Mode"
56+
onClick={() => {
57+
window.__setPreferredTheme("dark");
58+
}}
59+
className="flex items-center h-full pr-2 dark:bg-primary rounded-3xl flex justify-center align-center p-2 w-24 h-10 transition"
60+
>
61+
{moonIcon}
62+
</button>
63+
64+
<button
65+
type="button"
66+
aria-label="Use Light Mode"
67+
onClick={() => {
68+
window.__setPreferredTheme("light");
69+
}}
70+
className="flex items-center h-full pr-2 bg-primary dark:bg-transparent rounded-3xl flex justify-center align-center p-2 w-24 h-10 transition"
71+
>
72+
{sunIcon}
73+
</button>
74+
</div>
75+
);
76+
};
77+
78+
export default function Footer({ copyrightText }) {
79+
return (
80+
<footer className="py-16 flex flex-col items-center">
81+
<p className="dark:text-white uppercase mb-3 font-bold opacity-60">
82+
{copyrightText}
83+
</p>
84+
<ThemeSwitcher />
85+
</footer>
86+
);
87+
}

components/Header.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Link from "next/link";
2+
3+
export default function Header({ name }) {
4+
return (
5+
<header className="pt-20 pb-12">
6+
<div className="w-12 h-12 rounded-full block mx-auto mb-4 bg-gradient-conic from-gradient-3 to-gradient-4" />
7+
<p className="text-2xl dark:text-white">
8+
<Link href="/">
9+
<a id="blog-name">{name}</a>
10+
</Link>
11+
</p>
12+
</header>
13+
);
14+
}

components/Layout.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import classNames from "classnames";
2+
import styles from "./Layout.module.css";
3+
4+
export function GradientBackground({ variant, className }) {
5+
const classes = classNames(
6+
{
7+
[styles.colorBackground]: variant === "large",
8+
[styles.colorBackgroundBottom]: variant === "small",
9+
},
10+
className
11+
);
12+
13+
return <div className={classes} />;
14+
}
15+
16+
export default function Layout({ children }) {
17+
return (
18+
<div className="relative pb-24">
19+
<div className="flex flex-col items-center max-w-2xl w-full mx-auto">
20+
{children}
21+
</div>
22+
</div>
23+
);
24+
}

components/Layout.module.css

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.colorBackground {
2+
left: 50%;
3+
transform: translateX(-50%);
4+
background: radial-gradient(
5+
at 71% 77%,
6+
var(--color-gradient-1) 0,
7+
transparent 21%
8+
),
9+
radial-gradient(at 36% 47%, var(--color-gradient-3) 0, transparent 50%),
10+
radial-gradient(at 54% 29%, var(--color-gradient-3) 0, transparent 28%),
11+
radial-gradient(at 45% 51%, var(--color-gradient-1) 0, transparent 53%),
12+
radial-gradient(at 73% 44%, var(--color-gradient-2) 0, transparent 54%),
13+
radial-gradient(at 24% 7%, var(--color-gradient-2) 0, transparent 40%),
14+
radial-gradient(at 76% 46%, var(--color-gradient-1) 0, transparent 50%);
15+
/* mix-blend-mode: normal; */
16+
max-height: 800px;
17+
height: 80vh;
18+
max-width: 1400px;
19+
width: 70vw;
20+
width: 100%;
21+
filter: blur(44px);
22+
z-index: -1;
23+
}
24+
25+
.colorBackgroundBottom {
26+
left: 50%;
27+
transform: translateX(-50%) rotate(190deg);
28+
background: radial-gradient(
29+
at 83% 25%,
30+
var(--color-gradient-1) 0,
31+
transparent 21%
32+
),
33+
radial-gradient(at 36% 47%, var(--color-gradient-3) 0, transparent 50%),
34+
radial-gradient(at 79% 45%, var(--color-gradient-3) 0, transparent 28%),
35+
radial-gradient(at 66% 38%, var(--color-gradient-1) 0, transparent 53%),
36+
radial-gradient(at 89% 13%, var(--color-gradient-2) 0, transparent 54%),
37+
radial-gradient(at 24% 7%, var(--color-gradient-2) 0, transparent 40%),
38+
radial-gradient(at 76% 46%, var(--color-gradient-1) 0, transparent 50%);
39+
/* mix-blend-mode: normal; */
40+
height: 600px;
41+
max-width: 900px;
42+
width: 55vw;
43+
width: 100%;
44+
filter: blur(44px);
45+
z-index: -1;
46+
}

netlify.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build]
2+
publish = "out"
3+
4+
[[plugins]]
5+
package = "@netlify/plugin-nextjs"
6+
7+
[template.environment]
8+
BLOG_NAME = "set the name of the blog here"
9+
BLOG_TITLE = "set the blog title here"
10+
BLOG_FOOTER_TEXT = "set the blog footer text here"

package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"dev": "next",
5+
"dev:watch": "next-remote-watch ./posts",
6+
"build": "next build",
7+
"start": "next start",
8+
"export": "next build && next export"
9+
},
10+
"dependencies": {
11+
"@octokit/auth-oauth-app": "^4.3.0",
12+
"@octokit/auth-oauth-user": "^1.3.0",
13+
"@octokit/auth-token": "^2.5.0",
14+
"@octokit/core": "^3.5.1",
15+
"@octokit/plugin-rest-endpoint-methods": "^5.13.0",
16+
"@tailwindcss/typography": "^0.4.1",
17+
"classnames": "^2.3.1",
18+
"github-oauth-popup": "^1.2.0",
19+
"gray-matter": "^4.0.2",
20+
"next": "latest",
21+
"next-mdx-remote": "^3.0.1",
22+
"next-remote-watch": "1.0.0",
23+
"octokit": "^1.7.1",
24+
"react": "^17.0.2",
25+
"react-dom": "^17.0.2"
26+
},
27+
"devDependencies": {
28+
"autoprefixer": "^10.4.0",
29+
"postcss": "^8.3.11",
30+
"tailwindcss": "^2.2.19"
31+
}
32+
}

pages/_app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import "../styles/globals.css";
2+
3+
function MyApp({ Component, pageProps }) {
4+
return (
5+
<>
6+
<span className="theme-bejamas" />
7+
<Component {...pageProps} />
8+
</>
9+
);
10+
}
11+
12+
export default MyApp;

0 commit comments

Comments
 (0)