Skip to content

Commit

Permalink
Forgot to add files
Browse files Browse the repository at this point in the history
  • Loading branch information
alexristinmaa committed Dec 8, 2024
1 parent 5e05750 commit 33ba970
Show file tree
Hide file tree
Showing 75 changed files with 2,288 additions and 0 deletions.
16 changes: 16 additions & 0 deletions alexanderristinmaa/app/(root)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
14 changes: 14 additions & 0 deletions alexanderristinmaa/app/(root)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { isDictKey } from '../[lang]/dictionaries'

import { redirect } from 'next/navigation';

export default function Root() {
for(let language of navigator.languages) {
let lang = language.split("-")[0];

if(isDictKey(lang)) redirect(`${lang}`)
}

// Default english
redirect('/en')
}
31 changes: 31 additions & 0 deletions alexanderristinmaa/app/NavLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";

const NavLink = ({
children,
href,
activeClassName,
nonActiveClassName = "",
className,
...rest
} : {
children: React.ReactNode,
href: string,
activeClassName: string,
nonActiveClassName?: string,
className: string
}) => {
const withTrailingSlash = href[href.length - 1] == "/" ? href : href + "/";
const pathname = usePathname(); // p
const isActive = pathname.endsWith(withTrailingSlash)
const newClassName = `${isActive ? activeClassName : nonActiveClassName} ${className}`;

return (
<Link href={href} className={newClassName} {...rest}>
{children}
</Link>
);
};
export default NavLink;
Empty file.
8 changes: 8 additions & 0 deletions alexanderristinmaa/app/[lang]/(blog)/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// style
import styles from './page.module.css';

export default function Home() {
return (
<p>TODO</p>
);
}
16 changes: 16 additions & 0 deletions alexanderristinmaa/app/[lang]/(blog)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const metadata = {
title: 'Bloggen',
description: 'Allt folk vill veta, och allt annat också',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
49 changes: 49 additions & 0 deletions alexanderristinmaa/app/[lang]/(homepage)/alex/page.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#imgDiv {
width: 500px;
overflow-y: hidden;
}

#imgDiv > p {
margin-top: 8px;
float: right;
}

#img {
width: 100%;
border: 2px solid var(--black);
overflow-y: hidden;
}

#imgText {
display: flex;
flex-direction: row;
gap: 30px;
overflow-y: hidden;
}

#textDiv {
flex: 1;
display: flex;
gap: 1em;
flex-direction: column;
overflow-y: hidden;
}

#textDiv a {
color: var(--highlight)
}

@media screen and (max-width: 900px) {
#imgDiv {
width: min(100%, 500px);
}
#img {
width: 100%;
}

#imgText {
padding-left: 20px;
padding-right: 20px;
flex-direction: column;
}
}
27 changes: 27 additions & 0 deletions alexanderristinmaa/app/[lang]/(homepage)/alex/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// style
import styles from './page.module.css';

export default function Home() {
return (
<div id={styles.imgText}>
<div id={styles.imgDiv}>
<img id={styles.img} src='/alex/me.jpg' alt="vacker bild på alex med suddig bakgrund"></img>
<p><i>Jag i Fontainebleau, Frankrike. 2024</i></p>
</div>
<div id={styles.textDiv}>
<p>Hejsan!</p>
<p>Vad kul att du vill veta mer om mig :)
Det finns <u>säkerligen</u> en massa spännande saker som du undrar som jag tyvärr måste undanhålla dig i detta nu.
Detta är <b>inte</b> för att jag inte gillar dig! Det är helt enkelt för att jag är lat.
</p>
<p><b>Bra länkar:</b></p>
<ul style={{listStyle: "none"}}>
<li>Instagram: <a target="_blank" href="https://www.instagram.com/alexristinmaa/">@alexristinmaa</a></li>
<li>27crags: <a target="_blank" href="https://27crags.com/climbers/alexanderris">alexanderris</a></li>
</ul>

</div>
</div>

);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#grid {
height: 1500px;
background-color: var(--black);
color: var(--white);
}

#comingSoon {
position: relative;
top: 200px;
width: 100%;
text-align: center;
font-size: 5rem;
}

#comingSoon > span {
background-color: var(--white);
color: var(--black);
}
10 changes: 10 additions & 0 deletions alexanderristinmaa/app/[lang]/(homepage)/gallery/gallery.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// style
import styles from './gallery.module.css';

export default function Gallery() {
return (
<div id={styles.grid}>
<p id={styles.comingSoon}>Under <span>byggnation</span>.</p>
</div>
);
}
Loading

0 comments on commit 33ba970

Please sign in to comment.