| 1 | export interface Input { |
| 2 | admin?: boolean; |
| 3 | } |
| 4 | |
| 5 | export { theme } from "../tags/question-layout.marko"; |
| 6 | export const regenerate = { tags: ["q+a"] }; |
| 7 | export const meta: Metadata = { |
| 8 | title: "paper clover q+a", |
| 9 | description: "ask clover a question", |
| 10 | }; |
| 11 | |
| 12 | <const/{ admin = false }=input> |
| 13 | <const/questions=[...Question.getAll()]> |
| 14 | |
| 15 | <question-layout> |
| 16 | <if=!admin> |
| 17 | <question-form/> |
| 18 | </if> |
| 19 | <for|question| of=questions> |
| 20 | <question ...{ question, admin }/> |
| 21 | </for> |
| 22 | <footer>fun fact: clover has answered ${questions.length} questions</footer> |
| 23 | </question-layout> |
| 24 | |
| 25 | import { Question } from "#src/q+a/models/Question.ts"; |