Skip to content
Draft
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
29 changes: 25 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ <h1>Corporate Inc.</h1>
<div class="hero-content">
<h2>Welcome to Corporate Inc.</h2>
<p>Building the future with AI-Native Development</p>
<button class="cta-button" onclick="showMessage()">Get Started</button>
<a href="#contact" class="secondary-link">Learn More</a>
<a href="#contact" class="cta-button">Request Consultation</a>
<a href="#services" class="secondary-link">Our Services</a>
</div>
</section>

Expand Down Expand Up @@ -67,7 +67,7 @@ <h2>Our Services</h2>

<section id="contact" class="section">
<div class="container">
<h2>Contact Us</h2>
<h2>Request a Consultation</h2>
<form class="contact-form" onsubmit="handleSubmit(event)">
<div class="form-group">
<label for="name">Name *</label>
Expand All @@ -79,12 +79,33 @@ <h2>Contact Us</h2>
<input type="email" id="email" name="email" required aria-describedby="email-help">
<small id="email-help">We'll never share your email with anyone else</small>
</div>
<div class="form-group">
<label for="service-interest">Service Interest</label>
<select id="service-interest" name="serviceInterest" aria-describedby="service-help">
<option value="">-- Select a service --</option>
<option value="web-development">Web Development with Accessibility Standards</option>
<option value="gdpr-consulting">GDPR Compliance Consulting</option>
<option value="ai-training">AI-Native Development Training</option>
<option value="design-system">Design System Implementation</option>
</select>
<small id="service-help">Which service are you interested in?</small>
</div>
<div class="form-group">
<label for="preferred-contact">Preferred Contact Method</label>
<select id="preferred-contact" name="preferredContact" aria-describedby="contact-method-help">
<option value="">-- Select a method --</option>
<option value="email">Email</option>
<option value="phone">Phone</option>
<option value="video-call">Video Call</option>
</select>
<small id="contact-method-help">How would you like us to reach you?</small>
</div>
<div class="form-group">
<label for="message">Message *</label>
<textarea id="message" name="message" rows="4" required aria-describedby="message-help"></textarea>
<small id="message-help">Tell us how we can help you</small>
</div>
<button type="submit" class="submit-button">Send Message</button>
<button type="submit" class="submit-button">Request Consultation</button>
</form>
</div>
</section>
Expand Down
22 changes: 4 additions & 18 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ document.addEventListener('DOMContentLoaded', () => {
initializeGDPRCompliance();
});

/**
* Show welcome message - demonstrates user interaction logging for audit trails
*/
function showMessage() {
// Log user interaction (compliance requirement for audit trails)
logUserInteraction('cta_button_click', {
timestamp: new Date().toISOString(),
action: 'hero_cta_clicked',
user_agent: navigator.userAgent.substring(0, 100) // Truncated for privacy
});

alert('🎉 Welcome! This site is built with APM dependencies for compliance and design standards.');
}

/**
* Handle contact form submission with GDPR compliance
* @param {Event} event - Form submission event
Expand All @@ -37,6 +23,8 @@ function handleSubmit(event) {
const data = {
name: formData.get('name'),
email: formData.get('email'),
serviceInterest: formData.get('serviceInterest') || '',
preferredContact: formData.get('preferredContact') || '',
message: formData.get('message'),
timestamp: new Date().toISOString(),
consent: true // In real app, this would come from explicit consent checkbox
Expand All @@ -58,12 +46,12 @@ function handleSubmit(event) {
// Log form submission for compliance audit trail
logUserInteraction('form_submission', {
timestamp: data.timestamp,
fields_submitted: ['name', 'email', 'message'],
fields_submitted: ['name', 'email', 'serviceInterest', 'preferredContact', 'message'],
data_processing_consent: data.consent
});

// Simulate form submission
showSuccess('Thank you for your message! We\'ll get back to you soon.');
showSuccess('Thank you for your consultation request! We\'ll get back to you soon.');
event.target.reset();
}

Expand Down Expand Up @@ -332,11 +320,9 @@ function announceToScreenReader(message, priority = 'polite') {

// Export functions for potential testing or external use
window.corporateWebsite = {
showMessage,
handleSubmit,
logUserInteraction
};

// Make functions globally available (for inline event handlers)
window.showMessage = showMessage;
window.handleSubmit = handleSubmit;
Loading