diff --git a/task_1_html_css/.gitignore b/task_1_html_css/.gitignore new file mode 100644 index 0000000..1fe1b00 --- /dev/null +++ b/task_1_html_css/.gitignore @@ -0,0 +1,2 @@ +.idea/ +node_modules/ diff --git a/task_1_html_css/.gitlab-ci.yml b/task_1_html_css/.gitlab-ci.yml new file mode 100644 index 0000000..3c8ba92 --- /dev/null +++ b/task_1_html_css/.gitlab-ci.yml @@ -0,0 +1,63 @@ +stages: + - lint + - build + - deploy + +workflow: + rules: + - if: $CI_COMMIT_BRANCH =~ /^(master|main)$/ + - if: $FORCE_DEPLOY + when: always + - when: never + +variables: + IMAGE_NAME: $ci_registry/$CI_PROJECT_PATH + +default: + before_script: + - IMAGE_NAME=$(echo $IMAGE_NAME | tr '[:upper:]' '[:lower:]') + +lint_helm: + stage: lint + image: matthiasgabathuler/my-runner:ubuntu-20.04 + script: + - >- + helm lint ${CI_PROJECT_DIR}/helm + --set image.name=${IMAGE_NAME} + --set image.tag=${CI_COMMIT_REF_NAME} + --set build.job_id=${CI_JOB_ID} + --set build.commit=${CI_COMMIT_SHA} + +build_webapp: + stage: build + rules: + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - >- + /kaniko/executor + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + --destination "${IMAGE_NAME}-webapp:latest" + +deploy_app: + stage: deploy + rules: + image: + name: alpine/helm:3.11.1 + entrypoint: [""] + script: + - >- + helm --namespace $k8s_namespace + --kube-context $k8s_context + upgrade $(echo ${CI_PROJECT_NAME} | tr _ -) ${CI_PROJECT_DIR}/helm + --install + --history-max 5 + --set image.host=${ci_registry} + --set image.name=${IMAGE_NAME} + --set image.tag=latest + --set build.job_id=${CI_JOB_ID} + --set build.commit=${CI_COMMIT_SHA} + - >- + echo "webapp URL: http://$(echo ${CI_PROJECT_NAME} | tr _ -).course-fwe-2023.isginf.ch" \ No newline at end of file diff --git a/task_1_html_css/.prettierrc.json b/task_1_html_css/.prettierrc.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/task_1_html_css/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/task_1_html_css/Dockerfile b/task_1_html_css/Dockerfile new file mode 100644 index 0000000..548120c --- /dev/null +++ b/task_1_html_css/Dockerfile @@ -0,0 +1,8 @@ +FROM node +WORKDIR /app +COPY src/package.json . +RUN npm i +COPY ./src . +## EXPOSE [Port you mentioned in the vite.config file] +EXPOSE 5173 +CMD ["npm", "run", "dev"] \ No newline at end of file diff --git a/task_1_html_css/README.md b/task_1_html_css/README.md new file mode 100644 index 0000000..47a3dd4 --- /dev/null +++ b/task_1_html_css/README.md @@ -0,0 +1,21 @@ +# Local Development + +see [src/README.md](src/README.md) + +# Local Testing + +## run container for local testing + +```bash +docker build -t my-webapp . + +docker run -it --rm -p 5173:5173 my-webapp +``` +Open a browser and connect to http://localhost:5173 + +## run bash in interactive container +```bash +docker build -t my-webapp src/. + +docker run -it --rm -p 5173:5173 my-webapp bash +``` \ No newline at end of file diff --git a/task_1_html_css/helm/.helmignore b/task_1_html_css/helm/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/task_1_html_css/helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/task_1_html_css/helm/Chart.yaml b/task_1_html_css/helm/Chart.yaml new file mode 100644 index 0000000..048eff2 --- /dev/null +++ b/task_1_html_css/helm/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: task-1-html-css #name of the app, this should be the project name, spaces should be substituted with - +description: My Example App #description for the app +type: application +version: 0.0.1 #for versioning of the helm chart, increase it when new release is built/deployed +appVersion: "0.0.1" diff --git a/task_1_html_css/helm/charts/.gitkeep b/task_1_html_css/helm/charts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/task_1_html_css/helm/files/.gitkeep b/task_1_html_css/helm/files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/task_1_html_css/helm/templates/.gitkeep b/task_1_html_css/helm/templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/task_1_html_css/helm/templates/deployment.yaml b/task_1_html_css/helm/templates/deployment.yaml new file mode 100644 index 0000000..8e1a734 --- /dev/null +++ b/task_1_html_css/helm/templates/deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-webapp +spec: + selector: + matchLabels: + app: {{ .Release.Name }}-webapp + replicas: 1 + template: + metadata: + labels: + app: {{ .Release.Name }}-webapp + annotations: + rollme: {{ randAlphaNum 5 | quote }} + spec: + nodeSelector: + course: fwe2023 + containers: + - name: {{ .Release.Name }}-webapp + image: {{ .Values.image.name }}-webapp:{{ .Values.image.tag }} + imagePullPolicy: Always + ports: + - containerPort: 5173 + resources: + limits: + memory: "200M" + requests: + memory: "50M" \ No newline at end of file diff --git a/task_1_html_css/helm/templates/ingress.yaml b/task_1_html_css/helm/templates/ingress.yaml new file mode 100644 index 0000000..e8447c2 --- /dev/null +++ b/task_1_html_css/helm/templates/ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-ingress + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/enable-cors: "true" +spec: + ingressClassName: nginx + rules: + - host: {{ .Release.Name }}.course-fwe-2023.isginf.ch + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-webapp + port: + number: 80 \ No newline at end of file diff --git a/task_1_html_css/helm/templates/service.yaml b/task_1_html_css/helm/templates/service.yaml new file mode 100644 index 0000000..10e8164 --- /dev/null +++ b/task_1_html_css/helm/templates/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-webapp +spec: + ports: + - port: 80 + targetPort: 5173 + selector: + app: {{ .Release.Name }}-webapp diff --git a/task_1_html_css/helm/values.yaml b/task_1_html_css/helm/values.yaml new file mode 100644 index 0000000..2f85841 --- /dev/null +++ b/task_1_html_css/helm/values.yaml @@ -0,0 +1,8 @@ +image: + name: "" + tag: "" +build: + job_id: "" + commit: "" +url: + hostname: "www.course-xai-iml23.isginf.ch" diff --git a/task_1_html_css/src/README.md b/task_1_html_css/src/README.md new file mode 100644 index 0000000..49871ea --- /dev/null +++ b/task_1_html_css/src/README.md @@ -0,0 +1,24 @@ +# Requirements + +- current node version (18+) +- npm (6+) + +# Installation + +```bash +npm install +``` + +# Commands + +## Run + +```bash +npm run dev +``` + +## Format Code +(Since it's `uglier`, will make it uglier) +```bash +npm run format +``` diff --git a/task_1_html_css/src/card.css b/task_1_html_css/src/card.css new file mode 100644 index 0000000..73860a3 --- /dev/null +++ b/task_1_html_css/src/card.css @@ -0,0 +1,31 @@ +article { + border: 1px solid var(--border-color); + border-radius: var(--border-radius); + width: 350px; + line-height: 1.5rem; + + & header { + border-bottom: 1px solid var(--border-color); + padding: var(--space); + + & a { + text-decoration: none; + } + } + + & main { + padding: var(--space); + width: inherit; + & img { + width: inherit; + } + } + + & footer { + border-top: 1px solid var(--border-color); + & ul { + padding: 0; + list-style: none; + } + } +} diff --git a/task_1_html_css/src/card.html b/task_1_html_css/src/card.html new file mode 100644 index 0000000..7586676 --- /dev/null +++ b/task_1_html_css/src/card.html @@ -0,0 +1,146 @@ + + + + + + Document + + + + + + +
+
+

