Skip to content

Commit

Permalink
25 move project to nextjs (#28)
Browse files Browse the repository at this point in the history
* Move the whole project to Next

* Fix built files

* Add description to links and fix navbar

* Add aria label and custom loader

* Move picture to AWS

* Fix path for picture

* Remove picture for test

* Reduce picture size

* Remove font and improve metadata

* Move picture to AWS

* Serve static picture

* Change some next.config.js settings

* Return to the previous settings
  • Loading branch information
alex-dishen authored Jul 13, 2023
1 parent 6811dce commit 277cc42
Show file tree
Hide file tree
Showing 59 changed files with 113 additions and 188 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Demo

🔥 [Live Demo](https://github.com/alex-dishen/portfolio)
🔥 [Live Demo](https://alex-dishen.web.app)

## Built with

Expand Down
15 changes: 0 additions & 15 deletions app/about/animations.ts

This file was deleted.

40 changes: 20 additions & 20 deletions app/about/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { nanoid } from 'nanoid'
import AWS from 'src/assets/images/languages/aws.svg'
import CSS from 'src/assets/images/languages/css3.svg'
import GIT from 'src/assets/images/languages/git.svg'
import GitHub from 'src/assets/images/languages/github.svg'
import GitLab from 'src/assets/images/languages/gitlab.svg'
import HTML from 'src/assets/images/languages/html5.svg'
import JavaScript from 'src/assets/images/languages/javascript.svg'
import NPM from 'src/assets/images/languages/npm.svg'
import React from 'src/assets/images/languages/react.svg'
import Redux from 'src/assets/images/languages/redux.svg'
import SASS from 'src/assets/images/languages/sass.svg'
import StyledComponents from 'src/assets/images/languages/styled-components.svg'
import TypeScript from 'src/assets/images/languages/typescript.svg'
import Vite from 'src/assets/images/languages/vite.svg'
import Figma from 'src/assets/images/languages/figma.svg'
import Next from 'src/assets/images/languages/next.svg'
import Postman from 'src/assets/images/languages/postman.svg'
import Node from 'src/assets/images/languages/nodejs.svg'
import Express from 'src/assets/images/languages/express.svg'
import Postgres from 'src/assets/images/languages/postgres.svg'
import AWS from 'src/assets/languages/aws.svg'
import CSS from 'src/assets/languages/css3.svg'
import GIT from 'src/assets/languages/git.svg'
import GitHub from 'src/assets/languages/github.svg'
import GitLab from 'src/assets/languages/gitlab.svg'
import HTML from 'src/assets/languages/html5.svg'
import JavaScript from 'src/assets/languages/javascript.svg'
import NPM from 'src/assets/languages/npm.svg'
import React from 'src/assets/languages/react.svg'
import Redux from 'src/assets/languages/redux.svg'
import SASS from 'src/assets/languages/sass.svg'
import StyledComponents from 'src/assets/languages/styled-components.svg'
import TypeScript from 'src/assets/languages/typescript.svg'
import Vite from 'src/assets/languages/vite.svg'
import Figma from 'src/assets/languages/figma.svg'
import Next from 'src/assets/languages/next.svg'
import Postman from 'src/assets/languages/postman.svg'
import Node from 'src/assets/languages/nodejs.svg'
import Express from 'src/assets/languages/express.svg'
import Postgres from 'src/assets/languages/postgres.svg'

export const front = [
{ id: nanoid(), name: 'HTML', picture: <HTML /> },
Expand Down
4 changes: 2 additions & 2 deletions app/about/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled, { css } from 'styled-components'
import { showElement, moveUp } from './animations'
import { AnimationType } from './types'
import type { AnimationType } from 'src/types'
import { showElement, moveUp } from 'src/constants/animations'

export const StyledAbout = styled.div`
display: flex;
Expand Down
3 changes: 0 additions & 3 deletions app/about/types.ts

This file was deleted.

32 changes: 0 additions & 32 deletions app/contact/animations.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/contact/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components'
import { topToBottom, scale, showElement } from './animations'
import { topToBottom, scale, showElement } from 'src/constants/animations'

export const StyledContact = styled.div`
flex: 1;
Expand Down
13 changes: 9 additions & 4 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { ReactNode } from 'react'
import { Metadata } from 'next'
import { Manrope } from 'next/font/google'
import StyledComponentsRegistry from '../lib/registry'
import '../src/styles/normalize.css'
import '../src/styles/font.css'
import 'src/styles/normalize.css'
import Navbar from 'src/components/Navbar'

const manrope = Manrope({ subsets: ['latin'], display: 'swap' })

export const metadata: Metadata = {
title: 'Oleksandr Didyshen',
description: '...',
description:
"I'm a Software Engineer with 22+ finished projects. You are welcome to see my creations",
keywords:
'Portfolio, Front-End Developer, Full-Stack Developer, React, Next.js, TypeScript, Node.js, Express, PostgreSQL',
}

const RootLayout = ({ children }: { children: ReactNode }) => {
return (
<html lang="en">
<html lang="en" className={manrope.className}>
<body>
<StyledComponentsRegistry>
<Navbar />
Expand Down
19 changes: 5 additions & 14 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import Image, { ImageLoaderProps } from 'next/image'
import Image from 'next/image'
import { Paths } from 'src/constants'
import { options } from './constants'
import RightArrow from 'src/assets/icons/arrow-right.svg'
import {
Expand All @@ -18,16 +19,6 @@ import {
StyledLink,
} from './styles'

const imageLoader = ({
src,
width,
quality,
}: {
src: string
width: number
quality?: number
}) => `${src}?w=${width}&q=${quality}`

const Home = () => (
<StyledHome>
<Welcome>
Expand All @@ -39,8 +30,8 @@ const Home = () => (
alt="Oleksandr in black shirt"
width={100}
height={100}
quality={100}
loader={imageLoader}
priority
unoptimized
/>
</ImageHolder>
<Name>Oleksandr</Name>
Expand All @@ -66,7 +57,7 @@ const Home = () => (
))}
</NavigationSection>
<Text>
Never Mind -- <StyledLink href="/contact">Just Say Hi</StyledLink>
Never Mind - <StyledLink href={Paths.CONTACT}>Just Say Hi</StyledLink>
</Text>
</StyledHome>
)
Expand Down
8 changes: 0 additions & 8 deletions app/projects/animations.ts

This file was deleted.

4 changes: 2 additions & 2 deletions app/projects/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled, { css } from 'styled-components'
import { AnimationType } from './types'
import { moveUp } from './animations'
import type { AnimationType } from 'src/types'
import { moveUp } from 'src/constants/animations'

export const StyledProjects = styled.main`
width: min(850px, 90vw);
Expand Down
3 changes: 0 additions & 3 deletions app/projects/types.ts

This file was deleted.

13 changes: 7 additions & 6 deletions app/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import styled, { css } from 'styled-components'
import Link from 'next/link'
import { OptionTypes } from './types'
import type { OptionTypes } from 'src/types'
import {
styledHomeAnimation,
greetingAnimation,
imageAnimation,
nameAnimation,
showElement,
} from './animations'
showOpacity,
} from 'src/constants/animations'

export const StyledHome = styled.main`
position: relative;
Expand Down Expand Up @@ -132,7 +132,7 @@ export const Name = styled(Greeting)`
export const Position = styled(Greeting)`
z-index: 1;
transform: translateY(0px) translateX(0px) scale(1);
animation: ${showElement} 1.4s ease-out forwards 2.1s;
animation: ${showOpacity} 1.4s ease-out forwards 2.1s;
`

export const NavigationSection = styled.div`
Expand All @@ -158,7 +158,7 @@ export const Option = styled(Link)<OptionTypes>(
opacity: 0;
transition: 0.3s;
animation: ${showElement} 0.7s ease-out forwards ${2.5 + (index * 3) / 10}s;
animation: ${showOpacity} 0.7s ease-out forwards ${2.5 + (index * 3) / 10}s;
&:hover {
color: white;
Expand Down Expand Up @@ -210,7 +210,7 @@ export const Text = styled.div`
display: flex;
font-size: 13px;
opacity: 0;
animation: ${showElement} 0.5s ease-out forwards 3.45s;
animation: ${showOpacity} 0.5s ease-out forwards 3.45s;
a {
position: relative;
Expand All @@ -228,6 +228,7 @@ export const Text = styled.div`

export const StyledLink = styled(Link)`
position: relative;
margin-left: 2px;
cursor: pointer;
transition: text-shadow 0.5s;
Expand Down
3 changes: 0 additions & 3 deletions app/types.ts

This file was deleted.

5 changes: 1 addition & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const nextConfig = {
trailingSlash: true,
output: 'export',
image: {
loader: 'custom'
},
trailingSlash: true,
webpack(config) {
const fileLoaderRule = config.module.rules.find(rule =>
rule.test?.test?.('.svg'),
Expand Down
Binary file modified public/black-shirt.webp
Binary file not shown.
Binary file added public/home-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/fonts/Manrope-Bold.ttf
Binary file not shown.
Binary file removed src/assets/fonts/Manrope-ExtraBold.ttf
Binary file not shown.
Binary file removed src/assets/fonts/Manrope-ExtraLight.ttf
Binary file not shown.
Binary file removed src/assets/fonts/Manrope-Light.ttf
Binary file not shown.
Binary file removed src/assets/fonts/Manrope-Medium.ttf
Binary file not shown.
Binary file removed src/assets/fonts/Manrope-Regular.ttf
Binary file not shown.
Binary file removed src/assets/fonts/Manrope-SemiBold.ttf
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/components/Carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Image from 'next/image'
import Swipi from 'swipi'
import ChevronLeft from 'src/assets/icons/chevron-left.svg'
import ChevronRight from 'src/assets/icons/chevron-right.svg'
import { CarouselProps } from 'src/components/Carousel/types'
import type { CarouselProps } from 'src/components/Carousel/types'
import { CarouselWrapper, ImageHolder } from 'src/components/Carousel/styles'

const Carousel = ({ pictures, id, isVisible, name }: CarouselProps) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Carousel/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled, { css } from 'styled-components'
import { CarouselWrapperTypes } from 'src/components/Carousel/types'
import type { CarouselWrapperTypes } from 'src/components/Carousel/types'
import { moveUp } from 'src/components/Carousel/animations'

export const CarouselWrapper = styled.div<CarouselWrapperTypes>(
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dots/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DotsWrapper, Dot } from 'src/components/Dots/styles'
import { DotsProps } from 'src/components/Dots/types'
import type { DotsProps } from 'src/components/Dots/types'

const Dots = ({ isVisible }: DotsProps) => (
<DotsWrapper isVisible={isVisible}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dots/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled, { css } from 'styled-components'
import { DotsWrapperTypes } from 'src/components/Dots/types'
import type { DotsWrapperTypes } from 'src/components/Dots/types'
import { moveUp } from 'src/components/Dots/animations'

export const DotsWrapper = styled.div<DotsWrapperTypes>(
Expand Down
2 changes: 1 addition & 1 deletion src/components/DownloadButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DownloadButtonProps } from 'src/components/DownloadButton/types'
import type { DownloadButtonProps } from 'src/components/DownloadButton/types'
import {
DownloadButtonWrapper,
Info,
Expand Down
4 changes: 2 additions & 2 deletions src/components/DownloadButton/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled, { css } from 'styled-components'
import { moveUp } from 'app/projects/animations'
import { DownloadButtonWrapperT } from 'src/components/DownloadButton/types'
import { moveUp } from 'src/constants/animations'
import type { DownloadButtonWrapperT } from 'src/components/DownloadButton/types'

export const DownloadButtonWrapper = styled.a<DownloadButtonWrapperT>(
({ isVisible }) => css`
Expand Down
3 changes: 1 addition & 2 deletions src/components/Navbar/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled, { css } from 'styled-components'
import Link from 'next/link'
import {
import type {
ImageHolderTypes,
StyledNavbarTypes,
} from 'src/components/Navbar/types'
Expand Down Expand Up @@ -56,7 +56,6 @@ export const LinkHolder = styled.div<ImageHolderTypes>(
svg {
height: 26px;
width: 26px;
transition: 0.4s;
}
&:hover {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Summary/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { SummaryProps } from 'src/components/Summary/types'
import type { SummaryProps } from 'src/components/Summary/types'
import { Text, SVGHolder } from 'src/components/Summary/styles'
import ChevronUp from 'src/assets/icons/chevron-up.svg'
import ChevronDown from 'src/assets/icons/chevron-down.svg'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Summary/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled, { css } from 'styled-components'
import { TextTypes } from 'src/components/Summary/types'
import type { TextTypes } from 'src/components/Summary/types'

export const Text = styled.p<TextTypes>(
({ isShowSummary }) => css`
Expand Down
Loading

0 comments on commit 277cc42

Please sign in to comment.