Skip to content

Commit

Permalink
refactor(data): πŸ‘· objects into data files (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
krsiakdaniel authored Dec 14, 2024
1 parent a1975fa commit 5151557
Show file tree
Hide file tree
Showing 32 changed files with 449 additions and 432 deletions.
2 changes: 1 addition & 1 deletion app/personal-projects/cryptomania/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import ProjectPageLayout from '@/components/layout/projectPage/ProjectPageLayout'
import { sections } from '@/data/projects/personal/cryptoMania'
import { projectsPersonalReact } from '@/data/projects/personal/projectsOverview'
import { projectsPersonalReact } from '@/data/projects/personal/projectsOverview/personalReact'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_PERSONAL_PROJECTS } from '@/utils/constants'
import { BreadCrumbsType } from '@/utils/types'
Expand Down
2 changes: 1 addition & 1 deletion app/personal-projects/krsiak/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import ProjectPageLayout from '@/components/layout/projectPage/ProjectPageLayout'
import { sections } from '@/data/projects/personal/krsiak'
import { projectsPersonalNext } from '@/data/projects/personal/projectsOverview'
import { projectsPersonalNext } from '@/data/projects/personal/projectsOverview/personalNext'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_PERSONAL_PROJECTS } from '@/utils/constants'
import { BreadCrumbsType } from '@/utils/types'
Expand Down
54 changes: 1 addition & 53 deletions app/status-page/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import PageContainer from '@/components/layout/PageContainer'
import Heading1 from '@/components/shared/Heading1'
import { statusBadges } from '@/data/statusPage'
import { TEXT } from '@/localization/texts_en'
import { Metadata } from 'next'
import Image from 'next/image'
Expand All @@ -22,59 +23,6 @@ export const metadata: Metadata = {
],
}

interface StatusBadge {
name: string
src: string
alt: string
width: number
height: number
}

const statusBadges: StatusBadge[] = [
{
name: 'Jest Tests',
src: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/jest.yml/badge.svg',
alt: 'Jest Tests',
width: 132,
height: 20,
},
{
name: 'Playwright Tests',
src: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/playwright.yml/badge.svg',
alt: 'Playwright Tests',
width: 167,
height: 20,
},
{
name: 'CodeQL',
src: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/github-code-scanning/codeql/badge.svg',
alt: 'CodeQL',
width: 120,
height: 40,
},
{
name: 'Code Quality',
src: 'https://app.codacy.com/project/badge/Grade/eaa72f9b0a7242ae9179b0dfdd58faf5',
alt: 'Code Quality',
width: 120,
height: 20,
},
{
name: 'Dependabot',
src: 'https://img.shields.io/badge/Dependabot-Enabled-green',
alt: 'Dependabot',
width: 130,
height: 20,
},
{
name: 'Netlify',
src: 'https://api.netlify.com/api/v1/badges/eb322254-0169-4941-9416-3806b0bd5be6/deploy-status',
alt: 'Netlify',
width: 118,
height: 20,
},
]

