2025-06-06 23:38:02 -07:00
|
|
|
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 />
|
|
|
|
</>
|
2025-06-06 23:38:02 -07:00
|
|
|
<for|q| of=questions>
|
2025-06-09 00:12:41 -07:00
|
|
|
<QuestionRender question=q admin=admin />
|
2025-06-06 23:38:02 -07:00
|
|
|
</>
|
|
|
|
<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";
|
2025-06-06 23:38:02 -07:00
|
|
|
import QuestionRender from '@/q+a/components/Question.marko';
|