Skip to content

Commit

Permalink
refactor: Footer changed to component
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin3656 committed Apr 21, 2024
1 parent d847795 commit 0fbc91f
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 132 deletions.
75 changes: 3 additions & 72 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,81 +1,12 @@
'use client';

import Image from 'next/image';
import Link from 'next/link';
import styles from './page.module.css';
import { P, H3 } from '../styles/text';
import {
PageContainer,
FooterContainer,
FooterSection,
FooterDiv,
IconDiv,
FooterLink,
} from './styles';
import Icon from '../components/Icon';
import Footer from '@/components/Footer';
import { PageContainer } from './styles';

export default function Home() {
return (
<PageContainer>
<div className={styles.description}>immigration justice project</div>
<FooterContainer>
<FooterDiv>
<FooterSection>
<Image
alt="footer image"
src="/footerimage.webp"
placeholder="blur"
blurDataURL="/footerimage.webp"
quality={100}
width={168}
height={66}
/>
<hr style={{ width: '160px' }} />
<P $color="white">2727 Camino del Rio S</P>
<P $color="white">©2024 by Immigration Justice Project Pro Bono</P>
</FooterSection>
</FooterDiv>
<FooterDiv>
<FooterSection>
<H3 $color="white" style={{ fontSize: '20px' }}>
Resources
</H3>
<hr style={{ width: '40px' }} />
<FooterLink $color="white" href="https://www.americanbar.org/">
ABA Website
</FooterLink>
<FooterLink
$color="white"
href="https://www.americanbar.org/groups/public_interest/immigration/"
>
IJP Commission
</FooterLink>
<P $color="white">Hotline: 619-641-7510</P>
</FooterSection>
<FooterSection>
<H3 $color="white" style={{ fontSize: '20px' }}>
Contact Us
</H3>
<hr style={{ width: '40px' }} />
<P $color="white">Email: [email protected]</P>
<P $color="white">Phone: 619-255-8829</P>
<IconDiv>
<Link href="https://www.facebook.com/ImmigrationJusticeProjectOfSanDiego/">
<Icon type="fblogo" />
</Link>
<Link href="https://twitter.com/ijpsandiego?lang=en">
<Icon type="twitter" />
</Link>
<Link href="https://www.linkedin.com/company/immigration-justice-project/">
<Icon type="linkedin" />
</Link>
<Link href="https://www.instagram.com/ijp.sandiego/">
<Icon type="instagram" />
</Link>
</IconDiv>
</FooterSection>
</FooterDiv>
</FooterContainer>
<Footer />
</PageContainer>
);
}
35 changes: 1 addition & 34 deletions src/app/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,9 @@
import styled from 'styled-components';
import COLORS from '@/styles/colors';
import { LinkColored } from '../styles/text';

export const PageContainer = styled.div`
height: 100vh;
min-height: 100svh;
width: 100%;
display: flex;
flex-direction: column;
padding-top: 1rem;
`;
export const FooterContainer = styled.div`
width: 100%;
background-color: ${COLORS.blueMid};
min-height: 290px;
padding-left: 50px;
padding-right: 50px;
padding-top: 40px;
display: flex;
justify-content: space-between;
`;
export const FooterSection = styled.div`
max-width: 316px;
display: flex;
flex-direction: column;
gap: 10px;
`;
export const FooterDiv = styled.div`
display: flex;
flex-direction: row;
gap: 50px;
`;
export const IconDiv = styled.div`
display: flex;
flex-direction: row;
gap: 10px;
`;
export const FooterLink = styled(LinkColored)`
text-decoration: none;
font-size: 14px;
font-weight: 400px;
`;
76 changes: 76 additions & 0 deletions src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
'use client';

import Image from 'next/image';
import Link from 'next/link';
import { P, H3 } from '@/styles/text';
import {
FooterContainer,
FooterSection,
FooterDiv,
IconDiv,
FooterLink,
} from './styles';
import Icon from '../Icon';

