Skip to content

Commit

Permalink
chore: group all pages in a group to create a page without root layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Devessier committed May 13, 2023
1 parent f8472b5 commit 7c6b9c3
Show file tree
Hide file tree
Showing 57 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import '../app.postcss';
import '../../app.postcss';
import Nav from '$lib/Nav/Nav.svelte';
import AppFooter from '$lib/AppFooter.svelte';
import { onMount } from 'svelte';
Expand Down
1 change: 1 addition & 0 deletions src/routes/(portfolio)/+layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const prerender = true;
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { getBlogPosts } from './writing/_api';

interface GetResult {
latestArticles: WritingPreview[];
};
}

export const load: PageServerLoad<GetResult> = () => {
const blogPosts = getBlogPosts();
const blogPosts = getBlogPosts();
const latestArticles = blogPosts.slice(0, 3);

return {
latestArticles
};
}
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import Page from '$lib/Page.svelte';
import '../../shiki.css';
import '../../../shiki.css';
import { formatDate } from '$lib/format-date';
import LinkWithAnimatedArrow from '$lib/LinkWithAnimatedArrow.svelte';
import slugify from 'slugify';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const load: PageLoad<GetResult> = async ({ params: { slug } }) => {
metadata: { title, datetime },
default: content
}: {
metadata: { title: string; datetime: string; };
metadata: { title: string; datetime: string };
default: ComponentType;
} = await import(`../${slug}.svx`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function getNotes(): NotePreview[] {
return shouldKeepFile === true;
})
.map(([path, data]) => {
const { metadata } = data as { metadata: Omit<NotePreview, 'slug'> }
const { metadata } = data as { metadata: Omit<NotePreview, 'slug'> };
const { title, datetime } = metadata;

return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { PageLoad } from '../../../.svelte-kit/types/src/routes/notes/$types';
import type { PageServerLoad } from './$types';
import type { NotePreview } from '$lib/types';
import { getNotes } from '../note/_api';

type GetResult = {
notes: NotePreview[];
};

export const load: PageLoad<GetResult> = () => {
export const load: PageServerLoad<GetResult> = () => {
const notes = getNotes();

return {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export const load: PageServerLoad<GetResult> = () => {
const blogPosts = getBlogPosts();

return {
articles: blogPosts
articles: blogPosts
};
};
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { formatDate } from '$lib/format-date';
import { slugify } from '$lib/slugify';
import type { PageData } from './$types';
import '../../shiki.css';
import '../../../shiki.css';
export let data: PageData;
$: title = data.title;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export function getBlogPosts(): WritingPreview[] {
return shouldKeepFile === true;
})
.map(([path, data]) => {
const { metadata } = data as { metadata: Omit<WritingPreview, 'slug'> }
const { metadata } = data as { metadata: Omit<WritingPreview, 'slug'> };

const { title, description, datetime, tags } = metadata;

return {
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/routes/+layout.ts

This file was deleted.

5 changes: 5 additions & 0 deletions src/routes/state-of-xstate/survey/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script lang="ts">
import '../app.postcss';
</script>

<p>Hello</p>

0 comments on commit 7c6b9c3

Please sign in to comment.