From 906691bf152c0f96bbbb2081bb95f69dea612e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Jaro=C5=A1?= Date: Wed, 6 Jul 2022 16:19:59 +0200 Subject: [PATCH] DEV;Update mobile view and add Jenkinsfile --- .eslintrc.json | 5 +- Jenkinsfile | 9 +++ README.md | 29 +--------- docker/Dockerfile | 31 +++++++++++ next.config.js | 11 +++- package-lock.json | 21 ++++++- package.json | 8 ++- public/robots.txt | 2 + public/sitemap.xml | 5 ++ sonar-project.properties | 5 ++ src/components/AboutMe.tsx | 39 +++++-------- src/components/Contact.tsx | 102 ++++++++++++---------------------- src/components/Footer.tsx | 33 +++++++++++ src/components/FullStory.tsx | 24 ++------ src/components/MySection.tsx | 36 ++++++++++++ src/components/MyTitle.tsx | 12 ++-- src/components/Services.tsx | 84 ++++++++++++---------------- src/constants/projects.ts | 4 +- src/constants/skills.ts | 20 ++++++- src/pages/_app.tsx | 9 +-- src/pages/index.tsx | 27 ++++++++- src/styles/plugins/mytitle.js | 1 + 22 files changed, 305 insertions(+), 212 deletions(-) create mode 100644 Jenkinsfile create mode 100644 docker/Dockerfile create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml create mode 100644 sonar-project.properties create mode 100644 src/components/Footer.tsx create mode 100644 src/components/MySection.tsx diff --git a/.eslintrc.json b/.eslintrc.json index bffb357..4f51e35 100755 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": "next/core-web-vitals" + "extends": [ + "next/core-web-vitals", + "eslint:recommended" + ] } diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..cbf9411 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,9 @@ +@Library('jenkins-lib') +import FrontendBuild + +FrontendBuild({ + name = 'portfolio' + port = "92:3000" + runSonar = true + appType = "nextjs" +}) diff --git a/README.md b/README.md index c87e042..c4c9d80 100755 --- a/README.md +++ b/README.md @@ -1,34 +1,7 @@ -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). - ## 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.tsx`. 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.ts`. - -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. +``` \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..c06291c --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,31 @@ +# Install dependencies only when needed +FROM node:16-alpine +RUN apk add --no-cache libc6-compat + +WORKDIR /app + +ENV NODE_ENV production +ENV NEXT_TELEMETRY_DISABLED 1 + +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs + +RUN ls -a + +COPY .next/ .next/ +COPY public/ public/ +COPY node_modules/ node_modules/ +COPY package.json package.json + +RUN ls -a +RUN ls -a .next + +RUN chown -R nextjs:nodejs .next + +USER nextjs + +EXPOSE 3000 + +ENV PORT 3000 + +CMD ["node", "server.js"] \ No newline at end of file diff --git a/next.config.js b/next.config.js index a843cbe..55612aa 100755 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,11 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, -} + reactStrictMode: true, + i18n: { + locales: ["cs"], + defaultLocale: "cs", + }, + output: "standalone", +}; -module.exports = nextConfig +module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 1000126..4d22bec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,19 @@ { "name": "portfolio", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "portfolio", - "version": "0.1.0", + "version": "0.1.1", "dependencies": { "@reduxjs/toolkit": "1.8.0", "@treejs/components": "0.17.0", "@treejs/constants": "0.17.0", "@treejs/styles": "0.17.0", "next": "12.2.0", + "next-seo": "^5.4.0", "ramda": "^0.27.0", "react": "17.0.2", "react-dom": "17.0.2", @@ -2589,6 +2590,16 @@ } } }, + "node_modules/next-seo": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.4.0.tgz", + "integrity": "sha512-R9DhajPwJnR/lsF2hZ8cN8uqr5CVITsRrCG1AF5+ufcaybKYOvnH8sH9MaH4/hpkps3PQ9H71S7J7SPYixAYzQ==", + "peerDependencies": { + "next": "^8.1.1-canary.54 || >=9.0.0", + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.5", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", @@ -5560,6 +5571,12 @@ } } }, + "next-seo": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.4.0.tgz", + "integrity": "sha512-R9DhajPwJnR/lsF2hZ8cN8uqr5CVITsRrCG1AF5+ufcaybKYOvnH8sH9MaH4/hpkps3PQ9H71S7J7SPYixAYzQ==", + "requires": {} + }, "node-releases": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", diff --git a/package.json b/package.json index 2770360..146a005 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,13 @@ { "name": "portfolio", - "version": "0.1.0", + "version": "0.1.1", "private": true, "scripts": { + "ci:lint": "eslint .", + "ci:build": "npm run build", + "ci:test": "echo 1", + "ci:test-e2e": "echo 1", + "ci:increase-version": "npm version --git-tag-version=false", "dev": "next dev", "build": "next build", "start": "next start", @@ -14,6 +19,7 @@ "@treejs/constants": "0.17.0", "@treejs/styles": "0.17.0", "next": "12.2.0", + "next-seo": "^5.4.0", "ramda": "^0.27.0", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..14267e9 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..86f6e12 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,5 @@ + + +https://romanjaros.cz + + \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..2ee868e --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=PORTFOLIO +sonar.projectName=portfolio +sonar.inclusions=src/** +sonar.coverage.exclusions=**/__tests__/** +sonar.javascript.lcov.reportPaths=temp/jest/lcov.info \ No newline at end of file diff --git a/src/components/AboutMe.tsx b/src/components/AboutMe.tsx index 94ff465..3209d5e 100644 --- a/src/components/AboutMe.tsx +++ b/src/components/AboutMe.tsx @@ -1,7 +1,6 @@ -import { Grid, GridCol } from "@treejs/components/Grid"; -import Image from "next/image"; import { FC } from "react"; import MyTitle from "../components/MyTitle"; +import MySection from "./MySection"; const AboutMe: FC = () => { const age = Math.floor( @@ -13,30 +12,18 @@ const AboutMe: FC = () => { ); return ( - - - me - - - -
- Jmenuji se Roman Jaroš. -
-
-

- Je mi {age} let a již {work} let se profesionálně - věnuji vývoji a správě webových aplikací ☺️ . -

-

Od roku 2020 pracuji pouze na IČO.

-
-
-
+ + +
+ Jmenuji se Roman Jaroš. +
+
+

+ Je mi {age} let a již {work} let se profesionálně věnuji + vývoji a správě webových aplikací. Aktuálně pracuji pouze na IČO. +

+
+
); }; diff --git a/src/components/Contact.tsx b/src/components/Contact.tsx index 1bac061..f87cbf0 100644 --- a/src/components/Contact.tsx +++ b/src/components/Contact.tsx @@ -1,73 +1,45 @@ -import { Grid, GridCol } from "@treejs/components/Grid"; -import Image from "next/image"; import { FC } from "react"; +import MySection from "./MySection"; import MyTitle from "./MyTitle"; const Contact: FC = () => { - const age = Math.floor( - ((new Date() as any) - (new Date("1993-07-11") as any)) / 31557600000 - ); - - const work = Math.floor( - ((new Date() as any) - (new Date("2012-12-01") as any)) / 31557600000 - ); - return ( - - - contact - - - -
-

- Obchodní nabídky prosím zasílejte{" "} - sem. -

-

- Jiné dotazy prosím sem. -

-

-

- - LinkedIn - -

-

- - Gitea (Git) - -

-

- -

- Pokud potřebujete zadat tiket na podporu, použijte prosím{" "} - - tento formulář - - . -

-
-
-
+ + +
+

+ Obchodní nabídky prosím zasílejte{" "} + sem. +

+

+ Jiné dotazy prosím sem. +

+

+ + LinkedIn + +
+ + Gitea (Git) + +

+

+ Pokud potřebujete zadat tiket na podporu, použijte prosím{" "} + + tento formulář + + . +

+
+
); }; diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx new file mode 100644 index 0000000..0d52368 --- /dev/null +++ b/src/components/Footer.tsx @@ -0,0 +1,33 @@ +import { Grid, GridCol } from "@treejs/components/Grid"; +import { FC } from "react"; + +const Footer: FC = () => { + return ( +
+ + +

IČO 08738734

+

DIČ CZ9307111946

+
+ +

+ Bražec 50 +
+ Bochov 36471 +
+ Česká Republika +

+
+ +

+ Jsem plátce DPH. Fyzická osoba zapsaná v živnostenském + rejstříku v Karlových Varech (CZ0412) od 02.12.2019. +

+

Tento web nepoužívá cookies.

+
+
+
+ ); +}; + +export default Footer; diff --git a/src/components/FullStory.tsx b/src/components/FullStory.tsx index d60b145..9a989bd 100644 --- a/src/components/FullStory.tsx +++ b/src/components/FullStory.tsx @@ -1,8 +1,7 @@ -import { Grid, GridCol } from "@treejs/components/Grid"; -import Image from "next/image"; -import { isEmpty, isNil, map } from "ramda"; +import { isNil, map } from "ramda"; import { FC, Fragment, useMemo } from "react"; import { projects } from "../constants/projects"; +import MySection from "./MySection"; import MyTitle from "./MyTitle"; const FullStory: FC = () => { @@ -45,21 +44,10 @@ const FullStory: FC = () => { }, []); return ( - - - story - - - -
{projectsRender}
-
-
+ + +
{projectsRender}
+
); }; diff --git a/src/components/MySection.tsx b/src/components/MySection.tsx new file mode 100644 index 0000000..be3e282 --- /dev/null +++ b/src/components/MySection.tsx @@ -0,0 +1,36 @@ +import React, { FC, ReactElement } from "react"; +import { Grid, GridCol } from "@treejs/components/Grid"; +import Image from "next/image"; +import { GRID_SIZE } from "@treejs/components/Grid/types"; + +type IProps = { + iconName: string; + children: ReactElement | ReactElement[]; +}; + +const MySection: FC = ({ iconName, children }) => { + return ( + + + {iconName} + + + {children} + + + ); +}; + +export default MySection; diff --git a/src/components/MyTitle.tsx b/src/components/MyTitle.tsx index d28e3a2..2d999d7 100644 --- a/src/components/MyTitle.tsx +++ b/src/components/MyTitle.tsx @@ -10,14 +10,10 @@ type IProps = { const MyTitle: FC = ({ left, right, className }) => { return (
- - {"<"} - {left} - - - {right} - {" />"} - + {"<"} +

{left}

+

{right}

+  {"/>"}
); }; diff --git a/src/components/Services.tsx b/src/components/Services.tsx index bccf0a7..0c0f223 100644 --- a/src/components/Services.tsx +++ b/src/components/Services.tsx @@ -1,10 +1,11 @@ import { Grid, GridCol } from "@treejs/components/Grid"; -import Image from "next/image"; import { FC, useMemo } from "react"; import { skills } from "../constants/skills"; import MyTitle from "./MyTitle"; import { map } from "ramda"; import { ISkill } from "../types/skills"; +import MySection from "./MySection"; +import { GRID_SIZE } from "@treejs/components/Grid/types"; const Services: FC = () => { const renderSkills = useMemo(() => { @@ -37,54 +38,43 @@ const Services: FC = () => { }, []); return ( - - - services - - - - - - Vývoj FE - {renderSkills[0]} - - - Vývoj BE - {renderSkills[1]} - - - Další - {renderSkills[2]} - - - Správa aplikací - {renderSkills[3]} - - + + + + + Vývoj FE + {renderSkills[0]} + + + Vývoj BE + {renderSkills[1]} + + + Další + {renderSkills[2]} + + + Správa serveru + {renderSkills[3]} + + -
-
- - - - používám na projektech -
- -
- - - - hraju si a učím se -
+
+
+ + + + používám na projektech
- - + +
+ + + + hraju si a učím se +
+
+ ); }; diff --git a/src/constants/projects.ts b/src/constants/projects.ts index 81d6daf..4976834 100644 --- a/src/constants/projects.ts +++ b/src/constants/projects.ts @@ -3,11 +3,11 @@ import { IProject } from "../types/projects"; export const projects: IProject[] = [ { name: "doservislu.online", - dateFrom: "březen 2020", + dateFrom: "prosinec 2021", dateTo: "současnost", link: "http://doservisu.online", desciption: - "Tvorba frontendu veřejné aplikace pro možnost jednoduchého obsloužení zákazníka autoservisu. Z pohledu FE se jedná o sólo vývoj.", + "Tvorba frontendu aplikace pro možnost jednoduchého obsloužení zákazníka autoservisu. Z pohledu FE se jedná o sólo vývoj.", }, { name: "Vývojář FE", diff --git a/src/constants/skills.ts b/src/constants/skills.ts index ba0db14..32bd8c2 100644 --- a/src/constants/skills.ts +++ b/src/constants/skills.ts @@ -8,7 +8,7 @@ export const skills: ISkill[][] = [ level: "full", }, { - name: "Redux (i tookit)", + name: "Redux (i toolkit)", level: "full", }, { @@ -63,17 +63,29 @@ export const skills: ISkill[][] = [ name: "NPM / Yarn", level: "full", }, + { + name: "NightwatchJS", + level: "full", + }, { name: "Jenkins (CI, CD)", level: "full", }, { name: "SonarQube", + level: "full", + }, + { + name: "Designování", + level: "part", + }, + { + name: "UML", level: "part", }, ], - // App maitenence + // server maitenence [ { name: "Docker", @@ -87,5 +99,9 @@ export const skills: ISkill[][] = [ name: "Portainer", level: "part", }, + { + name: "Monitoring", + level: "part", + }, ], ]; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 1418c3a..375ef93 100755 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -6,6 +6,7 @@ import { useRouter } from "next/router"; import Skeleton from "@treejs/components/Skeleton"; import store from "../redux/store"; import { Provider } from "react-redux"; +import Footer from "../components/Footer"; function PortolioApp({ Component, pageProps }: AppProps) { const router = useRouter(); @@ -20,13 +21,7 @@ function PortolioApp({ Component, pageProps }: AppProps) { user: false, }} components={{ - footer: ( -
- IČO 08738734 | DIČ CZ9307111946 | Jsem plátce DPH. Fyzická osoba - zapsaná v živnostenském rejstříku v Karlových Varech (CZ0412) od - 02.12.2019. Tento web nepoužívá cookies. -
- ), + footer: