robe
This commit is contained in:
parent
9a73fe708e
commit
cd55feca1e
13
.eslintignore
Normal file
13
.eslintignore
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/build
|
||||||
|
/.svelte-kit
|
||||||
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Ignore files for PNPM, NPM and YARN
|
||||||
|
pnpm-lock.yaml
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
20
.eslintrc copy.cjs
Normal file
20
.eslintrc copy.cjs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
||||||
|
plugins: ['svelte3', '@typescript-eslint'],
|
||||||
|
ignorePatterns: ['*.cjs'],
|
||||||
|
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
||||||
|
settings: {
|
||||||
|
'svelte3/typescript': () => require('typescript')
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
sourceType: 'module',
|
||||||
|
ecmaVersion: 2020
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
es2017: true,
|
||||||
|
node: true
|
||||||
|
}
|
||||||
|
};
|
13
.prettierignore
Normal file
13
.prettierignore
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/build
|
||||||
|
/.svelte-kit
|
||||||
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Ignore files for PNPM, NPM and YARN
|
||||||
|
pnpm-lock.yaml
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
9
.prettierrc copy
Normal file
9
.prettierrc copy
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"useTabs": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"printWidth": 100,
|
||||||
|
"plugins": ["prettier-plugin-svelte"],
|
||||||
|
"pluginSearchDirs": ["."],
|
||||||
|
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
|
||||||
|
}
|
15132
package-lock.json
generated
15132
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
61
package.json
61
package.json
@ -2,47 +2,44 @@
|
|||||||
"name": "mycv",
|
"name": "mycv",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"update-model": "json2ts ./src/model/schema.json ./src/model/job.d.ts",
|
"update-model": "json2ts ./src/model/schema.json ./$lib/model/job.d.ts",
|
||||||
"dev": "svelte-kit dev --host 0.0.0.0",
|
"dev": "vite dev",
|
||||||
"build": "svelte-kit build",
|
"build": "vite build",
|
||||||
"preview": "svelte-kit preview",
|
"preview": "vite preview",
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
"test": "playwright test",
|
||||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
|
"test:unit": "vitest",
|
||||||
|
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
||||||
|
"format": "prettier --plugin-search-dir . --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-env": "^7.15.8",
|
"@playwright/test": "^1.28.1",
|
||||||
"@sveltejs/adapter-static": "^1.0.0-next.20",
|
"@sveltejs/adapter-auto": "^1.0.0",
|
||||||
"@sveltejs/kit": "next",
|
"@sveltejs/kit": "^1.0.0",
|
||||||
"@testing-library/jest-dom": "^5.14.1",
|
"@types/markdown-it": "^12.2.3",
|
||||||
"@testing-library/svelte": "^3.0.3",
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||||
"@types/jest": "^27.0.2",
|
"@typescript-eslint/parser": "^5.45.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
"eslint": "^8.28.0",
|
||||||
"@typescript-eslint/parser": "^4.31.1",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"babel-jest": "^27.3.0",
|
"eslint-plugin-svelte3": "^4.0.0",
|
||||||
"eslint": "^7.32.0",
|
"prettier": "^2.8.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"prettier-plugin-svelte": "^2.8.1",
|
||||||
"eslint-plugin-svelte3": "^3.2.1",
|
"sass": "^1.57.1",
|
||||||
"jest": "^27.3.0",
|
"svelte": "^3.54.0",
|
||||||
"prettier": "^2.4.1",
|
"svelte-check": "^3.0.1",
|
||||||
"prettier-plugin-svelte": "^2.4.0",
|
|
||||||
"svelte": "^3.42.6",
|
|
||||||
"svelte-check": "^2.2.6",
|
|
||||||
"svelte-jester": "^2.1.5",
|
|
||||||
"svelte-meta-tags": "^2.5.5",
|
"svelte-meta-tags": "^2.5.5",
|
||||||
"svelte-preprocess": "^4.9.4",
|
"svelte-preprocess": "^4.9.4",
|
||||||
"svelte-preprocess-markdown": "^2.7.3",
|
"svelte-preprocess-markdown": "^2.7.3",
|
||||||
"svelte-scrollto": "^0.2.0",
|
"tslib": "^2.4.1",
|
||||||
"ts-jest": "^27.0.7",
|
"typescript": "^4.9.3",
|
||||||
"tslib": "^2.3.1",
|
"vite": "^4.0.0",
|
||||||
"typescript": "^4.4.3"
|
"vitest": "^0.25.3"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
||||||
"json-schema-to-typescript": "^10.1.5",
|
"json-schema-to-typescript": "^10.1.5",
|
||||||
"markdown-it": "^12.2.0",
|
"markdown-it": "^12.2.0",
|
||||||
"punycode": "^2.1.1"
|
"punycode": "^2.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
playwright.config.ts
Normal file
11
playwright.config.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
||||||
|
|
||||||
|
const config: PlaywrightTestConfig = {
|
||||||
|
webServer: {
|
||||||
|
command: 'npm run build && npm run preview',
|
||||||
|
port: 4173
|
||||||
|
},
|
||||||
|
testDir: 'tests'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
15
src/app.html
15
src/app.html
@ -1,15 +1,12 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="%lang%">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="/favicon.png" />
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
<link rel="stylesheet" href="/main.css">
|
<meta name="viewport" content="width=device-width" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
%sveltekit.head%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<title>Gianmarco Pettinato</title>
|
|
||||||
%svelte.head%
|
|
||||||
</head>
|
</head>
|
||||||
<body id="svelte">
|
<body data-sveltekit-preload-data="hover">
|
||||||
%svelte.body%
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
72
src/app.scss
72
src/app.scss
@ -19,46 +19,46 @@ $default-border-radius:5px;
|
|||||||
background-color: $basecolor
|
background-color: $basecolor
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-with-shadow {
|
// .box-with-shadow {
|
||||||
border-style: solid;
|
// border-style: solid;
|
||||||
border-width: 0.1px;
|
// border-width: 0.1px;
|
||||||
border-radius: 10px;
|
// border-radius: 10px;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.default{
|
// .default{
|
||||||
margin: auto;
|
// margin: auto;
|
||||||
@media (min-width: $min-tablet) {
|
// @media (min-width: $min-tablet) {
|
||||||
width: 80%;
|
// width: 80%;
|
||||||
max-width: 1024px;
|
// max-width: 1024px;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
.image-container{
|
// .image-container{
|
||||||
width: 80%;
|
// width: 80%;
|
||||||
margin: auto;
|
// margin: auto;
|
||||||
text-align: center;
|
// text-align: center;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
img{
|
// img{
|
||||||
max-width: 100%;
|
// max-width: 100%;
|
||||||
max-height: 300px;
|
// max-height: 300px;
|
||||||
object-fit: scale-down;
|
// object-fit: scale-down;
|
||||||
@media (prefers-color-scheme: light) {
|
// @media (prefers-color-scheme: light) {
|
||||||
background-color: $contrast;
|
// background-color: $contrast;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
a {
|
// a {
|
||||||
text-decoration:none;
|
// text-decoration:none;
|
||||||
color: $text-color;
|
// color: $text-color;
|
||||||
}
|
// }
|
||||||
|
|
||||||
button{
|
// button{
|
||||||
color: $text-color;
|
// color: $text-color;
|
||||||
}
|
// }
|
||||||
|
|
||||||
h1, h2, h3 {
|
// h1, h2, h3 {
|
||||||
font-weight: normal;
|
// font-weight: normal;
|
||||||
}
|
// }
|
@ -27,7 +27,7 @@
|
|||||||
<Contacts />
|
<Contacts />
|
||||||
<div class="whoIAm">
|
<div class="whoIAm">
|
||||||
<p>
|
<p>
|
||||||
{who[currentLanguage]}
|
{who.it}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cv">
|
<div class="cv">
|
||||||
@ -42,12 +42,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Skills />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '/node_modules/@fortawesome/fontawesome-free/css/all.css';
|
@import '../../app.scss';
|
||||||
@import '../app.scss';
|
|
||||||
.cv {
|
.cv {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin: auto;
|
margin: auto;
|
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts"></script>
|
<script lang="ts"></script>
|
||||||
|
|
||||||
<div class="contacts">
|
<div class="contacts">
|
||||||
<img src="/profile_pic.webp" alt="profile" class="profile" />
|
<img src="/profile_pic.webp" alt="profile" class="profile" />
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../app.scss';
|
@import '../../app.scss';
|
||||||
|
|
||||||
img.profile {
|
img.profile {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
@ -7,20 +7,20 @@
|
|||||||
breaks: true,
|
breaks: true,
|
||||||
linkify: true
|
linkify: true
|
||||||
});
|
});
|
||||||
import type { Schema } from 'src/model/job';
|
import type { Schema } from '$lib/model/job';
|
||||||
export let job: Schema;
|
export let job: Schema;
|
||||||
export let currentLanguage = '';
|
export let currentLanguage = '';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="job-container">
|
<div class="job-container">
|
||||||
<h3>{job.title[currentLanguage]}</h3>
|
<h3>{job.title.it}</h3>
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
{#each job.images as image}
|
{#each job.images as image}
|
||||||
<img src={image} alt={image} loading="lazy" />
|
<img src={image} alt={image} loading="lazy" />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-content">
|
<div class="text-content">
|
||||||
{@html md.render(job.content[currentLanguage])}
|
{@html md.render(job.content.it)}
|
||||||
</div>
|
</div>
|
||||||
<div class="added-info">
|
<div class="added-info">
|
||||||
{#if job.year.lenght != 0}
|
{#if job.year.lenght != 0}
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../app.scss';
|
@import '../../app.scss';
|
||||||
.text-content {
|
.text-content {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
text-align: justify;
|
text-align: justify;
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Schema } from 'src/model/job';
|
import type { Schema } from '$lib/model/job';
|
||||||
import JobElement from './JobElement.svelte';
|
import JobElement from './JobElement.svelte';
|
||||||
export let currentLanguage = '';
|
export let currentLanguage = '';
|
||||||
export let isBlogContainer = false;
|
export let isBlogContainer = false;
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../app.scss';
|
@import '../../app.scss';
|
||||||
.jobs-container {
|
.jobs-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
@ -1,5 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { scrollto } from 'svelte-scrollto';
|
|
||||||
export let currentLanguage = 'it';
|
export let currentLanguage = 'it';
|
||||||
export const menu = {
|
export const menu = {
|
||||||
home: { it: 'Home', en: 'Home' },
|
home: { it: 'Home', en: 'Home' },
|
||||||
@ -13,32 +12,29 @@
|
|||||||
<div class="div-menu">
|
<div class="div-menu">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<a class="menu-element" href="/#top">
|
<a class="menu-element" href="/#top">
|
||||||
<span class="hide">{menu.home[currentLanguage]}</span><i class="fas fa-home" /></a
|
<span class="hide">{menu.home.it}</span><i class="fas fa-home" /></a
|
||||||
>
|
>
|
||||||
|
|
||||||
<a class="menu-element" href="#jobs"
|
<a class="menu-element" href="#jobs"
|
||||||
><span class="hide">{menu.job[currentLanguage]}</span><i class="fas fa-user-tie" /></a
|
><span class="hide">{menu.job.it}</span><i class="fas fa-user-tie" /></a
|
||||||
>
|
>
|
||||||
|
|
||||||
<a class="menu-element" href="#training"
|
<a class="menu-element" href="#training"
|
||||||
><span class="hide">{menu.school[currentLanguage]}</span><i
|
><span class="hide">{menu.school.it}</span><i class="fas fa-graduation-cap" /></a
|
||||||
class="fas fa-graduation-cap"
|
|
||||||
/></a
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<a class="menu-element" href="#portfolio"
|
<a class="menu-element" href="#portfolio"
|
||||||
><span class="hide">{menu.portfolio[currentLanguage]}</span><i class="fas fa-user-clock" /></a
|
><span class="hide">{menu.portfolio.it}</span><i class="fas fa-user-clock" /></a
|
||||||
>
|
>
|
||||||
|
|
||||||
<a class="menu-element" href="/blog" alt={menu.blog[currentLanguage]}
|
<a class="menu-element" href="/blog"
|
||||||
><span class="hide">{menu.blog[currentLanguage]}</span><i class="fas fa-address-card" /></a
|
><span class="hide">{menu.blog.it}</span><i class="fas fa-address-card" /></a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../app.scss';
|
@import '../../app.scss';
|
||||||
@import '/node_modules/@fortawesome/fontawesome-free/css/all.css';
|
|
||||||
.hide {
|
.hide {
|
||||||
@media (max-width: $min-tablet) {
|
@media (max-width: $min-tablet) {
|
||||||
position: absolute;
|
position: absolute;
|
@ -6,7 +6,7 @@
|
|||||||
typographer: true
|
typographer: true
|
||||||
});
|
});
|
||||||
import data from '../model/training.json';
|
import data from '../model/training.json';
|
||||||
import type { Schema } from 'src/model/job';
|
import type { Schema } from '$lib/model/job';
|
||||||
export let currentLanguage = 'it';
|
export let currentLanguage = 'it';
|
||||||
const training: Schema[] = data as Schema[];
|
const training: Schema[] = data as Schema[];
|
||||||
</script>
|
</script>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
.training {
|
.training {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
@import '../app.scss';
|
@import '../../app.scss';
|
||||||
.element {
|
.element {
|
||||||
border-radius: $default-border-radius;
|
border-radius: $default-border-radius;
|
||||||
background-color: white;
|
background-color: white;
|
@ -35,8 +35,6 @@
|
|||||||
},
|
},
|
||||||
"title": {"en":"Jatus.tech my start-up","it":"La mia start-up Jatus.tech"},
|
"title": {"en":"Jatus.tech my start-up","it":"La mia start-up Jatus.tech"},
|
||||||
"content": {
|
"content": {
|
||||||
"en":"In 2021, I worked to open a start-up with an app idea.\n To do so, I learned a lot of different skills, including how to set up a server with all my services running in **Docker**, set up a **GitLab** server, **design and build** an application infrastructure, and set up a private registry for **npm** and **docker images**.\n Furthermore, I configured all the **automation pipelines** to streamline the software distribution in virtualized environments and build the application **proof of concept** to demo to potential customers.",
|
|
||||||
"it":"Nel corso del 2021 ho lavorato, per avviare una attività indipendente che si basa su una mia idea di servizio. Per far ciò, durante questo periodo ho imparato a creare un'infrastruttura di lavoro, su un server **GNU\/Linux** dove centralizzare le risorse con **GitLab** in container **Docker**.\n Per semplificare la distribuzione di elementi di sviluppo ho integrato un *repository* privato di pacchetti **npm** e immagini **Docker**. Oltre alle mansioni da sistemista e devops ho progettato e scritto il **Proof of concept** del mio servizio per dimostrarlo a potenziali clienti"
|
|
||||||
"en":"In 2021, I worked to open a start-up with an app idea.\nTo do so, I acquired skills in design and developing a software solution for the problem. I learnt how to set up a **CI/CD** pipeline with **Docker** and **Gitlab** and took confidence in **serverless** technologies like AWS.",
|
"en":"In 2021, I worked to open a start-up with an app idea.\nTo do so, I acquired skills in design and developing a software solution for the problem. I learnt how to set up a **CI/CD** pipeline with **Docker** and **Gitlab** and took confidence in **serverless** technologies like AWS.",
|
||||||
"it":"Nel corso del 2021 ho lavorato per avviare una mia attività indipendente, basata su un’idea per una app che ritenevo, e ritengo, fattibile. In questo periodo ho dovuto ricoprire diversi ruoli per portar avanti quest’iniziativa. Di conseguenza ho imparato a svolgere le mansioni di analista e architetto, **devops** e sviluppo. \n In particolare, ho acquisito dimestichezza con i sistemi di **CI/CD** basati su **Docker** e nell’uso di tecnologie **serverless**."
|
"it":"Nel corso del 2021 ho lavorato per avviare una mia attività indipendente, basata su un’idea per una app che ritenevo, e ritengo, fattibile. In questo periodo ho dovuto ricoprire diversi ruoli per portar avanti quest’iniziativa. Di conseguenza ho imparato a svolgere le mansioni di analista e architetto, **devops** e sviluppo. \n In particolare, ho acquisito dimestichezza con i sistemi di **CI/CD** basati su **Docker** e nell’uso di tecnologie **serverless**."
|
||||||
},
|
},
|
@ -1,12 +1,12 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { MetaTags } from 'svelte-meta-tags';
|
import { MetaTags } from 'svelte-meta-tags';
|
||||||
import AboutMe from '$elem/AboutMe.svelte';
|
import AboutMe from '$lib/elements/AboutMe.svelte';
|
||||||
import Jobs from '$elem/Jobs.svelte';
|
import Jobs from '$lib/elements/Jobs.svelte';
|
||||||
import Menu from '$elem/Menu.svelte';
|
import Menu from '$lib/elements/Menu.svelte';
|
||||||
import Training from '$elem/Training.svelte';
|
import Training from '$lib/elements/Training.svelte';
|
||||||
import Data_jobs from '../model/jobs.json';
|
import Data_jobs from '$lib/model/jobs.json';
|
||||||
import Data_portfolio from '../model/portfolio.json';
|
import Data_portfolio from '$lib/model/portfolio.json';
|
||||||
import type { Schema } from 'src/model/job';
|
import type { Schema } from '$lib/model/job';
|
||||||
let jobs: Schema[] = Data_jobs as Schema[];
|
let jobs: Schema[] = Data_jobs as Schema[];
|
||||||
let portfolio: Schema[] = Data_portfolio as Schema[];
|
let portfolio: Schema[] = Data_portfolio as Schema[];
|
||||||
let currentLanguage: string = 'it';
|
let currentLanguage: string = 'it';
|
||||||
@ -80,26 +80,27 @@
|
|||||||
<Menu {currentLanguage} />
|
<Menu {currentLanguage} />
|
||||||
</div>
|
</div>
|
||||||
<div id="home" class="default">
|
<div id="home" class="default">
|
||||||
<h1>{titles.home[currentLanguage]}</h1>
|
<h1>{titles.home.it}</h1>
|
||||||
<h2>Software developer</h2>
|
<h2>Software developer</h2>
|
||||||
<AboutMe {currentLanguage} />
|
<AboutMe {currentLanguage} />
|
||||||
</div>
|
</div>
|
||||||
<div id="jobs" class="default">
|
<div id="jobs" class="default">
|
||||||
<h2>{titles.job[currentLanguage]}</h2>
|
<h2>{titles.job.it}</h2>
|
||||||
<Jobs {jobs} {currentLanguage} />
|
<Jobs {jobs} {currentLanguage} />
|
||||||
</div>
|
</div>
|
||||||
<div id="training" class="default">
|
<div id="training" class="default">
|
||||||
<h2>{titles.school[currentLanguage]}</h2>
|
<h2>{titles.school.it}</h2>
|
||||||
<Training {currentLanguage} />
|
<Training {currentLanguage} />
|
||||||
</div>
|
</div>
|
||||||
<div id="portfolio" class="default">
|
<div id="portfolio" class="default">
|
||||||
<h2>{titles.portfolio[currentLanguage]}</h2>
|
<h2>{titles.portfolio.it}</h2>
|
||||||
<Jobs jobs={portfolio} {currentLanguage} />
|
<Jobs jobs={portfolio} {currentLanguage} />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../app.scss';
|
@import '../app.scss';
|
||||||
|
|
||||||
.language-selector {
|
.language-selector {
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 30px;
|
height: 30px;
|
@ -1,11 +1,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { MetaTags } from 'svelte-meta-tags';
|
import { MetaTags } from 'svelte-meta-tags';
|
||||||
import Menu from '$elem/Menu.svelte';
|
import Menu from '$lib/elements/Menu.svelte';
|
||||||
import Jobs from '$elem/Jobs.svelte';
|
import Jobs from '$lib/elements/Jobs.svelte';
|
||||||
let currentLanguage: string = 'it';
|
let currentLanguage: string = 'it';
|
||||||
let isBlogContainer = true;
|
let isBlogContainer = true;
|
||||||
import Data_portfolio from '../../model/portfolio.json';
|
import Data_portfolio from '../../lib/model/portfolio.json';
|
||||||
import type { Schema } from 'src/model/job';
|
import type { Schema } from '$lib/model/job';
|
||||||
let jobs: Schema[] = Data_portfolio as Schema[];
|
let jobs: Schema[] = Data_portfolio as Schema[];
|
||||||
let title = { it: 'I miei articoli', en: 'my blog posts' };
|
let title = { it: 'I miei articoli', en: 'my blog posts' };
|
||||||
</script>
|
</script>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<Menu {currentLanguage} />
|
<Menu {currentLanguage} />
|
||||||
</div>
|
</div>
|
||||||
<div id="portfolio" class="default">
|
<div id="portfolio" class="default">
|
||||||
<h2>{title[currentLanguage]}</h2>
|
<h2>{title.it}</h2>
|
||||||
<Jobs {jobs} {currentLanguage} {isBlogContainer} />
|
<Jobs {jobs} {currentLanguage} {isBlogContainer} />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
@ -1,9 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { MetaTags } from 'svelte-meta-tags';
|
import { MetaTags } from 'svelte-meta-tags';
|
||||||
import Menu from '$elem/Menu.svelte';
|
import Menu from '$lib/elements/Menu.svelte';
|
||||||
let currentLanguage: string = 'it';
|
let currentLanguage: string = 'it';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
console.log($page)
|
console.log($page);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<MetaTags
|
<MetaTags
|
||||||
@ -66,7 +66,7 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../../app.scss';
|
@import '../../../app.scss';
|
||||||
.language-selector {
|
.language-selector {
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 30px;
|
height: 30px;
|
@ -1,36 +1,19 @@
|
|||||||
import preprocess from 'svelte-preprocess';
|
import adapter from '@sveltejs/adapter-auto';
|
||||||
import adapter from '@sveltejs/adapter-static';
|
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||||
import {markdown} from 'svelte-preprocess-markdown';
|
import {markdown} from 'svelte-preprocess-markdown';
|
||||||
import path from 'path';
|
import preprocess from 'svelte-preprocess';
|
||||||
|
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: [preprocess({
|
preprocess: [vitePreprocess(), markdown(),preprocess({
|
||||||
sass: true,
|
sass: true,
|
||||||
typescript: true,
|
})],
|
||||||
|
|
||||||
}), markdown()],
|
|
||||||
|
|
||||||
kit: {
|
kit: {
|
||||||
// hydrate the <div id="svelte"> element in src/app.html
|
adapter: adapter()
|
||||||
target: '#svelte',
|
|
||||||
vite:{
|
|
||||||
resolve:{
|
|
||||||
alias:{
|
|
||||||
$elem: path.resolve('src/elements'),
|
|
||||||
// $model: path.resolve('src/model')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
hostHeader: 'X-Forwarded-Host',
|
|
||||||
adapter: adapter({
|
|
||||||
// default options are shown
|
|
||||||
pages: 'build',
|
|
||||||
assets: 'build',
|
|
||||||
fallback: null
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
37
svelte.config.old.js
Normal file
37
svelte.config.old.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import preprocess from 'svelte-preprocess';
|
||||||
|
import adapter from '@sveltejs/adapter-static';
|
||||||
|
import {markdown} from 'svelte-preprocess-markdown';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
|
const config = {
|
||||||
|
// Consult https://github.com/sveltejs/svelte-preprocess
|
||||||
|
// for more information about preprocessors
|
||||||
|
preprocess: [preprocess({
|
||||||
|
sass: true,
|
||||||
|
typescript: true,
|
||||||
|
|
||||||
|
}), markdown()],
|
||||||
|
|
||||||
|
kit: {
|
||||||
|
// hydrate the <div id="svelte"> element in src/app.html
|
||||||
|
target: '#svelte',
|
||||||
|
vite:{
|
||||||
|
resolve:{
|
||||||
|
alias:{
|
||||||
|
$elem: path.resolve('src/elements'),
|
||||||
|
// $model: path.resolve('src/model')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hostHeader: 'X-Forwarded-Host',
|
||||||
|
adapter: adapter({
|
||||||
|
// default options are shown
|
||||||
|
pages: 'build',
|
||||||
|
assets: 'build',
|
||||||
|
fallback: null
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
6
tests/test.ts
Normal file
6
tests/test.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
|
test('index page has expected h1', async ({ page }) => {
|
||||||
|
await page.goto('/');
|
||||||
|
expect(await page.textContent('h1')).toBe('Welcome to SvelteKit');
|
||||||
|
});
|
@ -1,33 +1,17 @@
|
|||||||
{
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"moduleResolution": "node",
|
|
||||||
"module": "es2020",
|
|
||||||
"lib": ["es2020", "DOM"],
|
|
||||||
"target": "es2019",
|
|
||||||
/**
|
|
||||||
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
|
|
||||||
to enforce using \`import type\` instead of \`import\` for Types.
|
|
||||||
*/
|
|
||||||
"importsNotUsedAsValues": "error",
|
|
||||||
"isolatedModules": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
/**
|
|
||||||
To have warnings/errors of the Svelte compiler at the correct position,
|
|
||||||
enable source maps by default.
|
|
||||||
*/
|
|
||||||
"sourceMap": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"baseUrl": ".",
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
"paths": {
|
"esModuleInterop": true,
|
||||||
"$lib": ["src/lib"],
|
"forceConsistentCasingInFileNames": true,
|
||||||
"$lib/*": ["src/lib/*"],
|
"resolveJsonModule": true,
|
||||||
"$elem/*":["src/elements/*"],
|
"skipLibCheck": true,
|
||||||
"$model/*":["src/model/*"]
|
"sourceMap": true,
|
||||||
}
|
"strict": true
|
||||||
},
|
}
|
||||||
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
|
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||||
|
//
|
||||||
|
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||||
|
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||||
}
|
}
|
||||||
|
11
vite.config.ts
Normal file
11
vite.config.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import type { UserConfig } from 'vite';
|
||||||
|
|
||||||
|
const config: UserConfig = {
|
||||||
|
plugins: [sveltekit()],
|
||||||
|
test: {
|
||||||
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
Loading…
Reference in New Issue
Block a user