Skip to content

Commit

Permalink
personal-website
Browse files Browse the repository at this point in the history
  • Loading branch information
evelinawahlstrom committed Jan 16, 2025
1 parent c3f6791 commit 49a174a
Show file tree
Hide file tree
Showing 13 changed files with 14,913 additions and 3,909 deletions.
20 changes: 1 addition & 19 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--background: #ffffff;
--foreground: #171717;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}
@tailwind utilities;
116 changes: 20 additions & 96 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,101 +1,25 @@
import Image from "next/image";
import { getProjects } from "@/sanity/sanity-utils";
import Image from 'next/image';
import Link from "next/link";

export default function Home() {
return (
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={180}
height={38}
priority
/>
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
app/page.tsx
</code>
.
</li>
<li>Save and see your changes instantly.</li>
</ol>
export default async function Home() {
const projects = await getProjects();

<div className="flex gap-4 items-center flex-col sm:flex-row">
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={20}
height={20}
/>
Deploy now
</a>
<a
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Read our docs
</a>
</div>
</main>
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/file.svg"
alt="File icon"
width={16}
height={16}
/>
Learn
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
Examples
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
Go to nextjs.org →
</a>
</footer>
return (
<div className="max-w-5xl mx-auto">
<h1 className="text-7xl font-extrabold pt-20">Hej. I&apos;m <span className="bg-gradient-to-r from-purple-500 to-blue-300 bg-clip-text text-transparent">Evelina</span>!</h1>
<p className="mt-3 text-xl text-gray-600">Welcome to my little corner of the internet.</p>
<h2 className="mt-20 font-bold text-gray-700 text-3xl">My projects / talks</h2>
<div className="mt-5 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{projects.map((project) => (
<Link href={`/projects/${project.slug}`} key={project._id} className="border-2 border-gray-500 rounded-lg p-1 hover:scale-105 transition">
{project.image && (
<Image src={project.image} alt={project.alt} width={750} height={300} className="object-cover border border-gray-500" />
)}
<div className="mt-2 font-extrabold bg-gradient-to-r from-purple-500 to-blue-300 bg-clip-text text-transparent">{project.name}</div>
</Link>
))}
</div>
</div>
);
}
8 changes: 8 additions & 0 deletions app/studio/[[...index]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use client";

import config from "@/sanity.config";
import { NextStudio } from "next-sanity/studio";

export default function StudioPage() {
return <NextStudio config={config} />
}
12 changes: 12 additions & 0 deletions app/types/project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { PortableTextBlock } from "next-sanity";

export type Project = {
_id: string;
_createdAt: Date;
name: string;
slug: string;
image: string;
url: string;
alt: string;
content: PortableTextBlock[];
}
10 changes: 10 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'cdn.sanity.io',
},
],
},
}
Loading

0 comments on commit 49a174a

Please sign in to comment.