-
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.
Merge pull request #4 from andrecrjr/migrate-next
Migrate next
- Loading branch information
Showing
27 changed files
with
5,093 additions
and
4,795 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 |
---|---|---|
|
@@ -15,18 +15,21 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
node-version: [20.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: '8' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run build-export | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm run build-export | ||
- run: touch ./out/.nojekyll | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
|
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,34 +1,3 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
## My Lovely Portfolio ACJRHUB | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
* Next |
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
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'; | ||
|
||
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,3 +1,10 @@ | ||
module.exports = { | ||
reactStrictMode: true, | ||
output: 'export', | ||
compiler: { | ||
styledComponents: { | ||
ssr:true | ||
} | ||
}, | ||
|
||
}; |
Oops, something went wrong.