Skip to content

Commit 52c2689

Browse files
author
ansiace
committed
made responsive
1 parent 92bedeb commit 52c2689

20 files changed

+174
-25
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
"@testing-library/react": "^12.0.0",
1010
"@testing-library/user-event": "^14.5.2",
1111
"emailjs": "^4.0.3",
12-
"framer-motion": "^11.5.6",
12+
"framer-motion": "^11.11.17",
1313
"react": "^17.0.2",
1414
"react-dom": "^17.0.2",
1515
"react-scripts": "5.0.0",
16+
"react-scroll": "^1.9.0",
1617
"swiper": "^11.1.14",
1718
"web-vitals": "^2.1.0"
1819
},

src/App.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,8 @@
3737
}
3838

3939

40-
40+
@media screen and ( max-width: 480px ) {
41+
.App{
42+
padding: 0.5rem 1rem;
43+
}
44+
}

src/components/Card/Card.css

+6
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@
3030
padding: 10px;
3131
font-size: 16px;
3232
color: #5290FD;
33+
}
34+
35+
@media screen and ( max-width: 480px ) {
36+
.card{
37+
width: auto;
38+
}
3339
}

src/components/Contact/Contact.css

+16
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,20 @@ textarea{
3838
.c-blur1 {
3939
top: 1rem;
4040
left: 8rem;
41+
}
42+
43+
@media screen and ( max-width: 480px ){
44+
45+
.contact-form{
46+
display: flex;
47+
flex-direction: column;
48+
transform: scale(0.5);
49+
position: relative;
50+
margin-top: -2rem;
51+
margin-bottom: 3rem;
52+
53+
}
54+
55+
56+
4157
}

src/components/Contact/Contact.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Contact = () => {
3434

3535

3636
return(
37-
<div className="contact-form">
37+
<div className="contact-form" id='Contact' >
3838
<div className="w-left">
3939
<div className="awesome">
4040
<span style={{color: darkMode? 'white': ''}} >Get in touch</span>

src/components/Experience/Experience.css

+7
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@
4141
.achievement span:nth-of-type(2){
4242
color: var(--orange);
4343
}
44+
45+
@media screen and ( max-width: 480px ){
46+
.achievement{
47+
margin-left: -1.5rem;
48+
margin-right: -1.4rem;
49+
}
50+
}

src/components/Experience/Experience.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import './Experience.css'
33

44
const Experience = () => {
55
return(
6-
<div className="experience">
6+
<div className="experience" id='Experiences'>
77
<div className="achievement">
88
<div className="circle">8+</div>
99
<span>years</span>

src/components/Footer/Footer.css

+6
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@
1818
.f-icons{
1919
display: flex;
2020
gap: 2rem;
21+
}
22+
23+
@media screen and ( max-width: 480px ){
24+
.f-content{
25+
transform: scale(.5);
26+
}
2127
}

src/components/Intro/Intro.css

+19
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,23 @@
101101
top: -18%;
102102
left: 56%;
103103
filter: blur(78px);
104+
}
105+
106+
@media screen and ( max-width: 480px ) {
107+
.intro{
108+
flex-direction: column;
109+
height: 64rem;
110+
gap: 7rem;
111+
}
112+
113+
.i-right{
114+
transform: scale(0.8);
115+
left: -3rem;
116+
}
117+
.i-right .blur{
118+
display: none;
119+
}
120+
.floating-div:nth-of-type(1){
121+
top: -7rem !important;
122+
}
104123
}

src/components/Intro/Intro.jsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ import glassesimoji from '../../img/glassesimoji.png';
1212
import FloatingDiv from '../FloatingDiv/FloatingDiv';
1313
import { themeContext } from '../../Context';
1414
import { useContext } from "react";
15-
// import { motion } from 'framer-motion'
16-
17-
15+
// import { motion } from "framer-motion";
1816
const Intro = () => {
1917

20-
// const transition = {duration:2, type:'spring'}
21-
2218
const theme = useContext(themeContext);
2319
const darkMode = theme.state.darkMode;
2420
return(
@@ -47,11 +43,15 @@ const Intro = () => {
4743
<img src={Vector2} alt="" />
4844
<img src={boy} alt="" />
4945
<img src={glassesimoji} alt=""/>
50-
<div style={{top: '-4%', left:'58%' }}>
46+
<div style={{top: '-4%', left:'58%' }}
47+
className='floating-div'
48+
>
5149
<FloatingDiv image ={Crown} txt1='Web' txt2='Developer' />
5250
</div>
53-
<div style={{top: '18.1rem', left: '1rem'}}>
54-
<FloatingDiv image={thumbup} txt1='Best Design' txt2='Award'/>
51+
<div style={{top: '18.1rem', left: '1rem'}}
52+
className='floating-div'
53+
>
54+
<FloatingDiv image={thumbup} txt1='Best Photography' txt2='Award'/>
5555
</div>
5656
{/* blur divs */}
5757
<div className='blur' style={{background: "rgb(238 210 255)"}}></div>

src/components/Navbar/Navbar.css

+12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
align-items: center;
2525
justify-content: center;
2626
font-weight: 400;
27+
2728
}
2829

2930
.n-list{
@@ -35,6 +36,8 @@
3536
gap: 2rem;
3637
margin-right: 4rem;
3738
list-style: none;
39+
margin-left: -10rem;
40+
cursor: pointer;
3841

3942
}
4043
.n-list > ul > li:hover {
@@ -44,4 +47,13 @@
4447

4548
.n-button{
4649
flex:2;
50+
}
51+
52+
@media screen and ( max-width: 480px ) {
53+
.n-list{
54+
display: none;
55+
}
56+
.n-button{
57+
display: none;
58+
}
4759
}

src/components/Navbar/Navbar.jsx

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
11
import React from 'react'
22
import './Navbar.css'
33
import Toggle from '../Toggle/Toggle'
4+
import { Link } from 'react-scroll'
45

56
const Navbar = () => {
67
return(
78
<div className="n-wrapper">
89
<div className="n-left">
9-
<div className="n-name">Animesh</div>
10+
<div className="n-name">ansiace</div>
1011
<Toggle/>
1112
</div>
1213
<div className="n-right">
1314
<div className="n-list">
1415
<ul style={{ListStyleType: 'none '}}>
16+
<Link spy={true} to='Navbar' smooth={true} activeClass="activeClass">
1517
<li>Home</li>
18+
</Link>
19+
<Link spy={true} to='Services' smooth={true} activeClass="activeClass">
1620
<li>Services</li>
21+
</Link>
22+
<Link spy={true} to='Portfolio' smooth={true} activeClass="activeClass">
1723
<li>Portfolio</li>
24+
</Link>
25+
<Link spy={true} to='Experiences' smooth={true} activeClass="activeClass">
1826
<li>Experiences</li>
27+
</Link>
28+
<Link spy={true} to='Testimonials' smooth={true} activeClass="activeClass">
1929
<li>Testimonials</li>
30+
</Link>
31+
2032
</ul>
2133
</div>
2234
<button className="button n-button">
35+
<Link spy={true} to='Contact' smooth={true} activeClass="activeClass">
2336
Contact
37+
</Link>
2438
</button>
2539
</div>
2640
</div>

src/components/Portfolio/Portfolio.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Portfolio = () => {
1313
const theme = useContext(themeContext);
1414
const darkMode = theme.state.darkMode;
1515
return(
16-
<div className="portfolio">
16+
<div className="portfolio" id='Portfolio'>
1717

1818
{/* heading */}
1919
<span style={{color: darkMode? 'white': ''}}>Recent Projects</span>

src/components/Services/Services.css

+20
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
color: var(--black);
1616
font-size: 2.5rem;
1717
font-weight: bold;
18+
1819
}
1920
.awesome > :nth-child(2){
2021
color: var(--orange);
@@ -34,6 +35,7 @@
3435
}
3536
.cards{
3637
position: relative;
38+
margin-left: 4rem;
3739
}
3840
.cards>*{
3941
position: absolute;
@@ -49,3 +51,21 @@
4951
top: 13rem;
5052
left: -18rem;
5153
}
54+
55+
@media screen and ( max-width: 480px ) {
56+
.services{
57+
margin-top: 0;
58+
flex-direction: column;
59+
gap: 5rem;
60+
height: 66rem;
61+
padding: 0;
62+
}
63+
.cards{
64+
display: flex;
65+
flex-direction: column;
66+
gap: 17rem;
67+
}
68+
.cards>* {
69+
position: static;
70+
}
71+
}

src/components/Services/Services.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import Glasses from "../../img/glasses.png";
55
import Humble from "../../img/humble.png";
66
import Card from '../Card/Card';
77
import { themeContext } from '../../Context';
8-
import { useContext } from "react";
8+
import { useContext } from "react";
99

1010
const Services = () => {
1111

1212
const theme = useContext(themeContext);
1313
const darkMode = theme.state.darkMode;
1414
return(
15-
<div className="services">
15+
<div className="services" id='Services' >
1616

1717
{/* left side */}
1818
<div className="awesome">
@@ -42,7 +42,7 @@ const Services = () => {
4242
<Card
4343
emoji={Glasses}
4444
heading={"Developer"}
45-
detail={"Html, Css, JavaScript, React"}
45+
detail={"Html, Css, JavaScript, React,Figma, Sketch, Photoshop "}
4646
/>
4747
</div>
4848
{/* 3rd card */}

src/components/Testimonial/Testimonial.css

+10
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,13 @@
6161
.t-wrapper .swiper-pagination-bullet-active{
6262
background: var(--orange);
6363
}
64+
65+
@media screen and ( max-width: 480px ){
66+
.t-wrapper{
67+
padding: 0;
68+
}
69+
.testimonial>img{
70+
width: 70px;
71+
height: 70px;
72+
}
73+
}

src/components/Testimonial/Testimonial.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const Testimonial = () => {
3636
]
3737

3838
return(
39-
<div className="t-wrapper">
39+
<div className="t-wrapper" id='Testimonials'>
4040
<div className="t-heading">
4141
<span>Clients always get</span>
4242
<span>Exceptional Work</span>

src/components/Works/Works.css

+21
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,25 @@
7373
background: #F5C32C;
7474
left: 47.5rem;
7575
top: -5rem;
76+
}
77+
78+
@media screen and ( max-width: 480px ){
79+
.works{
80+
flex-direction: column;
81+
height: 55rem;
82+
padding: 0;
83+
gap: 5rem;
84+
}
85+
.w-right{
86+
display: flex;
87+
align-items: flex-start;
88+
justify-content: start;
89+
transform: scale(0.7);
90+
}
91+
.w-mainCircle{
92+
position: static;
93+
}
94+
.w-backCircle{
95+
left: 8rem!important;
96+
}
7697
}

src/components/Works/Works.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react'
2-
import './Works.css'
1+
import React from 'react';
2+
import './Works.css';
33
import Upwork from "../../img/Upwork.png";
44
import Fiverr from "../../img/fiverr.png";
55
import Amazon from "../../img/amazon.png";

0 commit comments

Comments
 (0)