Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions site/src/assets/styles/form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
main form:not([method]) {
> * {
display: block;
margin: 1rem 0;
}

& select,
& textarea,
& input:not([type="checkbox"], [type="radio"]) {
display: block;
}
}
1 change: 1 addition & 0 deletions site/src/assets/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import url(fonts.css);
@import url(root-and-body.css);
@import url(headings.css);
@import url(form.css);
@import url(utilities.css);
@import url(content-layout.css);
@import url(form-elements.css);
Expand Down
3 changes: 1 addition & 2 deletions site/src/pages/museum/gift-shop/checkout/payment.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import Fixable from "@/components/Fixable.astro";
import FixableRegion from "@/components/FixableRegion.astro";
import FormLayout from "@/components/FormLayout.astro";
import ShopLayout from "@/layouts/ShopLayout.astro";

/** @breaklocation Gift Shop */
Expand All @@ -26,7 +25,7 @@ import ShopLayout from "@/layouts/ShopLayout.astro";
*/
}
<Fixable
as={FormLayout}
as="form"
broken={{ action: "../confirmation/" }}
fixed={{ action: "../review/" }}
>
Expand Down
5 changes: 2 additions & 3 deletions site/src/pages/museum/gift-shop/checkout/shipping.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import FixableRegion from "@/components/FixableRegion.astro";
import FormLayout from "@/components/FormLayout.astro";
import ShopLayout from "@/layouts/ShopLayout.astro";

/** @breaklocation Gift Shop */
Expand All @@ -10,7 +9,7 @@ import ShopLayout from "@/layouts/ShopLayout.astro";
<ShopLayout title="Checkout">
<h1>Checkout</h1>
<FixableRegion><h2 slot="fixed">Shipping Information</h2></FixableRegion>
<FormLayout action="../payment/">
<form action="../payment/">
<div id="error" class="error" role="alert" hidden></div>
<input name="name" placeholder="Recipient Name" />
<input name="street1" placeholder="Street Address" />
Expand All @@ -19,7 +18,7 @@ import ShopLayout from "@/layouts/ShopLayout.astro";
<input name="state" placeholder="State" />
<input name="zip" placeholder="ZIP Code" />
<button>Continue</button>
</FormLayout>
</form>
</ShopLayout>

<script>
Expand Down
7 changes: 3 additions & 4 deletions site/src/pages/museum/login/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import Fixable from "@/components/Fixable.astro";
import FixableRegion from "@/components/FixableRegion.astro";
import FormLayout from "@/components/FormLayout.astro";
import Layout from "@/layouts/Layout.astro";
import { museumBaseUrl } from "@/lib/constants";

Expand All @@ -12,7 +11,7 @@ import { museumBaseUrl } from "@/lib/constants";
<Layout title="Sign In">
<h1>Sign In</h1>
<p id="registered" hidden>Registration successful. Please sign in below.</p>
<FormLayout class="form" action={`${museumBaseUrl}`}>
<form action={`${museumBaseUrl}`}>
<Fixable
as="p"
id="error"
Expand Down Expand Up @@ -49,7 +48,7 @@ import { museumBaseUrl } from "@/lib/constants";
</Fragment>
</FixableRegion>
<button>Submit</button>
</FormLayout>
</form>
<p id="register">
Don't have an account?
<a href="../register/">Register</a>
Expand Down Expand Up @@ -106,7 +105,7 @@ import { museumBaseUrl } from "@/lib/constants";
</script>

<style>
.form {
form {
margin: 10vh 0;
}

Expand Down
5 changes: 2 additions & 3 deletions site/src/pages/museum/register.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import Fixable from "@/components/Fixable.astro";
import FormLayout from "@/components/FormLayout.astro";
import Layout from "@/layouts/Layout.astro";

/** @breaklocation Register & Sign In */
Expand All @@ -9,7 +8,7 @@ import Layout from "@/layouts/Layout.astro";

<Layout title="Create Account">
<h1>Create Account</h1>
<FormLayout action="../login/">
<form action="../login/">
<h2>Account Information</h2>
<Fixable
as="p"
Expand Down Expand Up @@ -142,7 +141,7 @@ import Layout from "@/layouts/Layout.astro";
<input name="captcha" class="captcha" />
</label>
<button>Submit</button>
</FormLayout>
</form>
</Layout>

<script>
Expand Down
5 changes: 2 additions & 3 deletions site/src/pages/museum/volunteer/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import ConditionalParent from "@/components/ConditionalParent.astro";
import FixableRegion from "@/components/FixableRegion.astro";
import FormLayout from "@/components/FormLayout.astro";
import Layout from "@/layouts/Layout.astro";
import { getMode } from "@/lib/mode";

Expand All @@ -21,7 +20,7 @@ const isBroken = getMode() === "broken";
<p id="sign-in-cta" hidden>
Interested in volunteering? Please <a href="../login/">sign in</a> to apply.
</p>
<FormLayout id="volunteer-form" action="thank-you/" hidden>
<form id="volunteer-form" action="thank-you/" hidden>
<p>
If you are interested in volunteering, please fill out the form below.
</p>
Expand Down Expand Up @@ -146,7 +145,7 @@ const isBroken = getMode() === "broken";
</ConditionalParent>
</ConditionalParent>
<button type="submit">Submit</button>
</FormLayout>
</form>
</Layout>

<script>
Expand Down
Loading