From ebf42de2e697cc2deb0a44490aaf2264dc3ca1d3 Mon Sep 17 00:00:00 2001 From: Niklas Fischer <57847380+Rllyyy@users.noreply.github.com> Date: Sun, 10 Dec 2023 20:49:35 +0100 Subject: [PATCH] Migrate to app router (#5) * upgrade next.js and related packages * move components, page and styles into src directory * move files to app router * add meta data + add about image * Remove commented out code * upgrade cypress * downgrade to cypress@13.5.1 * change component ubuntu version * Cypress cli error (#6) * remove start and wait-on for component tests * downgrade next to @13.5.6 * remove viewport * Reset GitHub Actions configuration and add theme color --- .eslintrc.json | 7 +- .github/workflows/cypress-tests.yml | 6 +- README.md | 2 +- components/profile/profile.tsx | 153 -- package.json | 12 +- pages/_app.tsx | 33 - pages/_document.tsx | 13 - public/images/office.png | Bin 0 -> 4630639 bytes .../about/index.tsx => src/app/about/page.tsx | 23 +- {public => src/app}/favicon.ico | Bin {styles => src/app}/globals.css | 0 src/app/layout.tsx | 39 + pages/index.tsx => src/app/page.tsx | 10 +- .../index.tsx => src/app/privacy/page.tsx | 6 + src/app/providers.tsx | 12 + .../assignments/assignments.cy.tsx | 2 +- .../components}/assignments/assignments.json | 0 .../components}/assignments/index.tsx | 16 +- .../components}/footer/index.tsx | 10 +- .../components}/icons/email.tsx | 0 src/components/icons/index.tsx | 58 + .../components}/icons/underline.tsx | 0 .../components}/landingPage/index.tsx | 6 +- .../components}/navbar/icons.tsx | 0 .../components}/navbar/index.tsx | 18 +- .../components}/navbar/navbar.cy.tsx | 4 +- src/components/profile/card.tsx | 63 + src/components/profile/index.tsx | 46 + .../components}/projects/arrow.tsx | 0 .../components}/projects/carousel.cy.tsx | 3 +- .../components}/projects/carousel.tsx | 0 .../components}/projects/dots.tsx | 0 .../components}/projects/index.tsx | 4 +- .../components}/projects/projects.json | 2 +- .../components}/projects/slider.tsx | 0 .../components}/projects/video.cy.tsx | 2 +- .../components}/skills/icons.tsx | 0 .../components}/skills/index.tsx | 4 +- .../components}/skills/skills.cy.tsx | 2 +- .../components}/skills/tailwind-classes.ts | 0 tailwind.config.js | 2 +- tsconfig.json | 12 +- yarn.lock | 1554 ++++++++++------- 43 files changed, 1272 insertions(+), 852 deletions(-) delete mode 100644 components/profile/profile.tsx delete mode 100644 pages/_app.tsx delete mode 100644 pages/_document.tsx create mode 100644 public/images/office.png rename pages/about/index.tsx => src/app/about/page.tsx (57%) rename {public => src/app}/favicon.ico (100%) rename {styles => src/app}/globals.css (100%) create mode 100644 src/app/layout.tsx rename pages/index.tsx => src/app/page.tsx (52%) rename pages/privacy/index.tsx => src/app/privacy/page.tsx (99%) create mode 100644 src/app/providers.tsx rename {components => src/components}/assignments/assignments.cy.tsx (93%) rename {components => src/components}/assignments/assignments.json (100%) rename {components => src/components}/assignments/index.tsx (90%) rename {components => src/components}/footer/index.tsx (93%) rename {components => src/components}/icons/email.tsx (100%) create mode 100644 src/components/icons/index.tsx rename {components => src/components}/icons/underline.tsx (100%) rename {components => src/components}/landingPage/index.tsx (95%) rename {components => src/components}/navbar/icons.tsx (100%) rename {components => src/components}/navbar/index.tsx (89%) rename {components => src/components}/navbar/navbar.cy.tsx (98%) create mode 100644 src/components/profile/card.tsx create mode 100644 src/components/profile/index.tsx rename {components => src/components}/projects/arrow.tsx (100%) rename {components => src/components}/projects/carousel.cy.tsx (99%) rename {components => src/components}/projects/carousel.tsx (100%) rename {components => src/components}/projects/dots.tsx (100%) rename {components => src/components}/projects/index.tsx (99%) rename {components => src/components}/projects/projects.json (99%) rename {components => src/components}/projects/slider.tsx (100%) rename {components => src/components}/projects/video.cy.tsx (98%) rename {components => src/components}/skills/icons.tsx (100%) rename {components => src/components}/skills/index.tsx (98%) rename {components => src/components}/skills/skills.cy.tsx (99%) rename {components => src/components}/skills/tailwind-classes.ts (100%) diff --git a/.eslintrc.json b/.eslintrc.json index bffb357..8c66df9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": "next/core-web-vitals" -} + "extends": [ + "next", + "next/core-web-vitals" + ] +} \ No newline at end of file diff --git a/.github/workflows/cypress-tests.yml b/.github/workflows/cypress-tests.yml index 6b37c08..3c5cacd 100644 --- a/.github/workflows/cypress-tests.yml +++ b/.github/workflows/cypress-tests.yml @@ -70,7 +70,7 @@ jobs: COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}} component: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: install strategy: @@ -90,10 +90,6 @@ jobs: # Uses the official Cypress GitHub action https://github.com/cypress-io/github-action uses: cypress-io/github-action@v5 with: - # Starts web server for E2E tests - replace with your own server invocation - # https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server - start: yarn start - wait-on: "http://localhost:3000" # Waits for above # Records to Cypress Cloud # https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record record: true diff --git a/README.md b/README.md index 4004c9d..1f4576e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ - Image of hero section for portfolio website. Heading: Developing Solutions. Subheading: Hi, I am an aspiring Web Developer look fo rmy first real job experience (smiling face emoji). On the right side of the hero section there is an isometric home office with a computer desk, lamps and plants, in the style of 2d game art, navy and blue + Image of hero section for portfolio website. Heading: Developing Solutions. Subheading: Hi, I am an aspiring Web Developer. On the right side of the hero section there is an isometric home office with a computer desk, lamps and plants, in the style of 2d game art, navy and blue

diff --git a/components/profile/profile.tsx b/components/profile/profile.tsx deleted file mode 100644 index cecd39b..0000000 --- a/components/profile/profile.tsx +++ /dev/null @@ -1,153 +0,0 @@ -import { EMailIcon } from "components/icons/email"; -import { motion } from "framer-motion"; -import Image from "next/image"; -import Link from "next/link"; - -export const Profile = () => { - return ( -
- -
-
-
- Profile Picture -
-

Niklas Fischer

-
-

Web Developer

-
-
- - - - - - - - - - - - -
-
-
-

About me

-

- Hello, I'm Niklas, a passionate front-end developer with a strong focus on creating intuitive and - engaging user experiences. -

-

- I specialize in working with modern web technologies such as TypeScript, React, Tailwind and Next.js. -

-

- I've delivered numerous projects, including{" "} - - open-source initiatives - {" "} - and{" "} - - customized solutions - {" "} - for companies. -

-

- Currently, I am pursuing a degree in business economics with a specialization in digital transformation. -

-
-
-
- ); -}; - -const GitHubIcon = () => { - return ( - - - - ); -}; - -const StackoverflowIcon = () => { - return ( - - - - - ); -}; - -const LinkedInIcon = () => { - return ( - - - - ); -}; diff --git a/package.json b/package.json index 3a6f2d1..8d613f8 100644 --- a/package.json +++ b/package.json @@ -14,22 +14,22 @@ "@types/react-dom": "18.2.7", "@vercel/analytics": "^1.0.1", "cypress-real-events": "^1.9.1", - "eslint": "8.45.0", - "eslint-config-next": "13.4.12", + "eslint": "8.55.0", + "eslint-config-next": "14.0.3", "framer-motion": "^10.13.1", - "next": "13.4.10", + "next": "13.5.6", "next-themes": "^0.2.1", "react": "18.2.0", "react-dom": "18.2.0", "react-use-measure": "^2.1.1", - "sharp": "^0.32.4", + "sharp": "^0.33.0", "tailwind-merge": "^1.14.0", - "typescript": "5.1.6" + "typescript": "5.3.3" }, "devDependencies": { "@tailwindcss/typography": "^0.5.9", "autoprefixer": "^10.4.14", - "cypress": "^12.17.2", + "cypress": "13.5.1", "postcss": "^8.4.27", "tailwindcss": "^3.3.3" } diff --git a/pages/_app.tsx b/pages/_app.tsx deleted file mode 100644 index 08e8687..0000000 --- a/pages/_app.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import type { AppProps } from "next/app"; -import { ThemeProvider } from "next-themes"; -import Head from "next/head"; -import { Analytics } from "@vercel/analytics/react"; - -import { Navbar } from "components/navbar"; -import { Footer } from "components/footer"; - -import "styles/globals.css"; -import { MotionConfig } from "framer-motion"; - -export default function App({ Component, pageProps }: AppProps) { - return ( - <> - - - - - - Niklas Fischer - - - - - - -