export default function Footer() {
return (
<FooterContainer>
<FooterDiv>
<FooterSection>
<Image
alt="footer image"
src="/footerimage.webp"
placeholder="blur"
blurDataURL="/footerimage.webp"
quality={100}
width={168}
height={66}
/>
<hr style={{ width: '160px' }} />
<P $color="white">2727 Camino del Rio S</P>
<P $color="white">©2024 by Immigration Justice Project Pro Bono</P>
</FooterSection>
</FooterDiv>
<FooterDiv>
<FooterSection>
<H3 $color="white" style={{ fontSize: '1.25rem' }}>
Resources
</H3>
<hr style={{ width: '40px' }} />
<FooterLink $color="white" href="https://www.americanbar.org/">
ABA Website
</FooterLink>
<FooterLink
$color="white"
href="https://www.americanbar.org/groups/public_interest/immigration/"
>
IJP Commission
</FooterLink>
<P $color="white">Hotline: 619-641-7510</P>
</FooterSection>
<FooterSection>
<H3 $color="white" style={{ fontSize: '1.25rem' }}>
Contact Us
</H3>
<hr style={{ width: '2.5rem' }} />
<P $color="white">Email: [email protected]</P>
<P $color="white">Phone: 619-255-8829</P>
<IconDiv>
<Link href="https://www.facebook.com/ImmigrationJusticeProjectOfSanDiego/">
<Icon type="facebook" />
</Link>
<Link href="https://twitter.com/ijpsandiego?lang=en">
<Icon type="x" />
</Link>
<Link href="https://www.linkedin.com/company/immigration-justice-project/">
<Icon type="linkedin" />
</Link>
<Link href="https://www.instagram.com/ijp.sandiego/">
<Icon type="instagram" />
</Link>
</IconDiv>
</FooterSection>
</FooterDiv>
</FooterContainer>
);
}
35 changes: 35 additions & 0 deletions src/components/Footer/styles.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import styled from 'styled-components';
import COLORS from '@/styles/colors';
import { LinkColored } from '@/styles/text';

