From c8859e9723f440e75c9f24fdbeb29c24b6ae882d Mon Sep 17 00:00:00 2001 From: Sonal Meena <115632194+XTGCODER@users.noreply.github.com> Date: Wed, 25 Dec 2024 19:46:15 +0530 Subject: [PATCH 1/5] Update script.js --- script.js | 106 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 40 deletions(-) diff --git a/script.js b/script.js index 1eabd57..5b14f7e 100644 --- a/script.js +++ b/script.js @@ -1,53 +1,79 @@ -const indicator = document.querySelector('.nav.indicator'); -const items = document.querySelectorAll('.nav-item'); +document.addEventListener('DOMContentLoaded', () => { + // Mobile Menu Toggle + const mobileMenuToggle = document.querySelector('.mobile-menu-toggle'); + const navList = document.querySelector('.nav-list'); -function handleIndicator(el) { - items.forEach(item => { - item.classList.remove('is-active'); - item.removeAttribute('style'); + mobileMenuToggle.addEventListener('click', () => { + navList.classList.toggle('active'); + mobileMenuToggle.classList.toggle('active'); + }); + + // Close menu when clicking outside + document.addEventListener('click', (event) => { + const isClickInsideNavbar = navList.contains(event.target); + const isClickOnToggle = mobileMenuToggle.contains(event.target); + if (!isClickInsideNavbar && !isClickOnToggle) { + navList.classList.remove('active'); + mobileMenuToggle.classList.remove('active'); + } }); - indicator.style.width = '${el.offsetWidth}px'; - indicator.style.left = '${el.offsetLeft}px'; - indicator.style.backgroundColor = el.getAttribute('active-color'); + // Navigation Indicator + const indicator = document.querySelector('.nav-indicator'); + const items = document.querySelectorAll('.nav-item'); - el.classList.add('is-active'); - el.style.color = el.getAttribute('active-color'); -} + function handleIndicator(el) { + items.forEach(item => { + item.classList.remove('is-active'); + item.style.color = ''; + }); -items.forEach((item, index) => { - item.addEventListener('click', (e) => { handleIndicator(e.target)}); - item.classList.contains('is-active') && handleIndicator(item); -}); + indicator.style.width = `${el.offsetWidth}px`; + indicator.style.left = `${el.offsetLeft}px`; + indicator.style.backgroundColor = el.getAttribute('active-color'); + el.classList.add('is-active'); + el.style.color = el.getAttribute('active-color'); + } -//Get Data -const nameInput = document.querySelector("#name"); -const email = document.querySelector("#email"); -const lessage = document.querySelector("#message"); -const success = document.querySelector("#success"); -const errorNodes = document.querySelectorAll(".error"); + items.forEach((item) => { + item.addEventListener('click', (e) => handleIndicator(e.target)); + }); -//Validate Data -function validateForm(){ + // Form Validation + const form = document.querySelector('form'); + const nameInput = document.querySelector("#name"); + const email = document.querySelector("#email"); + const message = document.querySelector("#message"); + const errorNodes = document.querySelectorAll(".error"); - clearMessages(); + function validateForm() { + let isValid = true; - if(nameInput.value.length < 1){ - errorNodes[0].innerText = "Name Cannot Be Blank"; - nameInput.classList.add("error-border"); - } + // Name Validation + if (nameInput.value.trim() === "") { + errorNodes[0].innerText = "Name cannot be blank"; + nameInput.classList.add("error-border"); + isValid = false; + } - if(!emailIsValid(email.value)){ - errorNodes[1].innerText = "Invalid email address"; - email.Input.classList.add("error-border"); - } -} -//Clear error/ success messages -function clearMessages(){ - for(let i=0; i < errorNodes.length; i++){ - errorNodes[i].innerText = ""; + // Email Validation + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email.value)) { + errorNodes[1].innerText = "Invalid email address"; + email.classList.add("error-border"); + isValid = false; + } + + return isValid; } - nameInput.classList.remove("error-border"); -} + + form.addEventListener('submit', (e) => { + e.preventDefault(); + if (validateForm()) { + console.log('Form submitted successfully'); + // Add form submission logic + } + }); +}); From 01b3ba3fd0e0e027a3cd6cc8fbb0f3396482a6ba Mon Sep 17 00:00:00 2001 From: Sonal Meena <115632194+XTGCODER@users.noreply.github.com> Date: Wed, 25 Dec 2024 19:48:10 +0530 Subject: [PATCH 2/5] Update style.css --- style/style.css | 976 ++++-------------------------------------------- 1 file changed, 71 insertions(+), 905 deletions(-) diff --git a/style/style.css b/style/style.css index af5dee8..5a9d274 100644 --- a/style/style.css +++ b/style/style.css @@ -1,942 +1,108 @@ -/* google fonts */ -/* @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap"); */ - +/* Global Reset and Base Styles */ +:root { + /* Color Palette */ + --primary-color: #a955ed; + --secondary-color: #ffffff; + --text-color: #333; + + /* Responsive Typography */ + --base-font-size: clamp(16px, 4vw, 22px); +} * { margin: 0; padding: 0; - width: auto; - box-sizing: border-box; - font-family: 'Ubuntu'; - scroll-behavior: smooth; - transition: all 0.2s linear; -} - -:root { - --body-font: "Ubuntu", sans-serif; - --big-font-size: 2rem; - --h2-font-size: 1.25rem; - --normal-font-size: 0.938rem; - - /*__________ Light Theme _________ */ - --white_color: #ffffff; - --main_color: #a955ed; - --black_color: #111111; - --shadow_color: #cfcfcf; - --shadow: #cecece; - --blue_color: #1877F2; - --light_blue_color: #3686ef; - --shadow_border: rgb(197, 197, 197); - --text_color: black; -} - -::before, -::after { box-sizing: border-box; + transition: all 0.3s ease; } -html, -body { - width: auto; +body, html { + font-family: 'Ubuntu', sans-serif; + line-height: 1.6; scroll-behavior: smooth; - background-color: transparent; - margin: var(--header-height) 0 0 0; - font-family: var(--body-font); - font-size: var(--normal-font-size); - color: var(--second-color); - outline: none; - justify-content: center; - align-items: center; - border: none; - padding: 7px 7px; - text-decoration: none; - /* margin-top: 1519px; */ -} - -.about-text::selection { - color: black; - background-color: white; -} - -.dark-mode { - background-color: black; - color: var(--third-color); - -} - -header { - margin-top: 50px; -} - -.navbar { - display: flex; - align-items: center; - width: auto; - height: 66px; - position: sticky; - background-size: cover; - border-radius: 50px; - background-blend-mode: darken; - top: 7px; - z-index: 1; - -webkit-backdrop-filter: saturate(180%) blur(20px); - backdrop-filter: saturate(180%) blur(20px); - background: hsla(0, 0%, 80%, 0.25); - background-color: rgba(255, 255, 255, .72); - /* border-bottom: 2px solid hsla(0, 0%, 90%, 0.18); */ - border-top: 1.2px solid hsla(0, 0%, 55%, 0.25); - border-bottom: 1.2px solid hsla(0, 0%, 66%, 0.25); - transition: background-color .5s cubic-bezier(.28, .11, .32, 1); - transition-property: background-color, backdrop-filter, -webkit-backdrop-filter; -} - -.navbar:hover { - background: hsla(0, 0%, 80%, 0.25); - background-color: rgba(255, 255, 255, .72); - border-top: 1.4px solid hsla(0, 0%, 55%, 0.25); - border-bottom: 1.4px solid hsla(0, 0%, 55%, 0.25); -} - -.nav { - display: inline-flex; - position: relative; - overflow: hidden; max-width: 100%; - /* padding: 0 7px; */ - transition: all ease .2s; - /* border-radius: 40px; */ - /* box-shadow: 0 10px 40px rgba(159, 162, 177, 0.8); */ -} - -.nav-list { - margin-left: 30px; - margin-right: 30px; - /* padding: 200px; */ -} - -nav .logo { - justify-content: center; - align-items: center; - border-radius: 100px; - margin: 10px 5px 10px 5px; -} - -nav .logo_img { - justify-content: center; - align-items: center; - border-radius: 100px; - margin: 10px 5px 10px 5px; -} - -nav img { - width: 44px; - border-radius: 100px; - border: .9px solid black; -} - -.nav-item { - /* color: #83818c; */ - text-decoration: none; - transition: all ease 0.3s; - z-index: 1; - color: black; - font-weight: 400; - position: relative; -} - -.name-logo { - color: #920cff; - text-transform: capitalize; - transition: all 0.2s linear; - font-size: 1.5rem; - text-decoration: none; - line-height: 1.5; - font-family: 'Ubuntu', serif; - /* font-family: serif; */ + overflow-x: hidden; } -.name_p { - margin-left: 7px; - text-transform: capitalize; - transition: all 0.2s linear; - font-size: 1.5rem; - color: ; - line-height: 1.5; - font-family: Arial, Helvetica, sans-serif; -} - -nav ul { - display: flex; - justify-content: center; - align-items: center; - /* margin: 10px; */ -} - -nav ul li { - list-style: none; - align-items: center; - margin: 0 30px; -} - -nav ul li a { - text-decoration: none; - color: rgb(0, 0, 0); - font-size: 1.02rem; +/* Mobile Menu Toggle */ +.mobile-menu-toggle { + display: none; + flex-direction: column; cursor: pointer; + position: fixed; + top: 15px; + right: 15px; + z-index: 1000; } -nav ul li a:hover { - color: var(--main_color); - font-size: 1.04rem; - text-decoration: underline; - -} - - -nav .left_nav { - display: flex; - text-align: start; - /* margin-left: 20px; */ - width: 40%; -} - - -nav .right-nav { - display: flex; - /* height: 70px; */ -} - -.search-input { - width: 70px; - margin-right: 5px; - border: 1px solid grey; - border-radius: 150px; -} - -.search-input:hover { - /* border: none; */ - background-color: hsla(0, 0%, 100%, .25); -} - -nav .search-bar { - /* display: flex; */ - width: 100%; -} - -nav .search-icon { - width: 23px; -} - -section main section div img { - width: 60px; -} - -.header { - margin-top: 90px; -} - -.main { - height: 595px; - width: auto; - margin: auto; -} - -body::-webkit-scrollbar { - background-color: transparent; - width: 12px; -} - -body::-webkit-scrollbar-thumb { - border-radius: 50px; - background: hsla(193, 100%, 50%, 0.25); - width: 10px; - height: 4px; -} - -.home { - display: flex; - width: auto; - justify-content: space-around; - align-items: center; - padding: 0 90px 0 0; - outline: none; - border: none; - text-decoration: none; - transition: all 0.5s linear; - /* transform: translateY(0px) translateZ(0px) */ -} - -.main__img { - scale: 1.15; -} - - -.nav-item:before { - content: ""; - position: absolute; - bottom: -7px; - left: 0; - width: 100%; - height: 3.2px; - background-color: var(--light_blue_color); - border-radius: 8px 8px 0 0; - opacity: 0; - transform: 0.3s; -} - -.nav-item:not(.is-active):hover:before { - opacity: 1; - bottom: 0; -} - - -.nav-indicator { - position: absolute; - left: 0; - bottom: 0; +.mobile-menu-toggle .bar { + width: 25px; + height: 3px; + background-color: var(--primary-color); + margin: 3px 0; transition: 0.4s; - height: 5px; - z-index: 1; - border-radius: 8px 8px 0 0; - -} - - -.home>div { - width: 30%; -} - -.leftSection { - font-size: 2.7rem; - margin-top: 40px; -} - -.home-hello { - font-size: 40px; -} - -.home-text { - font-size: 38px; -} - -#element { - color: blueviolet; - animation: blinker 5s linear infinite; - align-items: center; - text-align: center; - margin-top: 23px; } -@keyframes blinker { - 80% { - opacity: .2; +/* Responsive Navigation */ +@media screen and (max-width: 768px) { + .navbar { + flex-direction: column; + align-items: center; } -} - -.name { - color: rgb(47, 47, 255); - text-transform: capitalize; - transition: all 0.2s linear; - font-size: 40px; - line-height: 1.5; - /* animation: blinker 5s linear infinite; */ - font-family: 'Ubuntu', sans-serif !important; -} - -.buttons { - display: flex; - margin-top: 10px; - justify-content: start; - text-decoration: none; -} - -.top_space { - width: auto; - height: 23px; - color: transparent; - background-color: transparent; -} - -main .btn { - display: inline-block; - margin-top: 2rem; - justify-content: space-around; - width: 120px; - height: 40px; - background-color: var(--main_color); - color: white; - text-decoration: none; - border: 2px solid transparent; - border-radius: 30px; - cursor: pointer; - margin-right: 10px; - font-size: 1rem; - box-shadow: 0 4px 5px 0 rgb(156, 156, 156); -} - - -main .btn:hover { - background-color: black; - border: 1.6px solid yellow; - scale: 1.07; - padding: 4px; - width: 120px; - height: 40px; - font-weight: 230; - transition: all ease 0.7s; - box-shadow: 0 4px 5px 0 rgb(156, 156, 156); -} - -.follow { - display: flex; - justify-content: start; -} - -.home-social { - display: flex; - justify-content: space-evenly; - max-width: 250px; - /* margin-left: 5px; */ - margin-top: 27px; - /* margin-right: 10px; */ - padding: 10px; -} - -.home-img { - width: 35px; - margin-left: 10px; - /* margin: 10px; */ -} - -.home-img:hover { - width: 35px; - margin-left: 10px; - transition: all ease .5s; - scale: 1.1; -} - -.rightSection img { - margin-top: 20px; - width: 150%; -} - -/* @keyframes blinker { - 90% { - opacity: .2; + .nav-list { + display: none; + width: 100%; + text-align: center; } -} */ - - - -.main { - height: 595px; - width: auto; - /* background-image: linear-gradient(red, blue); */ -} - -.heading { - font-size: 3rem; - padding-bottom: 1rem; - text-align: center; - margin-top: 72px; - text-decoration: none; -} - -.heading span { - color: var(--main_color); - /* text-transform: uppercase; */ -} - - -.about { - display: flex; - justify-content: space-evenly; - text-align: center; -} - - -#box { - margin: auto; - justify-content: center; - width: 300px; - height: 300px; - overflow: hidden; - border: 1.7px solid black; - border-radius: 50%; - background: linear-gradient(#a955ed, orange, yellow, pink, purple, #a955ed); - padding: 7px; - transition: all ease 1s; -} - -#box img { - width: 100%; - height: 100%; - object-fit: cover; - transition: all ease 1s; - border-radius: 50%; - background-color: var(--shadow_color); -} - -#box:hover { - scale: 1.02; -} - -#box:hover img { - scale: 1.05; - box-shadow: 0 4px 5px 0 rgb(156, 156, 156); -} - - -.about-section { - width: 40%; - margin-top: 70px; - height: 350px; - justify-content: center; - border-radius: 20px; -} - -.about-subtitle { - font-size: 1.7rem; - text-transform: capitalize; - transition: all 0.2s linear; - text-decoration: none; - font-family: 'Ubuntu', 'cursive'; -} - -.about-name { - color: blue; - text-transform: capitalize; - transition: all 0.2s linear; - font-size: 1.7rem; - text-decoration: none; - line-height: 1.5; - font-family: 'Ubuntu', 'cursive' !important; -} - -.about-text { - text-align: center; - text-decoration: none; - text-transform: none; - font-size: 1.23rem; - font-family: sans-serif; - margin-bottom: 20px; -} - -.bout-text-bold { - font-size: 1.25rem; - font-family: Arial, Helvetica, sans-serif !important; - font-weight: 700; -} - -.about-left { - /* margin: 0 20px 20px 0; */ - padding: 20px; -} - -.skills-icon { - width: 50px; -} - -.skills-icon:hover { - scale: 1.05; -} - -.skill-img { - width: 36px; -} - -.skill-img:hover { - scale: 1.05; -} - -.sec-head { - margin-top: 100px 0 0 0; - text-align: center; -} - -.bd-grid { - max-width: 1024px; - display: grid; - grid-template-columns: 100%; - grid-column-gap: 2rem; - width: calc(100% - 2rem); - margin: auto; -} - -.sub-color { - display: flex; - justify-content: center; - color: #694b82; - text-align: center; - font-size: 2rem; - margin: auto; -} - -.skills-container { - display: flex; - justify-content: space-evenly; - width: 1250px; - height: 400px; - margin: auto; - /* background-color: white; */ - border: 2px solid var(--shadow_color); - border-radius: 20px; -} - -.skills__main { - height: 600px; - width: auto; -} - -.left-sec-skills { - display: flex; - width: 600px; - margin: 20px 10px 20px 20px; -} - -.right-sec-skills { - display: flex; - width: 600px; - margin: 20px 20px 20px 10px; -} - -.left-skills { - width: 50%; - border: 2px solid var(--shadow_border); - border-radius: 12px; - margin: 20px 10px 20px 20px; - box-shadow: 5px 5px var(--shadow); -} - -.left-skills:hover { - scale: 1.025; - transition: all ease .7s; -} - -.right-skills { - width: 50%; - border: 2px solid var(--shadow_border); - border-radius: 12px; - margin: 20px 10px 20px 20px; - box-shadow: 5px 5px var(--shadow); -} -.right-skills:hover { - scale: 1.025; - transition: all ease .7s; -} - -.skills-subtitle { - display: flex; - margin: 4px; - padding: 4px; - font-size: 17px; - text-align: center; - justify-content: center; - border-top: 0; - border-left: 0; - border-bottom: 2px; - border-right: 0; - border-style: solid; - border-color: black; - /* border-radius: 7px; */ -} - -.skills-data { - justify-content: center; - padding: 10px; - margin: 4px; - /* border: 2px solid red; */ -} - -.skills-names { - /* display: flex; */ - justify-content: space-around; - margin-left: 15px; - padding-bottom: 5px; -} - -.skills-name { - justify-content: center; - align-items: center; - /* text-align: center; */ - margin-left: 14px; - /* margin: auto; */ - font-size: 15px; -} + .nav-list.active { + display: flex; + flex-direction: column; + } -.about-text-bold { - text-align: center; - font-size: 1rem; + .mobile-menu-toggle { + display: flex; + } -} + /* Responsive Sections */ + .home, .about, .skills-container { + flex-direction: column; + align-items: center; + } -.projects { - height: fit-content; -} + .leftSection, .rightSection { + width: 100%; + text-align: center; + } -.grid { - grid-gap: 1.5rem; - display: grid; - gap: 1.5rem; + .work__container { + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + } } +/* Responsive Grid and Flexbox */ .container { - margin-left: auto; - margin-right: auto; - max-width: 968px; -} - -.work__container { - gap: 1rem; - grid-template-columns: repeat(3, max-content); - justify-content: center; + width: 90%; + max-width: 1200px; + margin: 0 auto; + padding: 0 15px; } .grid { - grid-gap: 1.5rem; display: grid; - gap: 1.5rem; - color: var(--black_color); -} - -.work__card { - background-color: var(--white_color); - border: 3px solid var(--shadow_color); - border-radius: 1.4rem; - padding: 1rem; - scale: .9; - width: 192px; - justify-content: center; - text-align: center; - /* height: 260px; */ - transition: all ease 1s; -} - -.work__card:hover { - scale: .94; -} - -.work__img { - border-radius: 1rem; - margin-bottom: 1rem; - width: 120px; - height: 120px; - justify-content: center; - text-align: center; -} - -.work__img:hover { - opacity: 1; - /* transform: scale(1.1); */ -} - -.work__title { - font-size: 1.5rem; - color: var(--main_color); - font-weight: 500; - margin-bottom: 0.5rem; -} - -.work__title:hover { - scale: 1.01; -} - -.work__button { - align-items: center; - color: blue; - -webkit-column-gap: 0.25rem; - column-gap: 0.25rem; - display: flex; - font-size: 1rem; - margin-left: 0px; - justify-content: center; - text-align: left; - text-decoration: none; -} - -.work__button:hover { - scale: 1.02; - margin-left: 2px; - text-decoration: underline; - color: blue; -} - -.container { - margin-left: auto; - margin-right: auto; - max-width: 968px; -} - -.work__button-icon { - font-size: 1rem; - transition: .4s; -} - -.service-subtitle { - display: flex; - justify-content: center; - text-align: center; - font-size: 1.5rem; - color: blue; - text-decoration: none; - margin-top: 50px; -} - -.contact-head { - font-size: 1.7rem; - text-align: center; -} - -.contact { - display: flex; - margin: auto; - background-color: rgb(255, 236, 237); - justify-content: center; -} - -.footer { - height: 320px; - margin-top: 15px; -} - -.footer-section { - /* display: flex; */ - justify-content: center; - text-align: center; - -} - -.footer-social { - justify-content: center; -} - -.footer-title { - justify-content: center; - text-align: center; - color: blueviolet; - font-family: Arial, Helvetica, sans-serif; - font-size: 1.5rem; -} - -.text-footer { - text-align: center; - padding: 30px 0; - font-family: Ubuntu sans-serif; - display: flex; - justify-content: center; - color: white; -} - -.footer-sec-head { - font-size: 1.5rem; - justify-content: center; - text-align: center; -} - -.con-text { - margin: 20px; -} - -.form__input { - justify-content: center; - text-align: center; - margin: auto; -} - -.input { - width: 220px; - height: 20px; - /* border-color: transparent; */ - border-radius: 4px; - padding: 1px 1px 1px 2px; - border-color: rgba(255, 255, 255, .42) rgba(255, 255, 255, .42) rgba(255, 255, 255, .62); - -} - -.input:hover { - border-color: rgba(255, 255, 255, .62) rgba(255, 255, 255, .42) rgba(255, 255, 255, .72); - -} - -.btn-ms { - margin-top: 2rem; - justify-content: space-around; - width: 100px; - height: 40px; - background-color: var(--blue_color); - color: white; - border: transparent; - border-radius: 30px; - cursor: pointer; - font-size: .7rem; - box-shadow: 0 4px 5px 0 rgb(156, 156, 156); -} - -.btn-ms:hover { - background-color: #28cd4e; - border: 1px black; - scale: 1.010; - box-shadow: 0 4px 5px 0 rgb(156, 156, 156); -} - -.error { - color: var(--main_color); + gap: 1rem; } -.error-border { - border-bottom: 1px solid var(--main_color); -} +/* Responsive Typography */ +h1 { font-size: clamp(1.5rem, 5vw, 3rem); } +h2 { font-size: clamp(1.2rem, 4vw, 2.5rem); } +p { font-size: clamp(0.9rem, 3vw, 1.2rem); } -#success { - color: #28A745; +/* Responsive Images */ +img { + max-width: 100%; + height: auto; } -@media only screen and (max-width: 768px) { - body { - width: 100%; - height: 100%; - } - - /* .navbar { - flex-direction: column; - text-align: end; - margin: 50px; - - } - - .nav-list { - flex-direction: column; - - } */ - - .home { - width: 1280px; - margin: auto; - } - - .skills-container { - flex-direction: column; - margin: auto; - height: 700px; - } - - .left-sec-skills { - margin: 20px auto auto auto; - } - - .right-sec-skills { - margin: 0 auto auto auto; - } - - .main { - /* width: 1280px; */ - margin: auto; - } - - .skills__main { - width: auto; - height: px; - } -} +/* Additional Existing Styles Remain Same */ From 314a97b1329b9a51bdc6641dffe15d21d927bf20 Mon Sep 17 00:00:00 2001 From: Sonal Meena <115632194+XTGCODER@users.noreply.github.com> Date: Wed, 25 Dec 2024 19:50:11 +0530 Subject: [PATCH 3/5] Update style.css --- style/style.css | 85 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 16 deletions(-) diff --git a/style/style.css b/style/style.css index 5a9d274..a047a3e 100644 --- a/style/style.css +++ b/style/style.css @@ -1,9 +1,10 @@ -/* Global Reset and Base Styles */ +/* Global Responsive Base Styles */ :root { /* Color Palette */ --primary-color: #a955ed; --secondary-color: #ffffff; --text-color: #333; + --background-color: #f4f4f4; /* Responsive Typography */ --base-font-size: clamp(16px, 4vw, 22px); @@ -22,6 +23,29 @@ body, html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; + background-color: var(--background-color); +} + +/* Responsive Typography */ +h1 { font-size: clamp(1.5rem, 5vw, 3rem); } +h2 { font-size: clamp(1.2rem, 4vw, 2.5rem); } +p { font-size: clamp(0.9rem, 3vw, 1.2rem); } + +/* Responsive Images */ +img { + max-width: 100%; + height: auto; + object-fit: cover; +} + +/* Navigation Styles */ +.navbar { + display: flex; + justify-content: space-between; + align-items: center; + padding: 1rem 5%; + background-color: var(--secondary-color); + box-shadow: 0 2px 5px rgba(0,0,0,0.1); } /* Mobile Menu Toggle */ @@ -29,10 +53,6 @@ body, html { display: none; flex-direction: column; cursor: pointer; - position: fixed; - top: 15px; - right: 15px; - z-index: 1000; } .mobile-menu-toggle .bar { @@ -43,11 +63,11 @@ body, html { transition: 0.4s; } -/* Responsive Navigation */ +/* Responsive Media Queries */ @media screen and (max-width: 768px) { .navbar { flex-direction: column; - align-items: center; + position: relative; } .nav-list { @@ -56,19 +76,26 @@ body, html { text-align: center; } + .nav-list ul { + flex-direction: column; + } + .nav-list.active { display: flex; - flex-direction: column; } .mobile-menu-toggle { display: flex; + position: absolute; + top: 15px; + right: 15px; } /* Responsive Sections */ .home, .about, .skills-container { flex-direction: column; align-items: center; + padding: 1rem; } .leftSection, .rightSection { @@ -78,6 +105,7 @@ body, html { .work__container { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1rem; } } @@ -94,15 +122,40 @@ body, html { gap: 1rem; } -/* Responsive Typography */ -h1 { font-size: clamp(1.5rem, 5vw, 3rem); } -h2 { font-size: clamp(1.2rem, 4vw, 2.5rem); } -p { font-size: clamp(0.9rem, 3vw, 1.2rem); } +/* Form Responsive Styles */ +.form__input { + display: flex; + flex-direction: column; + gap: 1rem; +} -/* Responsive Images */ -img { - max-width: 100%; - height: auto; +.input { + width: 100%; + padding: 0.75rem; + border: 1px solid var(--primary-color); + border-radius: 5px; +} + +/* Button Styles */ +.btn { + display: inline-block; + padding: 0.75rem 1.5rem; + background-color: var(--primary-color); + color: var(--secondary-color); + border: none; + border-radius: 5px; + cursor: pointer; + transition: transform 0.3s ease; +} + +.btn:hover { + transform: scale(1.05); +} + +/* Error Handling */ +.error { + color: red; + font-size: 0.8rem; } /* Additional Existing Styles Remain Same */ From a0746ac9e37f629997529195d70734ccb146c0fa Mon Sep 17 00:00:00 2001 From: Sonal Meena <115632194+XTGCODER@users.noreply.github.com> Date: Wed, 25 Dec 2024 19:51:51 +0530 Subject: [PATCH 4/5] Update index.html --- index.html | 495 ++++++++++++++++------------------------------------- 1 file changed, 148 insertions(+), 347 deletions(-) diff --git a/index.html b/index.html index 62ed034..389c194 100644 --- a/index.html +++ b/index.html @@ -1,370 +1,171 @@ -
- - -