Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: use new default slug for project article #757

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions src/layouts/work.astro

This file was deleted.

33 changes: 29 additions & 4 deletions src/pages/arbeid/[...slug].astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { getCollection } from 'astro:content';
import Layout from '@layouts/work.astro';
import Layout from '@layouts/default.astro';
export async function getStaticPaths() {
const blogEntries = await getCollection('project');
Expand All @@ -14,7 +14,32 @@ const { entry } = Astro.props;
const { Content } = await entry.render();
---

<Layout frontmatter={entry}>
<h1>{entry.data.title}</h1>
<Content />
<Layout {...entry.data}>
<main>
<h1>{entry.data.title}</h1>
<Content />
</main>
</Layout>

<style>
main {
width: var(--container-width);
margin-inline: auto;
}
h1 {
font-size: clamp(3rem, 5vw, 2.5rem);
font-weight: 400;
line-height: 1.3;
grid-column: 1 / 6;

text-wrap: pretty;
max-width: 25ch;

margin-bottom: 0;
}
@media (max-width: 640px) {
h1 {
font-size: clamp(2rem, 5vw, 2rem);
}
}
</style>
Loading