export const FooterContainer = styled.div`
width: 100%;
background-color: ${COLORS.blueMid};
min-height: 290px;
padding-left: 50px;
padding-right: 50px;
padding-top: 40px;
display: flex;
justify-content: space-between;
`;
export const FooterSection = styled.div`
max-width: 316px;
display: flex;
flex-direction: column;
gap: 10px;
`;
export const FooterDiv = styled.div`
display: flex;
flex-direction: row;
gap: 50px;
`;
export const IconDiv = styled.div`
display: flex;
flex-direction: row;
gap: 10px;
`;
export const FooterLink = styled(LinkColored)`
text-decoration: none;
font-size: 14px;
font-weight: 400px;
`;
35 changes: 9 additions & 26 deletions src/lib/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const IconSvgs = {
/>
</svg>
),
fblogo: (
facebook: (
<svg
width="21"
height="21"
Expand Down Expand Up @@ -69,35 +69,18 @@ export const IconSvgs = {
</defs>
</svg>
),
twitter: (
x: (
<svg
width="22"
height="21"
viewBox="0 0 22 21"
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<rect width="22" height="21" fill="url(#pattern0_3910_2851)" />
<defs>
<pattern
id="pattern0_3910_2851"
patternContentUnits="objectBoundingBox"
width="1"
height="1"
>
<use
xlinkHref="#image0_3910_2851"
transform="matrix(0.0106061 0 0 0.0111111 0.0227273 0)"
/>
</pattern>
<image
id="image0_3910_2851"
width="90"
height="90"
xlinkHref="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEp0lEQVR4nO2ca6gVVRTHt/k2TSs0IrEPUmr1xSQTEyuSJDJMsAcofpAsPwgmCJYGFgoVkqR90FALyqhuYg8DC5EuaamUSm9LDCN74PtFJj5+sWpdnI7nnnvPmT0ze2bWD+6HO2furL3+d589e6299nbOMAzDMAzDMAzDMAzDMIwLAL2B+4C5wEqgSX9WAE8C9wK9In9itBegAzAe+BA4Q9vIPev0H9KhQXtDXZkARgNf0Tg7gFF12BsLfAlM9+3IY8AlLjCALsBi4DzxkWe8AHRqxdalwDTgG73/sFzz6cxwffBSFxBAT2AD/tnQIiDQD3gIWAP8VXHfHN8OrY48fK4LAKAb0ExySK/9rsY35YvWen6jDnUHjkcMiOFHvBloEOA1skP0uMm3Q2OqGBKxZ3s1VAfAJLJDho87qrSpW1ynnqhhdHEj06I4AJcBf5JdTx5bMb0bASwDZsZ17JU2jL8BdI1lpA402MgCmcpdB1yr36jlwD79bGPsGRmwth2N2A5cH8tQOwA6RpxLk7M6zz5S5bOfgat8OLe+nY05AUyJbbAGwF2ExUFgkPMB8Fadxl8HrvRivALgOcJBevcI5wtgSQONOATM8DrPdP+25RPCYL/3HAcwNUaDvgbu9NiWLMbnSn70NlxUODfYQ+OaNUMW681cJQROmw8k/epP3Ysd/N5TQ3dpcqpHg+2Qt3+WdPGv7v8dnOO5wSf0JTuxHtFbmV6lSY80ViuOJtT4k7ryIS/PW4DONdrxA0UWWp18PCVnTgGfAy9JPkWjsNEalb1PdpxNJd2gUdlWysvRxEWOiH018BvlZF/S4t5Y8fvNGnqWjZ1JC71dI7LJLcvzkvQG9lAu1iQtdDSpdFrH6WW6iBldeSk6zyctdFv56LIwLWmh4+Q6isTIpIXun7WHAfB3KqtIuoxTZjYlLrIKLQUkZebZtISWqHA35eXuVIRWsUcFkKbMgiOJp0eriL2I8vFqqiKr0J2B9ygX41IXOlImK4XeZWB/msVB1cTuBDxdgjF7oQsB4HbJalFMzkiw5gLcN9JcsB7elLW2LVsMbgAuj1y7ArhHoijyz3lgWCjV9gcjeYCi8bYLBc1HF3VsHuxCAbimoIn/5S40tBygaPPmvi40NFIMpcLTBxNdqOhs4yfyT5MLHd3XIXvy8sofXrZHpIHMqRPaxZo0srJ/m8sTGiVOyVmBzXSXV7T6VGYkvxA2K10RkAp/YKiK/ibwKfA7YfBurRLhXMN/29dCKJL8KNM8c8Lbipd6OlMjLh/H3rcd6NAxKaDhYnWhRFaBH4yc1JI18k2al/YBAUknmp4C9hIOJ4MOretYqL1VjzyTct5zhMVm2fviAp8dPAo8rKsm44AH9NozevrLtoCT/qd0StnR5WCMFVEPkD/WA0NcntD8xQLgGOGzpdoRPLlCjoVQwSUxHhqfAfe7IiHRlG4a2pxx8HEIeLFyx1ghAQboC2drSvUcvwKr9KVcnKCjHoA+WkSzRHv7MQ854m+Bd4BZpei5MfLSA/Wg1KnAfN0ytyJyvLCcLvayHt8jUdtMYIIcOuL75BrDMAzDMAzDMAzDMAzDcHnjH2dZVIQSDg4kAAAAAElFTkSuQmCC"
/>
</defs>
<path
d="M11.4945 8.77685L17.232 1.66602H14.6712L10.292 7.09685L6.40703 1.66602H0.832031L7.33703 10.7577L1.2237 18.3327H3.78536L8.53953 12.441L12.757 18.3327H18.332L11.4945 8.77685ZM9.5112 11.2352L8.30703 9.55268L3.63203 3.02185H5.55703L9.33036 8.28602L10.5329 9.96935L15.5479 16.9768H13.6229L9.5112 11.2352Z"
fill="white"
/>
</svg>
),
instagram: (
Expand Down

0 comments on commit 0fbc91f

Please sign in to comment.