├── public ├── og.png ├── X-Medium.woff2 ├── X-Regular.woff2 └── favicon.svg ├── vercel.json ├── .gitignore ├── package.json ├── app ├── layout.js ├── page.js ├── icons.js └── globals.scss └── README.md /public/og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raunofreiberg/interfaces/HEAD/public/og.png -------------------------------------------------------------------------------- /public/X-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raunofreiberg/interfaces/HEAD/public/X-Medium.woff2 -------------------------------------------------------------------------------- /public/X-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raunofreiberg/interfaces/HEAD/public/X-Regular.woff2 -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": [ 3 | { 4 | "source": "/X-Regular.woff2", 5 | "headers": [ 6 | { 7 | "key": "Cache-Control", 8 | "value": "public, max-age=31536000, immutable" 9 | } 10 | ] 11 | }, 12 | { 13 | "source": "/X-Medium.woff2", 14 | "headers": [ 15 | { 16 | "key": "Cache-Control", 17 | "value": "public, max-age=31536000, immutable" 18 | } 19 | ] 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "interfaces", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "gray-matter": "^4.0.3", 13 | "next": "13.4.3", 14 | "next-mdx-remote": "^4.4.1", 15 | "react": "18.2.0", 16 | "react-dom": "18.2.0", 17 | "rehype-autolink-headings": "^6.1.1", 18 | "rehype-slug": "^5.1.0", 19 | "remark-gfm": "^3.0.1", 20 | "sass": "^1.62.1" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/layout.js: -------------------------------------------------------------------------------- 1 | import "./globals.scss"; 2 | 3 | const url = "https://interfaces.rauno.me"; 4 | const title = "Web Interface Guidelines"; 5 | const description = 6 | "A non-exhaustive list of details that make a good web interface."; 7 | const ogUrl = `${url}/og.png`; 8 | 9 | export const metadata = { 10 | title, 11 | description, 12 | openGraph: { 13 | title, 14 | description, 15 | url, 16 | images: [{ url: ogUrl }], 17 | }, 18 | twitter: { 19 | card: "summary_large_image", 20 | title, 21 | description, 22 | images: [ogUrl], 23 | }, 24 | }; 25 | 26 | export default function RootLayout({ children }) { 27 | return ( 28 | 29 |
30 | 31 | 38 | 45 | 46 | {children} 47 | 48 | ); 49 | } 50 | -------------------------------------------------------------------------------- /app/page.js: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import fs from "fs/promises"; 3 | import { MDXRemote } from "next-mdx-remote/rsc"; 4 | import remarkGfm from "remark-gfm"; 5 | import rehypeSlug from "rehype-slug"; 6 | import { cache } from "react"; 7 | import matter from "gray-matter"; 8 | import rehypeAutolinkHeadings from "rehype-autolink-headings"; 9 | import { Icons, GitHub } from "./icons"; 10 | 11 | export default async function Index() { 12 | const markdown = await getMarkdown(); 13 | return ( 14 |