From f727eaaa45bdca119d6f7f4b7f65d3d782be6aad Mon Sep 17 00:00:00 2001 From: Gianmarco Pettinato Date: Sun, 10 Oct 2021 21:44:53 +0200 Subject: [PATCH] almost done --- default.conf | 18 +++ docker-compose.yml | 23 +++ dockerfile | 6 + package-lock.json | 96 ++++++++++- package.json | 4 +- src/app.html | 4 +- src/elements/aboutMe.svelte | 1 + src/elements/jobs.svelte | 21 +-- src/elements/menu.svelte | 2 +- .../{extra.svelte => portfolio.svelte} | 49 ++++-- src/elements/projects.svelte | 126 --------------- src/elements/training.svelte | 57 ++++++- src/model/data.ts | 4 - src/model/hobby.json | 44 ----- src/model/jobs.json | 40 ++++- src/model/portfolio.json | 151 ++++++++++++++++++ src/model/projects.json | 23 --- src/model/training.json | 28 ++++ src/routes/index.svelte | 12 +- static/logo-jatus-tech.png | Bin 0 -> 219829 bytes 20 files changed, 463 insertions(+), 246 deletions(-) create mode 100644 default.conf create mode 100644 docker-compose.yml create mode 100644 dockerfile rename src/elements/{extra.svelte => portfolio.svelte} (68%) delete mode 100644 src/elements/projects.svelte delete mode 100644 src/model/data.ts delete mode 100644 src/model/hobby.json create mode 100644 src/model/portfolio.json delete mode 100644 src/model/projects.json create mode 100644 src/model/training.json create mode 100644 static/logo-jatus-tech.png diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..7d608fb --- /dev/null +++ b/default.conf @@ -0,0 +1,18 @@ +server { + # The port to listen on + listen 80; + # The root directory, which must exactly match the internal volume share + root /usr/share/nginx/html; + + # For all files with the PHP extension run the following + location ~ ^/.+\.php(/|$) { + # Pass the request to the host "php" and port 9000 (default PHP-FPM port) + fastcgi_pass php:9000; + # Include the default NGINX FastCGI Parameters + include fastcgi_params; + # Define one additional parameter telling PHP-FPM where to find the file + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + } + add_header Cache-Control no-cache; + expires 1s; +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3269297 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +# The specification version of docker-compose +version: "3.9" +# The collection of applications composing this service +services: + # The NGINX custom container + web: + # Instead of referencing image: nginx:mainline-alpine here, use build to + # reference the current directory (.), which will look for a dockerfile + # by default + build: . + # The external directory location to map to an internal location + volumes: + - /home/gianm/Project/myCv/build:/usr/share/nginx/html + # The external port mapping to internal port mapping + ports: + - "80:80" + php: + image: php:fpm-alpine + ports: + - "9000:9000" + # It is important that both containers can reference the same files + volumes: + - /home/gianm/Project/myCv/build:/usr/share/nginx/html diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..0d09b66 --- /dev/null +++ b/dockerfile @@ -0,0 +1,6 @@ +# The image to pull the base configuration from +FROM nginx:mainline-alpine +# The directory where any additional files will be referenced +WORKDIR /home/gianm/Project/myCv/build +# Copy the custom default.conf from the WORKDIR (.) and overwrite the existing internal configuration in the NGINX container +COPY ./default.conf /etc/nginx/conf.d/default.conf diff --git a/package-lock.json b/package-lock.json index f3fea13..a506a27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,9 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", "json-schema-to-typescript": "^10.1.5", - "milligram": "^1.4.1" + "markdown-it": "^12.2.0", + "milligram": "^1.4.1", + "punycode": "^2.1.1" }, "devDependencies": { "@sveltejs/adapter-static": "^1.0.0-next.20", @@ -891,6 +893,14 @@ "node": ">=8.6" } }, + "node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es5-ext": { "version": "0.10.53", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", @@ -1986,6 +1996,14 @@ "node": ">=10" } }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -2038,6 +2056,26 @@ "sourcemap-codec": "^1.4.4" } }, + "node_modules/markdown-it": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.2.0.tgz", + "integrity": "sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==", + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "node_modules/marked": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz", @@ -2050,6 +2088,11 @@ "node": ">= 8.16.2" } }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "node_modules/memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -2383,7 +2426,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, "engines": { "node": ">=6" } @@ -3025,6 +3067,11 @@ "node": ">=4.2.0" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -3761,6 +3808,11 @@ "ansi-colors": "^4.1.1" } }, + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" + }, "es5-ext": { "version": "0.10.53", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", @@ -4564,6 +4616,14 @@ "optional": true, "peer": true }, + "linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "requires": { + "uc.micro": "^1.0.1" + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -4613,12 +4673,36 @@ "sourcemap-codec": "^1.4.4" } }, + "markdown-it": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.2.0.tgz", + "integrity": "sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==", + "requires": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + } + } + }, "marked": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz", "integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==", "dev": true }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -4865,8 +4949,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "queue-microtask": { "version": "1.2.3", @@ -5291,6 +5374,11 @@ "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 183cccc..f51ed3b 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,8 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", "json-schema-to-typescript": "^10.1.5", - "milligram": "^1.4.1" + "markdown-it": "^12.2.0", + "milligram": "^1.4.1", + "punycode": "^2.1.1" } } diff --git a/src/app.html b/src/app.html index 08fe4c7..2a88f57 100644 --- a/src/app.html +++ b/src/app.html @@ -8,7 +8,7 @@ %svelte.head% - -
%svelte.body%
+ + %svelte.body% diff --git a/src/elements/aboutMe.svelte b/src/elements/aboutMe.svelte index a9bdb79..1cef6d8 100644 --- a/src/elements/aboutMe.svelte +++ b/src/elements/aboutMe.svelte @@ -103,6 +103,7 @@ width: 90%; margin: auto; text-justify: distribute; + text-align: justify; } .header{ diff --git a/src/elements/jobs.svelte b/src/elements/jobs.svelte index 63613ea..1130dca 100644 --- a/src/elements/jobs.svelte +++ b/src/elements/jobs.svelte @@ -1,4 +1,10 @@
diff --git a/src/elements/extra.svelte b/src/elements/portfolio.svelte similarity index 68% rename from src/elements/extra.svelte rename to src/elements/portfolio.svelte index 71dc9b0..a8f2648 100644 --- a/src/elements/extra.svelte +++ b/src/elements/portfolio.svelte @@ -1,5 +1,12 @@ -
- {#each projects as project, index } -
-

{project.title[currentLanguage]}

-
-
- {#each project.images as image } - realtive to the article - {/each} -
-
-

{project.content[currentLanguage]}

-
-
-
-
- {project.year.start} - {project.year.end} -
-
- {#each project.collaborators as collaborator} - {collaborator.name}{collaborator.surname} - {/each} -
-
- {#each project.languages as language} - {language+" "} - {/each} -
-
- {#each project.tecnologies as tecnology} - {tecnology+" "} - {/each} -
-
-
- {/each} -
- diff --git a/src/elements/training.svelte b/src/elements/training.svelte index b6f5c11..6d47c86 100644 --- a/src/elements/training.svelte +++ b/src/elements/training.svelte @@ -1,9 +1,31 @@ - +
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Dui faucibus in ornare quam viverra orci sagittis. Purus gravida quis blandit turpis cursus in. At imperdiet dui accumsan sit amet nulla facilisi morbi tempus. Suspendisse faucibus interdum posuere lorem ipsum dolor sit amet consectetur. Eget aliquet nibh praesent tristique magna. Facilisis gravida neque convallis a cras semper auctor neque vitae. Lectus sit amet est placerat in egestas erat. Lorem ipsum dolor sit amet consectetur. Commodo nulla facilisi nullam vehicula ipsum a arcu. Blandit volutpat maecenas volutpat blandit aliquam etiam erat velit. Diam maecenas ultricies mi eget. Sapien eget mi proin sed libero enim sed faucibus. Vitae purus faucibus ornare suspendisse. Sit amet luctus venenatis lectus. Praesent tristique magna sit amet purus gravida quis blandit. Nunc mattis enim ut tellus. Egestas diam in arcu cursus. At lectus urna duis convallis convallis tellus id. Nunc pulvinar sapien et ligula ullamcorper. Tristique senectus et netus et malesuada fames ac turpis. Malesuada fames ac turpis egestas. Lectus nulla at volutpat diam ut venenatis. Diam donec adipiscing tristique risus nec feugiat. Non quam lacus suspendisse faucibus. Volutpat sed cras ornare arcu dui vivamus. Quam elementum pulvinar etiam non quam lacus. -

+ {#each training as school } +
+ school logo +
+

{school.title[currentLanguage]}

+

{school.content[currentLanguage]}

+

{school.year.start} - {school.year.end}

+
+
+ {/each}