const StatusPage = () => {
return (
<PageContainer id="status-page">
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/groupon/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { sections } from '@/data/projects/work/groupon'
import { projectsWorkQA } from '@/data/projects/work/projectsOverview'
import { projectsWorkQA } from '@/data/projects/work/projectsOverview/workQA'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
import { BreadCrumbsType } from '@/utils/types'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/komercni-banka/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { sections } from '@/data/projects/work/komercniBanka'
import { projectsWorkReact } from '@/data/projects/work/projectsOverview'
import { projectsWorkReact } from '@/data/projects/work/projectsOverview/workReact'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
import { BreadCrumbsType } from '@/utils/types'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/kooperativa/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { sections } from '@/data/projects/work/kooperativa'
import { projectsWorkReact } from '@/data/projects/work/projectsOverview'
import { projectsWorkReact } from '@/data/projects/work/projectsOverview/workReact'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
import { BreadCrumbsType } from '@/utils/types'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/moravia/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { sections } from '@/data/projects/work/moravia'
import { projectsWorkLocalization } from '@/data/projects/work/projectsOverview'
import { projectsWorkLocalization } from '@/data/projects/work/projectsOverview/workLocalization'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
import { BreadCrumbsType } from '@/utils/types'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/smartsupp-dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { projectsWorkReact } from '@/data/projects/work/projectsOverview'
import { projectsWorkReact } from '@/data/projects/work/projectsOverview/workReact'
import { sections } from '@/data/projects/work/smartsuppDashboard'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/smartsupp-help/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { projectsWorkWordPress } from '@/data/projects/work/projectsOverview'
import { projectsWorkWordPress } from '@/data/projects/work/projectsOverview/workWordpress'
import { sections } from '@/data/projects/work/smartsuppHelp'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/smartsupp-web/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import NextPageNavigation from '@/components/NextPageNavigation'
import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/ProjectPageLayoutWrapper'
import { projectsWorkFrontEnd } from '@/data/projects/work/projectsOverview'
import { projectsWorkFrontEnd } from '@/data/projects/work/projectsOverview/workFrontEnd'
import { sections } from '@/data/projects/work/smartsuppWeb'
import { TEXT } from '@/localization/texts_en'
import { ID, PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants'
Expand Down
4 changes: 2 additions & 2 deletions components/homepage/MyMindset.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mindsetInfo } from '@/data/whatido'
import Heading2 from '../shared/Heading2'
import Heading2 from '@/components/shared/Heading2'
import { mindsetInfo } from '@/data/whatido/mindsetInfo'

const MyMindset = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/homepage/Skills.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DividerWithText from '@/components/shared/DividerWithText'
import { iconsSkills1, iconsSkills2, iconsSkills3, iconsSkills4 } from '@/data/skills/skills-main'
import { iconsSkills1, iconsSkills2, iconsSkills3, iconsSkills4 } from '@/data/skills/skillsMain'
import { ID } from '@/utils/constants'
import SkillsIconGroup from './SkillsIconGroup'

Expand Down
4 changes: 2 additions & 2 deletions components/homepage/SkillsForCompany.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { skillsInfo } from '@/data/whatido'
import Heading2 from '../shared/Heading2'
import Heading2 from '@/components/shared/Heading2'
import { skillsInfo } from '@/data/whatido/skillsInfo'

const SkillsForCompany = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/homepage/SkillsMain.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DividerWithText from '@/components/shared/DividerWithText'
import SkillsCard from '@/components/shared/SkillsCard'
import { skills } from '@/data/skills/skills-main'
import { skills } from '@/data/skills/skillsMain'

const SkillsMain = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/homepage/WhatIDoMindset.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DividerWithText from '../shared/DividerWithText'
import DividerWithText from '@/components/shared/DividerWithText'
import MyMindset from './MyMindset'
import SkillsForCompany from './SkillsForCompany'

Expand Down
2 changes: 1 addition & 1 deletion components/resume/ResumeInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Heading1 from '@/components/shared/Heading1'
import HighlightedText from '@/components/shared/HighlightedText'
import { TEXT } from '@/localization/texts_en'
import Heading1 from '../shared/Heading1'

const ResumeInfo = () => {
return (
Expand Down
2 changes: 2 additions & 0 deletions data/projects/personal/projectsOverview/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './personalNext'
export * from './personalReact'
49 changes: 49 additions & 0 deletions data/projects/personal/projectsOverview/personalNext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { iconsSkillsProjectsPersonalKrsiak } from '@/data/skills/skillsProjectsPersonal'
import { Project } from '@/utils/interfaces'

// project images
import krsiak1 from '@/public/images/projects-personal/krsiak/krsiak-1-light.png'
import krsiak2 from '@/public/images/projects-personal/krsiak/krsiak-2-light.png'
import krsiak3 from '@/public/images/projects-personal/krsiak/krsiak-3-light.png'
import krsiak4 from '@/public/images/projects-personal/krsiak/krsiak-4-light.png'
import krsiak5 from '@/public/images/projects-personal/krsiak/krsiak-5-light.png'
import krsiakThumb from '@/public/images/projects-personal/krsiak/krsiak-thumb-light-600.webp'

import { PAGES_URL, PROJECT_ID } from '@/utils/constants'

export const projectsPersonalNext: Project[] = [
{
id: PROJECT_ID.personal.krsiak,
isFeatured: true,
image: krsiakThumb.src,
imageShowcase: [
{ id: 1, src: krsiak1.src },
{ id: 2, src: krsiak2.src },
{ id: 3, src: krsiak3.src },
{ id: 4, src: krsiak4.src },
{ id: 5, src: krsiak5.src },
],
title: 'πŸ‘¨β€πŸ’» Portfolio Website',
company: 'Personal project',
role: 'Front End - Next.js',
description:
'My personal portfolio website to showcase my work and skills. The\u00A0latest iteration of what I know and can code as React Developer.',
mySkillsIcons: iconsSkillsProjectsPersonalKrsiak,
skillsOverview: [
{
id: 1,
description: 'Frontend',
skillsList: ['JavaScript', 'TypeScript', 'React', 'Next.js', 'Tailwind CSS'],
},
{
id: 2,
description: 'Other',
skillsList: ['JEST', 'Playwright', 'GitHub Actions', 'Netlify'],
},
],
linkText: 'Project details',
projectLinks: [{ urlText: 'Website β†’', url: 'https://krsiak.cz/' }],
linkGitHub: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz',
linkProjectPage: PAGES_URL.personal.krsiak,
},
]
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import {
iconsSkillsProjectsPersonalCryptomania,
iconsSkillsProjectsPersonalKrsiak,
} from '@/data/skills/skills-projects-personal'
import { iconsSkillsProjectsPersonalCryptomania } from '@/data/skills/skillsProjectsPersonal'
import { Project } from '@/utils/interfaces'

// project images
import krsiak1 from '@/public/images/projects-personal/krsiak/krsiak-1-light.png'
import krsiak2 from '@/public/images/projects-personal/krsiak/krsiak-2-light.png'
import krsiak3 from '@/public/images/projects-personal/krsiak/krsiak-3-light.png'
import krsiak4 from '@/public/images/projects-personal/krsiak/krsiak-4-light.png'
import krsiak5 from '@/public/images/projects-personal/krsiak/krsiak-5-light.png'
import krsiakThumb from '@/public/images/projects-personal/krsiak/krsiak-thumb-light-600.webp'

import cryptomania4 from '@/public/images/projects-personal/cryptomania/cryptomania-1-dark.png'
import cryptomania1 from '@/public/images/projects-personal/cryptomania/cryptomania-1-light.png'
import cryptomania5 from '@/public/images/projects-personal/cryptomania/cryptomania-2-dark.png'
Expand All @@ -22,43 +12,6 @@ import cryptomaniaThumb from '@/public/images/projects-personal/cryptomania/cryp

import { PAGES_URL, PROJECT_ID } from '@/utils/constants'

export const projectsPersonalNext: Project[] = [
{
id: PROJECT_ID.personal.krsiak,
isFeatured: true,
image: krsiakThumb.src,
imageShowcase: [
{ id: 1, src: krsiak1.src },
{ id: 2, src: krsiak2.src },
{ id: 3, src: krsiak3.src },
{ id: 4, src: krsiak4.src },
{ id: 5, src: krsiak5.src },
],
title: 'πŸ‘¨β€πŸ’» Portfolio Website',
company: 'Personal project',
role: 'Front End - Next.js',
description:
'My personal portfolio website to showcase my work and skills. The\u00A0latest iteration of what I know and can code as React Developer.',
mySkillsIcons: iconsSkillsProjectsPersonalKrsiak,
skillsOverview: [
{
id: 1,
description: 'Frontend',
skillsList: ['JavaScript', 'TypeScript', 'React', 'Next.js', 'Tailwind CSS'],
},
{
id: 2,
description: 'Other',
skillsList: ['JEST', 'Playwright', 'GitHub Actions', 'Netlify'],
},
],
linkText: 'Project details',
projectLinks: [{ urlText: 'Website β†’', url: 'https://krsiak.cz/' }],
linkGitHub: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz',
linkProjectPage: PAGES_URL.personal.krsiak,
},
]

export const projectsPersonalReact: Project[] = [
{
id: PROJECT_ID.personal.cryptoMania,
Expand Down
Loading

0 comments on commit 5151557

Please sign in to comment.