-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
88 lines (81 loc) · 2.97 KB
/
index.html
File metadata and controls
88 lines (81 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bugatti Example - Static Site</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 800px; margin: 0 auto; padding: 2rem; }
nav { display: flex; gap: 1rem; border-bottom: 1px solid #ccc; padding-bottom: 1rem; margin-bottom: 2rem; }
nav a { text-decoration: none; color: #0066cc; }
nav a:hover { text-decoration: underline; }
.error { color: red; font-size: 0.875rem; display: none; }
form { display: flex; flex-direction: column; gap: 1rem; max-width: 400px; }
label { font-weight: 600; }
input, textarea { padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; }
button { padding: 0.5rem 1rem; background: #0066cc; color: white; border: none; border-radius: 4px; cursor: pointer; }
button:hover { background: #0052a3; }
#success-message { color: green; display: none; }
</style>
</head>
<body>
<h1>Welcome to the Example Site</h1>
<nav>
<a href="#home" id="nav-home">Home</a>
<a href="#about" id="nav-about">About</a>
<a href="#contact" id="nav-contact">Contact</a>
</nav>
<section id="home">
<h2>Home</h2>
<p>This is a simple static site used to demonstrate Bugatti browser testing.</p>
</section>
<section id="about">
<h2>About</h2>
<p>Bugatti is a test harness that drives AI agents through structured test steps.</p>
</section>
<section id="contact">
<h2>Contact Us</h2>
<form id="contact-form" onsubmit="return handleSubmit(event)">
<div>
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<span class="error" id="name-error">Name is required</span>
</div>
<div>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<span class="error" id="email-error">Please enter a valid email</span>
</div>
<div>
<label for="message">Message</label>
<textarea id="message" name="message" rows="4" required></textarea>
<span class="error" id="message-error">Message is required</span>
</div>
<button type="submit">Send Message</button>
</form>
<p id="success-message">Thank you! Your message has been sent.</p>
</section>
<script>
function handleSubmit(event) {
event.preventDefault();
const form = event.target;
let valid = true;
['name', 'email', 'message'].forEach(field => {
const input = form[field];
const error = document.getElementById(field + '-error');
if (!input.value.trim()) {
error.style.display = 'block';
valid = false;
} else {
error.style.display = 'none';
}
});
if (valid) {
form.style.display = 'none';
document.getElementById('success-message').style.display = 'block';
}
return false;
}
</script>
</body>
</html>