Skip to content

Commit

Permalink
#13 removing warnings, updating image alts and CMS
Browse files Browse the repository at this point in the history
  • Loading branch information
samgildea committed Apr 15, 2021
1 parent cee1c87 commit 8f4a507
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/components/footer/footer-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const FooterContainer = styled.div`
width: 100%;
color: ${colors.white900};
position: absolute;
bottom:
`

export const FooterMainContent = styled.div`
Expand Down Expand Up @@ -163,7 +162,6 @@ export const ScoutSection = styled.div`

export const FooterSection = styled.div`
position: relative;
// height: 725px;
`

export const SockContainer = styled.div`
Expand Down
33 changes: 23 additions & 10 deletions src/components/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import {
SockCTA,
FooterImage,
} from "./footer-styles"
import BackgroundImage from "gatsby-background-image"

import { Sub1, Body } from "../../style/type-styles"

export default function footer({ data }) {
Expand All @@ -32,13 +30,16 @@ export default function footer({ data }) {
query prismicFooter {
prismicFooter {
data {
powerhouse_title
sock_description
sock_title
address
footer_image {
url
}
email
social_media {
social_type
social_icon {
url
}
Expand All @@ -51,30 +52,39 @@ export default function footer({ data }) {
render={data => (
<FooterSection>
<FooterImage>
<img alt="footer background image" src={data.prismicFooter.data.footer_image.url} />
<img
alt="PowerHouse house footer background image"
src={data.prismicFooter.data.footer_image.url}
/>
</FooterImage>
<SockContainer>
<SockContent>
<ConnectTitle>
<Sub1>{data.prismicFooter.data.sock_title}</Sub1>
<Sub1>
<label>{data.prismicFooter.data.sock_title}</label>
</Sub1>
<SockEmailForm>
<input type="text" placeholder="Enter your email" />
</SockEmailForm>
<SockDescription>
<Body>{data.prismicFooter.data.sock_description}</Body>
</SockDescription>

<SockCTA>Sign Up</SockCTA>
<SockCTA role="button" type="submit">
Sign Up
</SockCTA>
</ConnectTitle>
</SockContent>
</SockContainer>

<FooterContainer>
<FooterMainContent>
<SocialSection>
<FooterHeader>Powerhouse</FooterHeader>
<FooterHeader>
{data.prismicFooter.data.powerhouse_title}
</FooterHeader>
<AddressSection>
123 Lorem Ipsum Dolor Tempor Incididunt YZ, 12345 123-456-7890
{data.prismicFooter.data.address}{" "}
</AddressSection>
</SocialSection>

Expand Down Expand Up @@ -110,10 +120,13 @@ export default function footer({ data }) {

<EmailSection>
<SocialIcons>
{data.prismicFooter.data.social_media.map(social => {
{data.prismicFooter.data.social_media.map((social, idx) => {
return (
<a href={social.social_link}>
<img alt="social icon" src={social.social_icon.url} />
<a key={idx} href={social.social_link}>
<img
alt={social.social_type}
src={social.social_icon.url}
/>
</a>
)
})}
Expand Down
18 changes: 18 additions & 0 deletions src/schemas/footer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"Main" : {
"powerhouse_title" : {
"type" : "Text",
"config" : {
"label" : "PowerHouse Title"
}
},
"address" : {
"type" : "Text",
"config" : {
"label" : "Address"
}
},
"footer_image" : {
"type" : "Image",
"config" : {
Expand Down Expand Up @@ -28,6 +40,12 @@
"label" : "Social Icon"
}
},
"social_type" : {
"type" : "Text",
"config" : {
"label" : "social type"
}
},
"social_link" : {
"type" : "Text",
"config" : {
Expand Down

0 comments on commit 8f4a507

Please sign in to comment.