Skip to content

Commit 17995e1

Browse files
author
gauthier witkowski
committed
Refactor contact form layout
1 parent 863e836 commit 17995e1

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

index.html

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,62 +10,59 @@
1010
</head>
1111

1212
<body>
13-
<main class="container my-5" style="max-width: 700px">
14-
<header class="text-center mb-5">
15-
<h1>Contact Us</h1>
13+
<main class="container pt-4" style="max-width: 700px">
14+
<header class="text-center mb-4">
15+
<h1 class="fw-bold mb-2">Contact Us</h1>
1616
<p class="text-muted">If you found this project helpful, ⭐️ star the repo !</p>
1717

1818
<!-- GitHub Button (optional) -->
19-
<a class="github-button" href="https://github.com/raspgot/Contact-Form-PHP" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star raspgot/Contact-Form-PHP on GitHub"> Give a star! </a>
19+
<a class="github-button" href="https://github.com/raspgot/Contact-Form-PHP" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star raspgot/Contact-Form-PHP on GitHub">Give a star !</a>
2020
</header>
2121

22-
<section class="shadow rounded p-5 bg-light">
23-
<!-- Alert box for status messages -->
22+
<section class="shadow rounded p-4 bg-white">
23+
<!-- Status -->
2424
<div id="alert-status" class="alert d-none" role="alert" aria-live="polite"></div>
2525

26-
<!-- Contact Form -->
26+
<!-- Form -->
2727
<form method="post" class="needs-validation" novalidate autocomplete="off">
28-
<!-- Name Field -->
2928
<div class="mb-3">
30-
<label for="name" class="form-label fs-5">Name</label>
29+
<label for="name" class="form-label">Name</label>
3130
<input type="text" class="form-control" id="name" name="name" required autocomplete="name" />
3231
<div class="valid-feedback">Looks good !</div>
3332
<div class="invalid-feedback">Please enter your name.</div>
3433
</div>
3534

36-
<!-- Email Field -->
3735
<div class="mb-3">
38-
<label for="email" class="form-label fs-5">Email</label>
36+
<label for="email" class="form-label">Email</label>
3937
<input type="email" class="form-control" id="email" name="email" required autocomplete="email" />
4038
<div class="form-text">Make sure to provide a valid email address.</div>
4139
<div class="valid-feedback">Looks good !</div>
4240
<div class="invalid-feedback">Please enter a valid email address.</div>
4341
</div>
4442

45-
<!-- Subject Field -->
4643
<div class="mb-3">
47-
<label for="subject" class="form-label fs-5">Subject</label>
44+
<label for="subject" class="form-label">Subject</label>
4845
<input type="text" class="form-control" id="subject" name="subject" required autocomplete="off" />
4946
<div class="valid-feedback">Looks good !</div>
5047
<div class="invalid-feedback">Please enter a subject.</div>
5148
</div>
5249

53-
<!-- Message Field -->
5450
<div class="mb-4">
55-
<label for="message" class="form-label fs-5">Message</label>
56-
<textarea class="form-control" id="message" name="message" rows="5" required autocomplete="off"></textarea>
51+
<label for="message" class="form-label">Message</label>
52+
<textarea class="form-control" id="message" name="message" rows="6" required autocomplete="off"></textarea>
53+
<div class="form-text">Be as specific as you can.</div>
5754
<div class="valid-feedback">Looks good !</div>
5855
<div class="invalid-feedback">Please enter your message.</div>
5956
</div>
6057

61-
<!-- Honeypot Field (hidden to humans) -->
58+
<!-- Honeypot -->
6259
<div class="d-none">
6360
<label for="website">Website</label>
6461
<input type="text" id="website" name="website" tabindex="-1" autocomplete="off" />
6562
</div>
6663

6764
<!-- Submit Button -->
68-
<button type="submit" class="btn btn-primary px-4 btn-lg d-flex align-items-center justify-content-center gap-2">
65+
<button type="submit" class="btn btn-primary w-100 btn-lg d-flex align-items-center justify-content-center gap-2">
6966
<span id="loading-spinner" class="spinner-border spinner-border-sm d-none" role="status" aria-hidden="true"></span>
7067
<span>Submit</span>
7168
</button>

0 commit comments

Comments
 (0)