Skip to content

Commit

Permalink
responsiveness added to page
Browse files Browse the repository at this point in the history
  • Loading branch information
Pragati-3003 committed Jun 7, 2023
1 parent d7f34c7 commit f976af6
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 39 deletions.
5 changes: 3 additions & 2 deletions src/components/Blogs/Blogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { data } from './blogContent';
import './blogs.css';

const useStyles = createStyles((theme) => ({

header: {
display: 'flex',
justifyContent: 'space-between',
Expand Down Expand Up @@ -46,9 +47,9 @@ const Blogs = () => {

return (
<>
<Header height={80} mb={50}>
<Header height={200} mb={50}>
<Container className={classes.header}>
<Image src={SamparkLogo} height={100} width={100} />
<Image src={SamparkLogo} height={80} width={100} />
</Container>
</Header>

Expand Down
6 changes: 5 additions & 1 deletion src/components/HeroSection/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@
padding: 0.5rem;
font-size: 1.5rem;
border-radius: 0.2rem;
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px,
rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
cursor: pointer;
transition: all 0.5s;
border: none;
}
.hero-section button:hover {
transform: scale(1.2);
transform: scale(1.1);
background-color: aquamarine;
}
.container {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/components/HomeHeader/HomeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const HomeHeader = () => {
return (
<Header height={HEADER_HEIGHT} className={classes.root} pt={30}>
<Container className={classes.header}>
<Image src={SamparkLogo} height={100} width={100} />
<Image src={SamparkLogo} height={80} width={100} />
<Group spacing={5} className={classes.links}>
{items}
{isLoggedIn}
Expand Down
5 changes: 4 additions & 1 deletion src/components/HomeHeader/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const useStyles = createStyles((theme) => ({
borderTopLeftRadius: 0,
borderTopWidth: 0,
overflow: 'hidden',

marginRight:'-500px',
[theme.fn.largerThan('sm')]: {
display: 'none',
},
Expand All @@ -36,12 +36,15 @@ const useStyles = createStyles((theme) => ({
links: {
[theme.fn.smallerThan('sm')]: {
display: 'none',

},
},

burger: {
[theme.fn.largerThan('sm')]: {
display: 'none',
color:'white',
fontWeight:'bolder',
},
},

Expand Down
39 changes: 30 additions & 9 deletions src/components/HomeOurValues/Values.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
.values-content {
padding: 1rem 2rem 1.5rem 2rem;
margin: 0 1.5rem;
/* background-color: rgb(64 70 76); */
width: 350px;
height: 180px;
border-radius: 1rem;
color: white;
}
Expand Down Expand Up @@ -74,22 +75,36 @@
.values-box-2 {
margin: 0 12rem 0 12rem;
}
.values-content {
min-width: 240px;
height: 200px;
}
.values-box-1 {
margin: 3rem 3rem;
}
}
@media only screen and (max-width: 1100px) {
@media only screen and (max-width: 1181px) {
.values-box-2 {
margin: 0 7rem 0 7rem;
margin: 0 5rem 0 5rem;
}
.values-box-1 {
margin: 3rem 5rem 3rem 5rem;
margin: 3rem 0rem 3rem 0rem;
}
}

@media only screen and (max-width: 1000px) {
@media only screen and (max-width: 1040px) {
.values-box-1 {
margin: 3rem 1rem 3rem 1rem;
margin: 3rem 0rem 3rem 0rem;
}
.values-box-2 {
margin: 0 2rem 0 2rem;
}
.values-content {
min-width: 220px;
height: 220px;
}
}
@media only screen and (max-width: 900px) {
@media only screen and (max-width: 920px) {
.values-box-1 {
flex-direction: column;
margin: 3rem 0 0 0;
Expand All @@ -98,21 +113,27 @@
margin: 2rem;
}
.values-content {
margin: 0 0 2rem 0;
margin: 0 3rem 2rem 2rem;
width: auto;
height: 100px;
}
.values-content-2 {
margin-left: 2rem;
}
}

@media only screen and (max-width: 800px) {
@media only screen and (max-width: 700px) {
.values-box-2 {
flex-direction: column;
margin: 0;
}
.values-content-2 {
margin-left: 0rem;
}
.values-content {
width: auto;
height: auto;
}
}

@keyframes fadeIn {
Expand Down
32 changes: 17 additions & 15 deletions src/components/ImageGallery/ImageGallery.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { Carousel } from '@mantine/carousel';
import { Box, Image, Paper, Text, Title, useMantineTheme } from '@mantine/core';
import { IconArrowNarrowRight } from '@tabler/icons';

import './imagegallery.css';
const ImageGallery = () => {
const theme = useMantineTheme();
return (
<Paper m={20} p={70} id="gallery">
<Box>
<Title order={1} weight="100" align="left" my={20}>
<Title order={1} size={45} weight="500" align="left" my={10} color='blue' className='title'>
Our Gallery
</Title>
</Box>
<Carousel
className='carousell'
withIndicators
height={250}
height={350}
slideSize="33.333333%"
slideGap="md"
loop
Expand All @@ -26,38 +27,38 @@ const ImageGallery = () => {
]}
>
<Carousel.Slide>
<Image
radius={20}
<Image className='imgc'
radius={20} height={300}
src="https://drive.google.com/uc?export=download&id=1LvVkueNKCOxWMZhmENlciL98fFnO1Iyl"
/>
</Carousel.Slide>
<Carousel.Slide>
<Image
radius={20}
<Image className='imgc'
radius={20} height={300}
src="https://drive.google.com/uc?export=download&id=1Lrgi5PCH0MKgY6LYyaa3oGkXGiCRyYiK"
/>
</Carousel.Slide>
<Carousel.Slide>
<Image
radius={20}
<Image className='imgc'
radius={20} height={300}
src="https://drive.google.com/uc?export=download&id=1LxlU3X8-1WH4TLDM4YSP9x21g4HVjggU"
/>
</Carousel.Slide>
<Carousel.Slide>
<Image
radius={20}
<Image className='imgc'
radius={20} height={300}
src="https://drive.google.com/uc?export=download&id=1LtNaPzQYG_3AgRI__hB1BGKBWFh6Ulvo"
/>
</Carousel.Slide>
<Carousel.Slide>
<Image
radius={20}
<Image className='imgc'
radius={20} height={300}
src="https://drive.google.com/uc?export=download&id=1Lr0fIwip2Fa5VyrThq4wx00vIUYkOxTO"
/>
</Carousel.Slide>
<Carousel.Slide>
<Image
radius={20}
<Image className='imgc'
radius={20} height={300}
src="https://drive.google.com/uc?export=download&id=1MTxwomYotps5z_-BHpHhXvwSr1ISw-de"
/>
</Carousel.Slide>
Expand All @@ -66,6 +67,7 @@ const ImageGallery = () => {
<Text
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'end' }}
color={theme.colors.red[5]}
size={20}
>
View more
<IconArrowNarrowRight />
Expand Down
33 changes: 33 additions & 0 deletions src/components/ImageGallery/imagegallery.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.title{
margin-bottom: 40px;
font-size: 50px;
margin-left: 30px;
}
.carousell{
margin-left: 30px;
}

@media only screen and (max-width: 920px) {
.carousell{
margin-left: 0px;
}
.imgc{
width: 200px;
}
}

@media only screen and (max-width: 540px) {
.carousell{
margin-left: 0px;
}
.imgc{
width: 350px;
}
.title{
margin-bottom: 40px;
font-size: 30px;
margin-left: 0px;
size: 80px;
}
}

2 changes: 2 additions & 0 deletions src/components/MainBlogs/MainBlogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from '@mantine/core';
import { mockdata } from './blogData';
import useStyles from './styles';
import './blog.css';
import Logo from '../../assets/Images/samparklogotransparent.png';
import { useNavigate } from 'react-router-dom';

Expand Down Expand Up @@ -51,6 +52,7 @@ const MainBlogs = () => {
<Paper m={20} px={70} mb={70} pt={20}>
<Box>
<Title
className='blogtitle'
order={3}
py={20}
tt="capitalize"
Expand Down
3 changes: 3 additions & 0 deletions src/components/MainBlogs/blog.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.blogtitle{
margin-top: 50px;
}
2 changes: 1 addition & 1 deletion src/components/MainHeader/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const useStyles = createStyles((theme) => ({
justifyContent: 'space-between',
alignItems: 'center',
height: '100%',
width:'100%'
},

links: {
Expand All @@ -27,7 +28,6 @@ const useStyles = createStyles((theme) => ({
: theme.colors.gray[7],
fontSize: theme.fontSizes.sm,
fontWeight: 500,

'&:hover': {
cursor: 'pointer',
backgroundColor:
Expand Down
12 changes: 5 additions & 7 deletions src/components/MapBox/MapBox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AspectRatio, Button, Card, Paper, Text, Title } from '@mantine/core';
import { useMemo, useState } from 'react';
import Map, { FullscreenControl, GeolocateControl, Marker, NavigationControl, Popup, ScaleControl } from 'react-map-gl';

import './map.css';
const cityData = [
{
type: 'Seeker',
Expand Down Expand Up @@ -64,7 +64,7 @@ const MapBox = () => {
);

return (
<Paper
<Paper className='cardss'
m={25}
sx={{
height: '90vh',
Expand All @@ -75,12 +75,10 @@ const MapBox = () => {
alignItems: 'center',
}}
>
<Card
sx={{ display: 'flex', alignItems: 'left', flexDirection: 'column',minWidth:"360px",maxWidth:"50%" }}


<Card
sx={{ display: 'flex', alignItems: 'left', flexDirection: 'column',minWidth:"360px",maxWidth:"50%" }}
>
<Title order={1} weight={300}>
<Title order={1} weight={300} >
We provide assistanace. Register your NGO/orphanage at Sampark.
</Title>
<Text weight={500} mb={20}>
Expand Down
12 changes: 12 additions & 0 deletions src/components/MapBox/map.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

@media only screen and (max-width: 1537px) {
.cardss{
margin-top: -200px;
}
}
@media only screen and (max-width: 1062px) {
.cardss{
margin-top: 0px;
}
}

2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const HomeNavbar = () => {
};

return (
<Navbar height={700} width={{ sm: 300 }} p="md">
<Navbar height={7000} width={{ sm: 300 }} p="md">
<Navbar.Section grow>
<Group className={classes.header}></Group>
{links}
Expand Down
1 change: 0 additions & 1 deletion src/components/Navbar/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const useStyles = createStyles((theme, _params, getRef) => {
padding: `${theme.spacing.xs}px ${theme.spacing.sm}px`,
borderRadius: theme.radius.sm,
fontWeight: 500,

'&:hover': {
backgroundColor:
theme.colorScheme === 'dark'
Expand Down

1 comment on commit f976af6

@vercel
Copy link

@vercel vercel bot commented on f976af6 Jun 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.