File tree Expand file tree Collapse file tree 5 files changed +33
-4
lines changed
Expand file tree Collapse file tree 5 files changed +33
-4
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import { posts } from ' ./posts.js' ;
3-
42 let { data } = $props ();
53 </script >
64
Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ let {data, children} = $props ();
3+ </script >
4+
5+ <div class =" more" >
6+ <main >
7+ {@render children ()}
8+ </main >
9+
10+ <aside >
11+ <h3 >More posts</h3 >
12+ <ul >
13+ {#each data .summaries as {slug, title}}
14+ <li >
15+ <a href ="/blog/ {slug }" >{title }</a >
16+ </li >
17+ {/each }
18+ </ul >
19+ </aside >
20+ </div >
21+
22+
23+ <style >
24+ @media (min-width : 640px ) {
25+ .more {
26+ display : grid ;
27+ gap : 2em ;
28+ grid-template-columns : 1fr 16em ;
29+ }
30+ }
31+ </style >
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import { posts } from '../posts.js';
22import { error } from '@sveltejs/kit'
33
44export function load ( { params } ) {
5- const post = posts . find ( ( post ) => post . slug === params . slug ) ;
5+ const post =
6+ posts . find ( ( post ) => post . slug === params . slug ) ;
67
78 if ( ! post ) error ( 404 ) ;
89
Original file line number Diff line number Diff line change 1-
21<script lang =" ts" >
32 let { data } = $props ();
43 </script >
You can’t perform that action at this time.
0 commit comments