muddle/samples/hello-world/modules/app/views/post.spug
2026-10-23 08:53:07 -04:00

31 lines
694 B
Text

extends ./layout.spug
props
title: string
nav: { label: string, href: string }[]
post: { id: string, title: string, excerpt: string } | null
block content
if post
article@post()
div.card
div.card-title
div.line
span.title= post.title
div.line
component amezing-article
title: post.title
date: 'October 22, 2026'
body: post.excerpt
component amezing-article-nav
previousHref: '/'
previousTitle: 'Back to posts'
else
section.primary-section
h1 Not found
p The post does not exist.
$$$
assertExists("article .card-title")
assertText("article h1", "Test1")
notes