sitegen/src/q+a/pages/q+a.marko

27 lines
645 B
Text
Raw Normal View History

export * as layout from "../layout.tsx";
export interface Input {
admin?: boolean;
}
export const meta: Metadata = {
title: "paper clover q+a",
description: "ask clover a question",
};
<const/{ admin = false } = input />
<const/questions = [...Question.getAll()] />
2025-06-09 00:12:41 -07:00
<if=!admin>
<QuestionForm />
</>
<for|q| of=questions>
2025-06-09 00:12:41 -07:00
<QuestionRender question=q admin=admin />
</>
<footer>
fun fact: clover has answered ${questions.length} questions
</footer>
import { Question } from "@/q+a/models/Question.ts";
2025-06-09 00:12:41 -07:00
import { QuestionForm } from "@/q+a/components/QuestionForm.marko";
import QuestionRender from '@/q+a/components/Question.marko';