diff options
author | 2021-03-21 15:13:38 -0700 | |
---|---|---|
committer | 2021-03-21 15:13:38 -0700 | |
commit | 558ef18b58d8f0fd2894eb02fce07c062aab81d3 (patch) | |
tree | 98f8170cfb135fe10fae96af49b3c1943cc42335 /examples/snowpack | |
parent | 417657f138fbc5e194df3dd511e3b9c8e53920fd (diff) | |
download | astro-558ef18b58d8f0fd2894eb02fce07c062aab81d3.tar.gz astro-558ef18b58d8f0fd2894eb02fce07c062aab81d3.tar.zst astro-558ef18b58d8f0fd2894eb02fce07c062aab81d3.zip |
get test runner running
Diffstat (limited to 'examples/snowpack')
-rw-r--r-- | examples/snowpack/astro/layouts/post.hmx | 8 | ||||
-rw-r--r-- | examples/snowpack/astro/pages/guides.hmx | 32 | ||||
-rw-r--r-- | examples/snowpack/astro/pages/news.hmx | 1 |
3 files changed, 19 insertions, 22 deletions
diff --git a/examples/snowpack/astro/layouts/post.hmx b/examples/snowpack/astro/layouts/post.hmx index fef70a4ac..f71824483 100644 --- a/examples/snowpack/astro/layouts/post.hmx +++ b/examples/snowpack/astro/layouts/post.hmx @@ -118,13 +118,13 @@ <h1 class="header-snowpack">{context.title}</h1> - <p> - {props.tagline && <div style="margin-bottom: 1rem;">{props.tagline}</div>} + <div> + {context.tagline && <div style="margin-bottom: 1rem;">{context.tagline}</div>} <div> - Published <a href='#published-at'>{formatDate(parseISO(props.date), 'MMMM d, yyyy')}</a> + Published <a href='#published-at'>{formatDate(parseISO(context.date), 'MMMM d, yyyy')}</a> by <a href="https://twitter.com/FredKSchott">Fred K. Schott</a> </div> - </p> + </div> <!-- Place this tag where you want the button to render. --> <div class="hidden-mobile" style="text-align: center; margin-top: 0.5rem; filter: scale(2);"> diff --git a/examples/snowpack/astro/pages/guides.hmx b/examples/snowpack/astro/pages/guides.hmx index 20a22baaf..2bf7f2cc3 100644 --- a/examples/snowpack/astro/pages/guides.hmx +++ b/examples/snowpack/astro/pages/guides.hmx @@ -24,21 +24,19 @@ context: { title: 'Guides', description: "Snowpack's usage and integration guides.", - props: { - guides: paginate({ - files: '/posts/guides/*.md', - // sort: ((a, b) => new Date(b) - new Date(a)), - tag: 'guide', - limit: 10, - // page: query.page, - }), - communityGuides: paginate({ - files: '/posts/guides/*.md', - // sort: ((a, b) => new Date(b) - new Date(a)), - tag: 'communityGuides', - limit: 10, - }), - } + guides: paginate({ + files: '/posts/guides/*.md', + // sort: ((a, b) => new Date(b) - new Date(a)), + tag: 'guide', + limit: 10, + // page: query.page, + }), + communityGuides: paginate({ + files: '/posts/guides/*.md', + // sort: ((a, b) => new Date(b) - new Date(a)), + tag: 'communityGuides', + limit: 10, + }), } }; } @@ -59,7 +57,7 @@ <div class="content"> <ul> - {props.guides.map((post) => { + {context.guides.map((post) => { return <li><a href={post.href}>{post.title}</a></li>; })} </ul> @@ -73,7 +71,7 @@ </h3> <div class="card-grid card-grid-4"> - {props.communityGuides.map((post) => { + {context.communityGuides.map((post) => { return <Card item={post} />; })} diff --git a/examples/snowpack/astro/pages/news.hmx b/examples/snowpack/astro/pages/news.hmx index 5920cba4f..cdccace95 100644 --- a/examples/snowpack/astro/pages/news.hmx +++ b/examples/snowpack/astro/pages/news.hmx @@ -10,7 +10,6 @@ import users from '../data/users.json'; export function setup({ context, request }) { - console.log(request); return { context: { title: 'Community & News', |