This commit is contained in:
Matz Hilven 2024-05-28 23:11:13 +02:00
commit 54d7052584
Signed by: MatzHilven
GPG key ID: ACEB669C2CB79EB7
21 changed files with 4004 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

48
.gitignore vendored Normal file
View file

@ -0,0 +1,48 @@
# Devenv
.devenv*
devenv.local.nix
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history
.next

8
.prettierrc.yaml Normal file
View file

@ -0,0 +1,8 @@
tabWidth: 2
semi: false
arrowParens: avoid
singleQuote: true
endOfLine: lf
trailingComma: es5
plugins:
- prettier-plugin-tailwindcss

3
README.md Normal file
View file

@ -0,0 +1,3 @@
```bash
pnpm run dev
```

17
components.json Normal file
View file

@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "slate",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

31
flake.nix Normal file
View file

@ -0,0 +1,31 @@
{
description = "TS environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
# Helper to provide system-specific attributes
forAllSupportedSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
supportedSystems = [
"x86_64-linux"
];
in
{
devShells = forAllSupportedSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
typescript
nodejs_21
nodePackages_latest.pnpm
];
};
});
};
}

5
next-env.d.ts vendored Normal file
View file

@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

14
next.config.mjs Normal file
View file

@ -0,0 +1,14 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return []
},
future: { webpack5: true },
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
config.resolve.alias.canvas = false
config.resolve.alias.encoding = false
return config
},
}
export default nextConfig

41
package.json Normal file
View file

@ -0,0 +1,41 @@
{
"name": "test",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@mantine/core": "^7.9.2",
"@mantine/hooks": "^7.9.2",
"@radix-ui/react-switch": "^1.0.3",
"@tabler/icons-react": "^3.5.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.364.0",
"next": "14.1.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sharp": "^0.33.4",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-next": "14.1.4",
"postcss": "^8.4.38",
"postcss-preset-mantine": "^1.15.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5"
}
}

3641
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

16
postcss.config.js Normal file
View file

@ -0,0 +1,16 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
'postcss-preset-mantine': {},
'postcss-simple-vars': {
variables: {
'mantine-breakpoint-xs': '36em',
'mantine-breakpoint-sm': '48em',
'mantine-breakpoint-md': '62em',
'mantine-breakpoint-lg': '75em',
'mantine-breakpoint-xl': '88em',
},
},
},
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

3
src/app/globals.css Normal file
View file

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

33
src/app/layout.tsx Normal file
View file

@ -0,0 +1,33 @@
import './globals.css'
import '@mantine/core/styles.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import React from 'react'
import { ColorSchemeScript, MantineProvider } from '@mantine/core'
const inter = Inter({ subsets: ['latin'] })
export const metadata: Metadata = {
title: 'Matz Hilven',
description: 'todo',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<head>
<ColorSchemeScript />
</head>
<body className={inter.className}>
<div className="bg-bg">
<MantineProvider>{children}</MantineProvider>
</div>
</body>
</html>
)
}

13
src/app/not-found.tsx Normal file
View file

@ -0,0 +1,13 @@
import Link from 'next/link'
export default function NotFound() {
return (
<div className="m-auto flex flex-col items-center">
<h1 className="text-4xl">Not Found</h1>
<p>Could not find requested resource</p>
<Link href="/" className="underline">
Return Home
</Link>
</div>
)
}

9
src/app/page.tsx Normal file
View file

@ -0,0 +1,9 @@
import React from 'react'
export default function Page() {
return (
<div className="flex min-h-screen flex-col items-center p-4 md:p-8">
Matz Hilven
</div>
)
}

View file

@ -0,0 +1,7 @@
type Props = {
project: Project
}
export const ProjectCard = ({ project }: Props) => {
return <div>{project.name}</div>
}

18
src/typings/project.ts Normal file
View file

@ -0,0 +1,18 @@
type Social = 'Github' | 'YouTube'
type Language = 'Java' | 'Rust' | 'Go' | 'TypeScript'
type MinecraftTags = '1.8' | '1.17' | 'Paper' | 'Bungee'
type WebTags = 'Frontend' | 'Backend' | 'Fullstack'
type Tag = MinecraftTags | WebTags | 'Archived'
type Category = 'Minecraft' | 'Web' | 'Discord' | 'Misc' | 'Unity'
type Project = {
name: string
description: string
category: Category
imageUrl: string
socials: Record<Social, string>
languages: Language[]
tags: Tag[]
}

43
tailwind.config.ts Normal file
View file

@ -0,0 +1,43 @@
import type { Config } from 'tailwindcss'
const config = {
darkMode: ['class'],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
prefix: '',
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
colors: {
bg: '#F9FAFB',
},
},
},
plugins: [require('tailwindcss-animate')],
} satisfies Config
export default config

26
tsconfig.json Normal file
View file

@ -0,0 +1,26 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}