From 856060e913d3bf381c445a449ff0b0a883497bf8 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 5 Nov 2025 16:11:46 -0800 Subject: [PATCH] foam experiments --- today/form.sh | 19 +++++++++++++++++++ today/index.sh | 3 +++ today/layout.sh | 9 +++++++++ 3 files changed, 31 insertions(+) create mode 100644 today/form.sh create mode 100644 today/index.sh create mode 100644 today/layout.sh diff --git a/today/form.sh b/today/form.sh new file mode 100644 index 0000000..2d398aa --- /dev/null +++ b/today/form.sh @@ -0,0 +1,19 @@ +page-title = 'Form Test' + +div margin='0 auto' width='50%': + h2 color=blue page-title + form method=POST action=/form: + label for=name 'Name:' + input type=text name=name placeholder='Your name' value=params.name + br ; br + label for=age 'Age:' + select name=age: + range 14 100 | list.reverse | list.map do i: + option value=i i + end + end + br ; br + input type=submit + input type=reset + end +end \ No newline at end of file diff --git a/today/index.sh b/today/index.sh new file mode 100644 index 0000000..c6b71cc --- /dev/null +++ b/today/index.sh @@ -0,0 +1,3 @@ +h1 'Today\'s Agenda' +p Cool stuff. +a href=/form Form Test \ No newline at end of file diff --git a/today/layout.sh b/today/layout.sh new file mode 100644 index 0000000..9b9468a --- /dev/null +++ b/today/layout.sh @@ -0,0 +1,9 @@ +html lang=en: + head: + meta charset='UTF-8' + meta name='viewport' content='width=device-width, initial-scale=1.0' + title page-title + end + + body content +end