-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
265 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Metadata } from 'next' | ||
import Script from 'next/script' | ||
import { fontPrimaryTheme } from '@/styles/theme'; | ||
import StyledComponentsRegistry from '@/lib/registry'; | ||
import { GlobalThemeProvider } from '@/components/Contexts/ThemeProvider'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'ACJRHUB - Portfolio do Ac Junior', | ||
description: `André Carlos Jr's Portfolio to maintain its portfolio projects and works in Front-end development!`, | ||
robots: "index, follow" | ||
} | ||
|
||
export default function RootLayout({ | ||
// Layouts must accept a children prop. | ||
// This will be populated with nested layouts or pages | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
|
||
return ( | ||
<html lang="en"> | ||
<head> | ||
<Script | ||
strategy="afterInteractive" | ||
async | ||
src={'https://www.googletagmanager.com/gtag/js?id=G-YCSLXN1PVV'} | ||
/> | ||
<Script id="google-analytics" strategy="afterInteractive"> | ||
{process.env.NODE_ENV !== "development" && ` | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){ | ||
dataLayer.push(arguments); | ||
} | ||
gtag('js', new Date()); | ||
gtag('config', 'G-YCSLXN1PVV'); | ||
`} | ||
</Script> | ||
<link rel="preconnect" | ||
href="https://fonts.googleapis.com" /> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossOrigin={''} | ||
/> | ||
<link href={`${fontPrimaryTheme.urlGoogleFont}`} | ||
rel="stylesheet" /> | ||
{<meta | ||
name="google-site-verification" | ||
content="google504a726bb71d2ea2" | ||
/>} | ||
</head> | ||
<body> | ||
<StyledComponentsRegistry> | ||
<GlobalThemeProvider> | ||
{children} | ||
</GlobalThemeProvider> | ||
</StyledComponentsRegistry> | ||
</body> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Header from "@/components/Layout/Header"; | ||
import { AboutMe } from "@/components/Pages/AboutMe"; | ||
import { AboutMeContainer } from "@/components/Pages/AboutMe/About.style"; | ||
import MainPage from "@/components/Pages/MainPage"; | ||
import { Portfolio } from "@/components/Pages/Portfolio"; | ||
import { GlobalContainer } from "@/styles/global"; | ||
|
||
type Props = {}; | ||
|
||
export default function Page({}: Props) { | ||
return ( | ||
<GlobalContainer> | ||
<Header /> | ||
<MainPage /> | ||
<AboutMe /> | ||
<Portfolio /> | ||
</GlobalContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
"use client" | ||
import { theme } from "@/styles/theme"; | ||
import React, { useEffect } from "react"; | ||
import { ThemeProvider } from "styled-components"; | ||
import { createGlobalStyle } from "styled-components"; | ||
import Aos from 'aos'; | ||
import 'aos/dist/aos.css'; | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
*{ | ||
margin:0; | ||
padding:0; | ||
} | ||
body{ | ||
font-family: ${(props) => props.theme.fontFamily}; | ||
} | ||
a{ | ||
&:hover{ | ||
transition:transform 200ms linear; | ||
} | ||
opacity: 0.7; | ||
transition: opacity 300ms ease-out; | ||
&:hover{ | ||
opacity: 1; | ||
} | ||
&:visited{ | ||
color: ${(props) => props.theme.colors.primary} | ||
} | ||
} | ||
`; | ||
|
||
type Props = { | ||
children: React.ReactNode | ||
}; | ||
|
||
export const GlobalThemeProvider = ({children}: Props) => { | ||
|
||
|
||
useEffect(() => { | ||
Aos.init({ duration: 1500 }); | ||
}, []); | ||
|
||
return ( | ||
<ThemeProvider theme={theme}> | ||
<GlobalStyle /> | ||
{children} | ||
</ThemeProvider> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use client" | ||
import styled from "styled-components"; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use client" | ||
import styled from 'styled-components'; | ||
import { Container, Presentation } from '../styles'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use client" | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.section` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use client' | ||
|
||
import React, { useState } from 'react' | ||
import { useServerInsertedHTML } from 'next/navigation' | ||
import { ServerStyleSheet, StyleSheetManager, ThemeProvider, createGlobalStyle } from 'styled-components' | ||
import { theme } from '@/styles/theme' | ||
|
||
|
||
|
||
export default function StyledComponentsRegistry({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
// Only create stylesheet once with lazy initial state | ||
// x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state | ||
const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet()) | ||
|
||
useServerInsertedHTML(() => { | ||
const styles = styledComponentsStyleSheet.getStyleElement() | ||
styledComponentsStyleSheet.instance.clearTag() | ||
return <>{styles}</> | ||
}) | ||
|
||
if (typeof window !== 'undefined') return <>{children}</> | ||
console.log(theme) | ||
return ( | ||
<StyleSheetManager sheet={styledComponentsStyleSheet.instance}> | ||
{children} | ||
</StyleSheetManager> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
module.exports = { | ||
reactStrictMode: true, | ||
output: 'export', | ||
compiler: { | ||
styledComponents: { | ||
ssr:true | ||
} | ||
}, | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.