How to start?

+ Edit +
+
+

Here are some tips

+

First think about where to you need some flexbox layout.

+
    +
  1. + Look at the + mdn docs +
  2. +
  3. Start with the inner components.
  4. +
  5. Do not be afraid to nest flex boxes.
  6. +
  7. Start with the header.
  8. +
+

How to align the images

+

+ We have added some challenge to get the border-radius of the images + right. Be creative and have a look at the following css selectors and + use them creatively. +

+ +

The action menu

+

The final challenge.

+ +
+ +
+
+
+

A card without a footer

+ Edit +
+
+ This card has no footer. +
+
+ +
+
+ This card has no header. +
+ +
+ +
+
+

Image with head

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ + diff --git a/task_1_html_css/src/contact.html b/task_1_html_css/src/contact.html new file mode 100644 index 0000000..ab6b587 --- /dev/null +++ b/task_1_html_css/src/contact.html @@ -0,0 +1,50 @@ + + + + + + + Document + + + + + +
+

Contact

+
+ +
+ +
+ +
+ +
+ + + + diff --git a/task_1_html_css/src/default.css b/task_1_html_css/src/default.css new file mode 100644 index 0000000..8449f45 --- /dev/null +++ b/task_1_html_css/src/default.css @@ -0,0 +1,18 @@ +:root { + --border-color: #a0a0a0; + --border-radius: 1rem; + --space: 1rem; + --primary-color: #1677ff; + --dark-primary-color: #003eb3; +} + +body { + padding: var(--space); + height: 100vh; + width: 100vw; +} + +h1, +p { + margin-block: 0.25rem; +} diff --git a/task_1_html_css/src/index.html b/task_1_html_css/src/index.html new file mode 100644 index 0000000..a283215 --- /dev/null +++ b/task_1_html_css/src/index.html @@ -0,0 +1,195 @@ + + + + + + + Document + + + + + + +
+

Open data explorer

+ + +
+ +
+ +
+ +
+
+
+

How to start?

+ Edit +
+
+

Here are some tips

+

First think about where to you need some flexbox layout.

+
    +
  1. + Look at the + mdn docs +
  2. +
  3. Start with the inner components.
  4. +
  5. Do not be afraid to nest flex boxes.
  6. +
  7. Start with the header.
  8. +
+

How to align the images

+

+ We have added some challenge to get the border-radius of the images + right. Be creative and have a look at the following css selectors + and use them creatively. +

+
    +
  • + :has +
  • +
  • + :not +
  • +
  • + Or try another approach, there are many ways in css to achieve the + desired behaviour. +
  • +
+

The action menu

+

The final challenge.

+
    +
  • Think about how to add the separator with css only.
  • +
  • + What pseudo classes can you use to not add the separator to every + element? +
  • +
  • + You might need to combine multiple pseudo classes to achieve the + desired behaviour. +
  • +
+
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

A card with a table

+ Edit +
+
+ + + + + + + + + + + + + + + + + +
KeyValue
1blub
4blubber
+
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+ +
+
+

Image with head

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ + + + diff --git a/task_1_html_css/src/layout.css b/task_1_html_css/src/layout.css new file mode 100644 index 0000000..d3f0f5f --- /dev/null +++ b/task_1_html_css/src/layout.css @@ -0,0 +1,46 @@ +:root { +} + +body { + overflow: hidden; + color: black; +} + +body > section { + border-right: 1px solid var(--border-color); + + & ul { + list-style-type: none; + padding-inline-start: 0; + + & li > a { + color: #999; + font-size: 14px; + text-decoration: none; + } + & li > a:hover { + color: black; + } + } +} + +body > header { + border-bottom: 1px solid var(--border-color); + + & h1 { + font-size: 1.75rem; + margin: 0; + flex-grow: 1; + } +} + +body > main { + grid-area: main; + height: calc(100vh - 100px); + overflow-y: scroll; +} + +body > footer { + border-top: 1px solid var(--border-color); + background-color: #f0f0f0; +} diff --git a/task_1_html_css/src/main.ts b/task_1_html_css/src/main.ts new file mode 100644 index 0000000..bf49d05 --- /dev/null +++ b/task_1_html_css/src/main.ts @@ -0,0 +1,2 @@ +import "@fortawesome/fontawesome-free/css/all.css"; +import "modern-normalize/modern-normalize.css"; diff --git a/task_1_html_css/src/package-lock.json b/task_1_html_css/src/package-lock.json new file mode 100644 index 0000000..7c34de0 --- /dev/null +++ b/task_1_html_css/src/package-lock.json @@ -0,0 +1,604 @@ +{ + "name": "vite-typescript-starter", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vite-typescript-starter", + "version": "0.0.0", + "dependencies": { + "@fortawesome/fontawesome-free": "^6.4.2", + "modern-normalize": "^2.0.0" + }, + "devDependencies": { + "prettier": "^3.0.1", + "typescript": "^5.1.6", + "vite": "^4.4.9" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz", + "integrity": "sha512-m5cPn3e2+FDCOgi1mz0RexTUvvQibBebOUlUlW0+YrMjDTPkiJ6VTKukA1GRsvRw+12KyJndNjj0O4AgTxm2Pg==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/modern-normalize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/modern-normalize/-/modern-normalize-2.0.0.tgz", + "integrity": "sha512-CxBoEVKh5U4DH3XuNbc5ONLF6dQBc8dSc7pdZ1957FGbIO5JBqGqqchhET9dTexri8/pk9xBL6+5ceOtCIp1QA==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.27", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", + "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prettier": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz", + "integrity": "sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/rollup": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + } + } +} diff --git a/task_1_html_css/src/package.json b/task_1_html_css/src/package.json new file mode 100644 index 0000000..862934d --- /dev/null +++ b/task_1_html_css/src/package.json @@ -0,0 +1,20 @@ +{ + "name": "vite-typescript-starter", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "format": "prettier . --write", + "tsc": "tsc" + }, + "devDependencies": { + "prettier": "^3.0.1", + "typescript": "^5.1.6", + "vite": "^4.4.9" + }, + "dependencies": { + "@fortawesome/fontawesome-free": "^6.4.2", + "modern-normalize": "^2.0.0" + } +} diff --git a/task_1_html_css/src/tsconfig.json b/task_1_html_css/src/tsconfig.json new file mode 100644 index 0000000..0ff5e68 --- /dev/null +++ b/task_1_html_css/src/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["**/*"], + "exclude": ["tests/**/*", "public/**/*", "build/**/*"] +} diff --git a/task_1_html_css/src/vite-env.d.ts b/task_1_html_css/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/task_1_html_css/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/task_1_html_css/src/vite.config.js b/task_1_html_css/src/vite.config.js new file mode 100644 index 0000000..d0da1ef --- /dev/null +++ b/task_1_html_css/src/vite.config.js @@ -0,0 +1,6 @@ +export default { + server: { + host: '0.0.0.0', + port: 5173, + }, +} \ No newline at end of file