Skip to content

Commit

Permalink
perf: about Dynamic Page Background
Browse files Browse the repository at this point in the history
  • Loading branch information
12Gustavo21 committed Jan 3, 2024
1 parent 3feab3a commit 32c97b5
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
Binary file removed src/assets/img/dark-forest.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/assets/pages/about/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Index() {

return (
<Layout backgroundHeader="#070c11" backgroundFooter="#070c11" >
<S.Main>
<S.Main background={about.backgroud.url}>
<FireflyCanvas />
<S.ContentWrapper>
<AboutSection about={about} />
Expand Down
5 changes: 1 addition & 4 deletions src/assets/pages/about/style.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import styled from "styled-components";

//Assets
import darkForest from '../../img/dark-forest.png';

/*
Palette:
#454545
Expand All @@ -15,7 +12,7 @@ import darkForest from '../../img/dark-forest.png';
export const Main = styled.main`
width: 100%;
min-height: 100vh;
background: url(${darkForest}) no-repeat center/cover;
background: url(${props => props.background}) no-repeat center/cover;
position: relative;
z-index: 0;
Expand Down
65 changes: 34 additions & 31 deletions src/assets/services/querys/aboutQuery/index.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
import { gql } from "@apollo/client";

export const ABOUT_QUERY = gql`
query {
about(where: {slug: "about"}) {
aboutTitle
aboutText
workTitle
works {
workDescription
workEnterprise
enterpriseSvg {
url
}
workStart
workEnd
calendarSvg {
url
}
}
educationTitle
educations {
educationDescription
educationEnterprise
enterpriseSvg {
url
}
educationStart
educationEnd
calendarSvg {
url
}
}
query {
about(where: { slug: "about" }) {
aboutTitle
aboutText
workTitle
works {
workDescription
workEnterprise
enterpriseSvg {
url
}
}
workStart
workEnd
calendarSvg {
url
}
}
educationTitle
educations {
educationDescription
educationEnterprise
enterpriseSvg {
url
}
educationStart
educationEnd
calendarSvg {
url
}
}
backgroud {
url
}
}
}
`;

export default ABOUT_QUERY;

0 comments on commit 32c97b5

Please sign in to comment.