Certainly! Here's a sample code for an adaptive personal site-portfolio in a creative hi-tech style using HTML, CSS, and Vanilla JavaScript:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hi-Tech Portfolio</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<nav>
<h1>Portfolio</h1>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section id="home">
<h2>Welcome to my Portfolio!</h2>
<p>Hi, I'm John Doe, a passionate web developer.</p>
</section>
<section id="about">
<h2>About Me</h2>
<p>I have a strong passion for creating innovative and visually appealing web experiences. I specialize in front-end development and have experience with HTML, CSS, and JavaScript.</p>
</section>
<section id="projects">
<h2>Projects</h2>
<div class="project">
<img src="project1.jpg" alt="Project 1">
<h3>Project 1</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
<div class="project">
<img src="project2.jpg" alt="Project 2">
<h3>Project 2</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</section>
<section id="contact">
<h2>Contact Me</h2>
<form>
<input type="text" placeholder="Name" required>
<input type="email" placeholder="Email" required>
<textarea placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form>
</section>
</main>
<footer>
<p>© 2022 John Doe</p>
</footer>
<script src="script.js"></script>
</body>
</html>
CSS (style.css):
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #222;
padding: 20px;
color: #fff;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
nav ul {
list-style-type: none;
display: flex;
}
nav ul li {
margin-right: 10px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
main {
padding: 50px;
text-align: center;
}
section {
margin: 50px 0;
}
h2 {
color: #333;
}
.project {
margin-bottom: 20px;
}
.project img {
width: 300px;
}
footer {
background-color: #222;
padding: 20px;
color: #fff;
text-align: center;
}
form input,
form textarea,
form button {
display: block;
margin-bottom: 10px;
width: 100%;
padding: 10px;
}
form button {
background-color: #222;
color: #fff;
border: none;
cursor: pointer;
}
JavaScript (script.js):
// Smooth scrolling
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
You can replace the placeholder images and customize the styles and content according to your own requirements and preferences.
Remember to add appropriate images and update the file paths accordingly. Also, ensure you have a good folder structure, placing the CSS file (style.css) and JavaScript file (script.js) in the same directory.
I hope this helps you get started with your adaptive personal site-portfolio!