From 1394400b767c086ab0d71e9b2f95785b8cfe1b69 Mon Sep 17 00:00:00 2001 From: Nikhil M Warrier Date: Sun, 15 Mar 2026 18:57:46 +0530 Subject: Add autosave and clear button to forms. --- src/content/forms/execom.mdx | 60 -------------------------------- src/pages/forms/[...id].astro | 81 +++++++++++++++++++++++++++++++++++++++++-- src/styles/global.css | 4 +++ 3 files changed, 82 insertions(+), 63 deletions(-) delete mode 100644 src/content/forms/execom.mdx (limited to 'src') diff --git a/src/content/forms/execom.mdx b/src/content/forms/execom.mdx deleted file mode 100644 index 43dc72a..0000000 --- a/src/content/forms/execom.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "Interim Execom Recruitment" -id: "interim_execom_recruit_form" -description: "Recruitment form for FOSS-CET's interim executive committee" -date: 2026-03-14 -form: - submit_text: "Submit" - fields: - - id: "name" - label: "Your Name" - type: "text" - required: true - - id: "email" - label: "Email Address" - type: "email" - required: true - - id: "year" - label: "Year" - type: "select" - options: - - '1' - - '2' - - '3' - - '4' - required: true - - id: "role" - label: "Which role/s do you wish to apply for?" - type: "checkbox" - options: - - 'Project Lead' - - 'Event Lead' - - 'Marketing & Design Lead' - - 'Media Lead' - - 'Women in FOSS Lead' - - 'Administrative Committee (2nd, 3rd Years only)' - required: true - - id: "experience" - label: "Relevant Experience, if any:" - type: "textarea" - required: false - - id: "contributions" - label: "If recruited to your role, how do you plan to take the club forward?" - type: "textarea" - required: true - - id: "vision" - label: "What is your vision for FOSS-CET?" - type: "textarea" - required: true - - id: "help" - label: "How would being a part of our club help with your goals/passions?" - type: "textarea" - required: true - - id: "link" - label: "Upload a google drive link to your previous works, if any: (for marketing and design applications)" - type: "textarea" - required: false - ---- - -# Let's talk open source. \ No newline at end of file diff --git a/src/pages/forms/[...id].astro b/src/pages/forms/[...id].astro index d26c51d..cadf14a 100644 --- a/src/pages/forms/[...id].astro +++ b/src/pages/forms/[...id].astro @@ -4,6 +4,7 @@ import { FORM_POST_URL } from '@/consts' import Layout from '@/layouts/Layout.astro' import { getAllForms } from '@/lib/data-utils' import { formatDate } from '@/lib/utils' +import { Icon } from 'astro-icon/components' import { render } from 'astro:content' export async function getStaticPaths() { @@ -29,7 +30,7 @@ const fields = Astro.props.data.form.fields {form.title}
{formatDate(form.date)}
@@ -40,18 +41,92 @@ const fields = Astro.props.data.form.fields
{fields.map((field) => )} +
+ + + Draft autosaved + -
+ + + {form.submit_text || 'Submit'} +
+ + diff --git a/src/styles/global.css b/src/styles/global.css index 2d4de9f..b80b9ed 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -103,4 +103,8 @@ ::file-selector-button { @apply border-border outline-ring/50 tracking-tight; } + + button { + @apply cursor-pointer; + } } -- cgit v1.2.3