Skip to content

Commit

Permalink
refactor: use new default slug for project article (#757)
Browse files Browse the repository at this point in the history
* fix: use new default slug for project article

* chore: delete unused file
  • Loading branch information
Xillians authored Aug 14, 2024
1 parent 84b9b6d commit 7f01d5a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 66 deletions.
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>

0 comments on commit 7f01d5a

Please # to comment.