code
code
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
background: #f0f2f5;
nav {
background: #2c3e50;
padding: 1rem;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
nav ul {
display: flex;
justify-content: center;
list-style: none;
gap: 2rem;
nav a {
color: white;
text-decoration: none;
font-size: 1.1rem;
nav a:hover {
color: #3498db;
section {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
#home {
color: white;
text-align: center;
padding-top: 6rem;
.profile-img {
width: 200px;
height: 200px;
border-radius: 50%;
object-fit: cover;
margin-bottom: 2rem;
@keyframes float {
}
.section-title {
font-size: 2.5rem;
margin-bottom: 2rem;
position: relative;
padding-bottom: 1rem;
.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100px;
height: 3px;
background: #3498db;
.card {
background: white;
padding: 2rem;
border-radius: 10px;
margin: 1rem;
max-width: 800px;
width: 100%;
transition: transform 0.3s;
.card:hover {
transform: translateY(-5px);
#poems {
background: #ecf0f1;
display: flex;
justify-content: center;
align-items: center;
.poem-container {
position: relative;
width: 100%;
max-width: 800px;
overflow: hidden;
.poem {
text-align: center;
opacity: 0;
transform: translateX(100%);
.poem.visible {
opacity: 1;
transform: translateX(0);
.arrow-btn {
position: absolute;
top: 50%;
font-size: 2rem;
color: #3498db;
border: none;
padding: 0.5rem;
cursor: pointer;
transform: translateY(-50%);
z-index: 2;
.arrow-left {
left: 0;
.arrow-right {
right: 0;
}
.skill-container {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
.skill {
background: #3498db;
color: white;
border-radius: 20px;
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
#contact {
background: #2c3e50;
color: white;
}
.social-links {
display: flex;
gap: 2rem;
margin-top: 2rem;
.social-links a {
color: white;
font-size: 2rem;
.social-links a:hover {
transform: scale(1.2);
color: #3498db;
.contact-form {
max-width: 500px;
width: 100%;
margin-top: 2rem;
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
color: white;
.form-group input,
.form-group textarea {
width: 100%;
padding: 0.8rem;
border: none;
border-radius: 5px;
color: white;
font-size: 1rem;
.form-group textarea {
height: 150px;
resize: vertical;
button {
background: #3498db;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1rem;
button:hover {
background: #2980b9;
.footer {
background-color: #f1f1f1;
text-align: center;
padding: 20px;
position: fixed;
bottom: 0;
width: 100%;
.footer p {
color: black;
margin: 0;
font-size: 14px;
}
</style>
</head>
<body>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#education">Education</a></li>
<li><a href="#hobbies">Hobbies</a></li>
<li><a href="#poems">Poems</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<section id="home">
<h1>SAHITYA BHATTARAI</h1>
</section>
<section id="education">
<h2 class="section-title">Education</h2>
<div class="card">
<p>Grade 10</p>
<p>2008-2021 AD</p>
</div>
<div class="card">
<p>+2 </p>
<p>2021-2023 AD</p>
</div>
<div class="card">
<p>BSc.CSIT</p>
<p>2023 - Present</p>
</div>
</section>
<section id="hobbies">
<h2 class="section-title">Hobbies</h2>
<div class="skill-container">
<span class="skill">Photography</span>
<span class="skill">Writing</span>
<span class="skill">Cricket</span>
<span class="skill">Reading</span>
</div>
</section>
<section id="poems">
<div class="poem-container">
</div>
<div class="poem">
<h3>तिमिनै तिमि</h3>
<p><i>
म रातको छायाँ,<br>
अधुरो यो माया।<br>
म तिम्रो इन्द्रेणी,<br>
तिम्रो मायाले,<br>
सधैंभरि म, <br>
</i></p>
</div>
</div>
</div>
</section>
<style>
.btn-read-more {
display: inline-block;
font-size: 1rem;
color: white;
background-color: #3498db;
border: none;
border-radius: 5px;
text-decoration: none;
}
.btn-read-more:hover {
background-color: #2980b9;
transform: translateY(-2px);
.btn-read-more:active {
background-color: #1c6391;
transform: translateY(0);
</style>
<section id="contact">
<div class="contact-form">
<div class="form-group">
<label for="name">Name</label>
</div>
<div class="form-group">
<label for="email">Email</label>
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
</div>
</form>
</div>
<div class="social-links">
<a href="https://www.instagram.com/me.sahitya/profilecard/?igsh=Zms4ajVnNGpqZ3hi"><i
class="fab fa-instagram"></i></a>
</div>
</section>
<footer class="footer">
</footer>
<script>
let currentPoemIndex = 0;
function updatePoemDisplay() {
poem.classList.remove('visible');
poem.classList.add('visible');
}
});
document.getElementById('prevPoem').addEventListener('click', () => {
updatePoemDisplay();
});
document.getElementById('nextPoem').addEventListener('click', () => {
updatePoemDisplay();
});
updatePoemDisplay();
</script>
</body>
</html>