Skip to content

Commit

Permalink
Revert types + placeholder article
Browse files Browse the repository at this point in the history
  • Loading branch information
colepeters committed May 17, 2024
1 parent c435267 commit f769200
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 32 deletions.
7 changes: 0 additions & 7 deletions app/cookbook/roll-your-own-auth.md

This file was deleted.

14 changes: 1 addition & 13 deletions app/elements/cookbook/recipe-card.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
export default function Recipe ({ html, state }) {
const { attrs } = state
const { href, name, type } = attrs

const types = [
'article',
'codepen',
'walkthrough',
]

if (!types.includes(type?.toLowerCase()) || !type) console.error(`cookbook-recipe: type attribute must be one of: ${types.join(', ')}`)
const { href, name } = attrs

return html`
<style>
Expand Down Expand Up @@ -48,10 +40,6 @@ export default function Recipe ({ html, state }) {
<slot name="description"></slot>
</figure>
<span class="text-1 pb-4 pi-2 mbs-auto mbe0 mi0">
${type?.toLowerCase()}
</span>
</a>
`
}
18 changes: 6 additions & 12 deletions app/elements/cookbook/recipes.mjs
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
export default function CookbookRecipes ({ html }) {
return html`
<cookbook-recipe-box>
<cookbook-recipe-card name="Render Markdown" type="walkthrough" href="/cookbook/render-markdown">
<cookbook-recipe-card name="Render Markdown" href="/cookbook/render-markdown">
<p slot="description">
Use Arcdown to render Markdown content into your Enhance app.
</p>
</cookbook-recipe-card>
<cookbook-recipe-card name="Use event listeners" type="walkthrough" href="/cookbook/use-event-listeners">
<cookbook-recipe-card name="Use event listeners" href="/cookbook/use-event-listeners">
<p slot="description">
Use DOM events to respond to dynamic user input.
</p>
</cookbook-recipe-card>
<cookbook-recipe-card name="Validate forms" type="walkthrough" href="/cookbook/validate-forms">
<cookbook-recipe-card name="Validate forms" href="/cookbook/validate-forms">
<p slot="description">
Improve UX and prevent errors by validating forms on the client and the server.
</p>
</cookbook-recipe-card>
<cookbook-recipe-card name="Roll your own auth" type="article" href="/cookbook/roll-your-own-auth">
<p slot="description">
Learn how to implement authentication, securely and effectively.
</p>
</cookbook-recipe-card>
<cookbook-recipe-card name="Build for the browser" type="walkthrough" href="/cookbook/build-for-the-browser">
<cookbook-recipe-card name="Build for the browser" href="/cookbook/build-for-the-browser">
<p slot="description">
Ship and run code on the browser within a server side rendered Enhance app.
</p>
</cookbook-recipe-card>
<cookbook-recipe-card name="Write unit tests" type="walkthrough" href="/cookbook/write-unit-tests">
<cookbook-recipe-card name="Write unit tests" href="/cookbook/write-unit-tests">
<p slot="description">
Test Enhance elements and API routes.
</p>
</cookbook-recipe-card>
<cookbook-recipe-card name="Migrate from Architect" type="walkthrough" href="/cookbook/migrate-from-architect">
<cookbook-recipe-card name="Migrate from Architect" href="/cookbook/migrate-from-architect">
<p slot="description">
Learn how to migrate your Architect app to an Enhance app.
</p>
Expand Down

0 comments on commit f769200

Please sign in to comment.