-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp: project pages, view transitions and more!
- Loading branch information
Showing
19 changed files
with
2,092 additions
and
2,116 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
interface Props { | ||
type?: "primary" | "secondary"; | ||
href: string; | ||
} | ||
const {type = "primary", href} = Astro.props | ||
--- | ||
|
||
<a class:list={[ "button", type ]} href={href} data-cursor-big="" data-cursor-invert=""> | ||
<slot> | ||
</a> | ||
|
||
<style> | ||
.button { | ||
display: inline-block; | ||
font-size: 1.25rem; | ||
line-height: 100%; | ||
padding: 1em 2em; | ||
text-decoration: none; | ||
border-radius: 100vmax; | ||
} | ||
.button.primary { | ||
background-color: black; | ||
color: white; | ||
} | ||
.button.secondary { | ||
color: black; | ||
outline: 2px solid black; | ||
outline-offset: -2px; | ||
} | ||
.button.secondary:focus-visible { | ||
outline-color: orange; | ||
background-color: #eee; | ||
} | ||
|
||
@media screen and (max-width: 500px) { | ||
.button { | ||
width: 100%; | ||
text-align: center; | ||
padding: 0.5em 2em; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 1. Import utilities from `astro:content` | ||
import { z, defineCollection } from 'astro:content'; | ||
|
||
// 2. Define a `type` and `schema` for each collection | ||
const projectsCollection = defineCollection({ | ||
type: 'content', // v2.5.0 and later | ||
schema: ({ image }) => z.object({ | ||
title: z.string(), | ||
description: z.string(), | ||
image: z.object({ | ||
src: image(), | ||
alt: z.string() | ||
}), | ||
projectLink: z.object({ | ||
href: z.string(), | ||
text: z.string(), | ||
}), | ||
githubLink: z.object({ | ||
href: z.string(), | ||
text: z.string(), | ||
}), | ||
}), | ||
}); | ||
|
||
// 3. Export a single `collections` object to register your collection(s) | ||
export const collections = { | ||
'projects': projectsCollection, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# layout: ../../layouts/ProjectLayout.astro | ||
title: Myrstad Bloggen | ||
description: Dette var årets sommerprosjekt, bygget med Astro, hvorfor ikke bruke sommeren til å lage en blogg? Og hvorfor ikke sjekke den ut? | ||
image: | ||
src: "../../assets/images/myrstadbloggen.png" | ||
alt: test for nå! | ||
projectLink: | ||
href: https://blog.mortenmyrstad.no/ | ||
text: Se nettsiden --> | ||
githubLink: | ||
href: https://github.com/Myrstad/myrstad-bloggen | ||
text: Kildekode --> | ||
--- | ||
|
||
## Dette er enn så lenge kun en test | ||
|
||
Men tusen hjertelig takk for at du leser denne nettsiden. Dette er nå enn så lenge for å teste på mobil, om cache-control fungerer som det skal på Firefox, og litt andre småting. Jeg har gjort store endringer! Git viser 19 filer er endret, dog mye av dette er "refactoring" er det en to-tre dagers arbeid for min del. | ||
|
||
Heldigvis fungerer alt som det skal (håper jeg). Så er det bare å sjekke ut bloggen, den er ikke aktiv, men jeg likte å jobbe på den. Både design og implementasjon! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
import Cursor from '../components/Cursor.astro'; | ||
import Navbar from '../components/Navbar.astro'; | ||
import Footer from '../components/Footer.astro'; | ||
import "../styles/global.css" | ||
import { ViewTransitions } from 'astro:transitions'; | ||
interface Props { | ||
title: string; | ||
description: string; | ||
} | ||
const { title, description } = Astro.props; | ||
--- | ||
|
||
<!doctype html> | ||
<html lang="no"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<!-- SEO & SOCIALS --> | ||
<title>{title}</title> | ||
<meta name="description" content={description} /> | ||
<meta name="theme-color" content="#D7E3F4"> | ||
<meta property="og:locale" content="no_NO"> | ||
<meta property="og:url" content="http://mortenmyrstad.no/" /> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:title" content={title} /> | ||
<meta property="og:description" content={description} /> | ||
<meta property="og:image" content="/images/website-socials.png" /> | ||
<meta name="twitter:card" content="summary_large_image"></meta> | ||
|
||
<ViewTransitions /> | ||
</head> | ||
<body> | ||
<Cursor transition:persist></Cursor> | ||
<Navbar transition:persist></Navbar> | ||
<slot /> | ||
<Footer transition:persist></Footer> | ||
</body> | ||
</html> |
Oops, something went wrong.