Certainly! Below is a simple yet dynamic and modern HTML file for a calisthenics website. This example uses HTML, CSS, and JavaScript to create a responsive and interactive experience. It includes sections for home, about, exercises, and contact.
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calisthenics Mastery</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
header {
background: #333;
color: #fff;
padding: 1rem 0;
text-align: center;
}
nav {
display: flex;
justify-content: center;
background: #444;
}
nav a {
color: #fff;
padding: 1rem;
text-decoration: none;
}
nav a:hover {
background: #555;
}
.container {
padding: 2rem;
}
.exercise {
border: 1px solid #ccc;
padding: 1rem;
margin: 1rem 0;
border-radius: 8px;
}
footer {
background: #333;
color: #fff;
text-align: center;
padding: 1rem 0;
position: fixed;
bottom: 0;
width: 100%;
}
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
padding-top: 60px;
}
.modal-content {
background-color: #fefefe;
margin: 5% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body>
<header>
<h1>Calisthenics Mastery</h1>
</header>
<nav>
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#exercises">Exercises</a>
<a href="#contact">Contact</a>
</nav>
<div id="home" class="container">
<h2>Welcome to Calisthenics Mastery</h2>
<p>Your journey to a stronger, healthier you starts here.</p>
</div>
<div id="about" class="container">
<h2>About Us</h2>
<p>We are dedicated to helping you achieve your fitness goals through the art of calisthenics.</p>
</div>
<div id="exercises" class="container">
<h2>Exercises</h2>
<div class="exercise" onclick="openModal('Push-ups')">
<h3>Push-ups</h3>
<p>A classic calisthenics exercise targeting the chest, shoulders, and triceps.</p>
</div>
<div class="exercise" onclick="openModal('Pull-ups')">
<h3>Pull-ups</h3>
<p>An excellent exercise for building back and biceps strength.</p>
</div>
<div class="exercise" onclick="openModal('Dips')">
<h3>Dips</h3>
<p>Great for targeting the chest, shoulders, and triceps.</p>
</div>
</div>
<div id="contact" class="container">
<h2>Contact Us</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="message">Message:</label>
<textarea id="message" name="message"></textarea><br><br>
<input type="submit" value="Submit">
</form>
</div>
<footer>
<p>© 2024 Calisthenics Mastery</p>
</footer>
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2 id="modalTitle"></h2>
<p id="modalDescription"></p>
</div>
</div>
<script>
var modal = document.getElementById("myModal");
var span = document.getElementsByClassName("close")[0];
function openModal(exercise) {
modal.style.display = "block";
document.getElementById('modalTitle').innerText = exercise;
switch(exercise) {
case 'Push-ups':
document.getElementById('modalDescription').innerText = "Push-ups are a classic calisthenics exercise targeting the chest, shoulders, and triceps.";
break;
case 'Pull-ups':
document.getElementById('modalDescription').innerText = "Pull-ups are an excellent exercise for building back and biceps strength.";
break;
case 'Dips':
document.getElementById('modalDescription').innerText = "Dips are great for targeting the chest, shoulders, and triceps.";
break;
}
}
span.onclick = function() {
modal.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
</html>