From bce1f0579838fa677ad2a09f96d4ba7dad9d5dda Mon Sep 17 00:00:00 2001 From: patrick_pluto Date: Wed, 4 Sep 2024 19:39:20 +0200 Subject: [PATCH 01/13] My site + corrections --- app/LandingPage.tsx | 8 ++-- app/patrick/Patrick.tsx | 85 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 80 insertions(+), 13 deletions(-) diff --git a/app/LandingPage.tsx b/app/LandingPage.tsx index ae6c9f0..d5e54f4 100644 --- a/app/LandingPage.tsx +++ b/app/LandingPage.tsx @@ -8,7 +8,7 @@ const Home = () => {

About Us

- We are a group of informatics students from IMS (Informatik Schule Sargans), currently learning React to prepare for an upcoming project. This project will be part of our traineeship at a company, where we'll apply our skills in a real-world setting. Our coursework in React is equipping us with the knowledge and experience needed to excel in this practical opportunity. + We are a group of IT students from IMS (Informatikmittelschule), currently learning React to prepare for an upcoming project. This project will be part of our traineeship at a company, where we'll apply our skills in a real-world setting. Our coursework in React is equipping us with the knowledge and experience needed to excel in this practical opportunity.

@@ -24,7 +24,7 @@ const Home = () => {
- Sage + Luca

Luca

Luca, Patrick's co-programmer, is skilled in Java, GDScript, Bash, and Basic Typewriter. His expertise in Java and GDScript supports robust application and game development, while his Bash scripting skills streamline automation. His knowledge of Basic Typewriter adds a classic touch to his versatile programming capabilities. @@ -33,8 +33,8 @@ const Home = () => {

- - Norway + + Yasin

Yasin

Yasin is a proficient programmer with expertise in Java, where he has even developed games, as well as Bash, HTML, CSS, SQL, and NoSQL. His skills span from backend development and automation to web design and database management, making him a versatile asset in any tech project. diff --git a/app/patrick/Patrick.tsx b/app/patrick/Patrick.tsx index e1f02aa..bbb5893 100644 --- a/app/patrick/Patrick.tsx +++ b/app/patrick/Patrick.tsx @@ -1,13 +1,80 @@ // Patrick.tsx -"use client"; -import React from 'react'; -import './Patrick.css'; // Import specific styles for Patrick +import React, { useRef, useEffect } from 'react'; +import './Patrick.css'; -const Patrick = () => ( -

-

Patrick's Space

-

Welcome, Patrick! This is your programming space.

-
-); +const Patrick: React.FC = () => { + const canvasRef = useRef(null); + const contextRef = useRef(null); + var isPressed = false; + + useEffect(() => { + const canvas = canvasRef.current; + if (canvas) { + canvas.width = 1000; // Set canvas width + canvas.height = 500; // Set canvas height + const context = canvas.getContext('2d'); + if (context) { + contextRef.current = context; + // Fill the canvas with a color + context.fillStyle = 'black'; + context.fillRect(0, 0, canvas.width, canvas.height); + } + } + }, []); + + const manipulatePixel = (x: number, y: number) => { + const context = contextRef.current; + if (context) { + // Get the pixel data + const imageData = context.getImageData(x, y, 1, 1); + const data = imageData.data; + + // Manipulate the pixel (invert color) + data[0] = 255; // Red + data[1] = 255; // Green + data[2] = 255; // Blue + context.putImageData(imageData, x, y); + context.putImageData(imageData, x+1, y); + context.putImageData(imageData, x-1, y); + context.putImageData(imageData, x, y+1); + context.putImageData(imageData, x, y-1); + } + }; + + const handleClick = (event: React.MouseEvent) => { + const canvas = canvasRef.current; + if (canvas && isPressed) { + const rect = canvas.getBoundingClientRect(); + const x = Math.floor(event.clientX - rect.left); + const y = Math.floor(event.clientY - rect.top); + manipulatePixel(x, y); + } else { + isPressed = false; + } + }; + + const moveDown = (event: React.MouseEvent) => { + isPressed = true; + handleClick(event) + }; + + const moveUp = () => { + isPressed = false; + }; + + return ( +
+

Welcome to Patrick-Paintâ„¢.

+

+ +
+ ); +}; export default Patrick; -- 2.39.5 From 595b50585bc8b352601a101b7828bc5ea6790647 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 20:18:21 +0200 Subject: [PATCH 02/13] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e01ae73..f4e81ff 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev -p 3001", "build": "next build", "start": "next start", "lint": "next lint" -- 2.39.5 From 47e7c006bff5cf47f54c3222c6e878151386a7da Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 20:57:29 +0200 Subject: [PATCH 03/13] Update next.config.mjs --- next.config.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 4678774..4eef611 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,6 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + basePath: '/react', +}; export default nextConfig; -- 2.39.5 From f812ac1d2bd04c1a7414a9d6723020de4cbdd79b Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:10:21 +0200 Subject: [PATCH 04/13] Update next.config.mjs --- next.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/next.config.mjs b/next.config.mjs index 4eef611..56b835f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { basePath: '/react', + assetPrefix: 'https://interstellardevelopment.org', }; export default nextConfig; -- 2.39.5 From ca090ed4ab69c3f13673b9be1867753c242951c9 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:11:49 +0200 Subject: [PATCH 05/13] Update next.config.mjs --- next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 56b835f..b83b98f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,7 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { basePath: '/react', - assetPrefix: 'https://interstellardevelopment.org', + assetPrefix: 'https://interstellardevelopment.org/react', }; export default nextConfig; -- 2.39.5 From 02156bd30c88e5253044c6894470862f58b591c6 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:13:28 +0200 Subject: [PATCH 06/13] Update next.config.mjs --- next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index b83b98f..16effd2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,7 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { basePath: '/react', - assetPrefix: 'https://interstellardevelopment.org/react', + assetPrefix: '/react', }; export default nextConfig; -- 2.39.5 From f6fabd0c2c7f053041ae0421d3d11c80ae9ca39d Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:15:18 +0200 Subject: [PATCH 07/13] Update next.config.mjs --- next.config.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 16effd2..4eef611 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,7 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { basePath: '/react', - assetPrefix: '/react', }; export default nextConfig; -- 2.39.5 From cc42680e3490424529152cc536107e7b9a08d841 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:17:26 +0200 Subject: [PATCH 08/13] Update app/LandingPage.tsx --- app/LandingPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/LandingPage.tsx b/app/LandingPage.tsx index d5e54f4..2eac8ed 100644 --- a/app/LandingPage.tsx +++ b/app/LandingPage.tsx @@ -14,7 +14,7 @@ const Home = () => {
- Patrick + Patrick

Patrick

Patrick is a highly skilled programmer with expertise in Java, GDScript, Bash, C, C++, and C#. He excels in developing scalable applications, automating tasks, and crafting interactive games. Additionally, Patrick is proficient in system administration, adeptly managing and optimizing IT infrastructures for smooth and secure operations. @@ -24,7 +24,7 @@ const Home = () => {

- Luca + Luca

Luca

Luca, Patrick's co-programmer, is skilled in Java, GDScript, Bash, and Basic Typewriter. His expertise in Java and GDScript supports robust application and game development, while his Bash scripting skills streamline automation. His knowledge of Basic Typewriter adds a classic touch to his versatile programming capabilities. @@ -34,7 +34,7 @@ const Home = () => {

- Yasin + Yasin

Yasin

Yasin is a proficient programmer with expertise in Java, where he has even developed games, as well as Bash, HTML, CSS, SQL, and NoSQL. His skills span from backend development and automation to web design and database management, making him a versatile asset in any tech project. -- 2.39.5 From dc850140b33a93b0fa726ed271dc6e5c6572a88d Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:21:06 +0200 Subject: [PATCH 09/13] Update app/LandingPage.tsx --- app/LandingPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/LandingPage.tsx b/app/LandingPage.tsx index 2eac8ed..401ffc8 100644 --- a/app/LandingPage.tsx +++ b/app/LandingPage.tsx @@ -14,7 +14,7 @@ const Home = () => {

- Patrick + Patrick

Patrick

Patrick is a highly skilled programmer with expertise in Java, GDScript, Bash, C, C++, and C#. He excels in developing scalable applications, automating tasks, and crafting interactive games. Additionally, Patrick is proficient in system administration, adeptly managing and optimizing IT infrastructures for smooth and secure operations. @@ -24,7 +24,7 @@ const Home = () => {

- Luca + Luca

Luca

Luca, Patrick's co-programmer, is skilled in Java, GDScript, Bash, and Basic Typewriter. His expertise in Java and GDScript supports robust application and game development, while his Bash scripting skills streamline automation. His knowledge of Basic Typewriter adds a classic touch to his versatile programming capabilities. @@ -34,7 +34,7 @@ const Home = () => {

- Yasin + Yasin

Yasin

Yasin is a proficient programmer with expertise in Java, where he has even developed games, as well as Bash, HTML, CSS, SQL, and NoSQL. His skills span from backend development and automation to web design and database management, making him a versatile asset in any tech project. -- 2.39.5 From d2ddd362a9652e3d9d92ac85ca83cad6b764fcfe Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:21:29 +0200 Subject: [PATCH 10/13] Update app/App.css --- app/App.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/App.css b/app/App.css index cc0b3e2..adb37ea 100644 --- a/app/App.css +++ b/app/App.css @@ -15,7 +15,7 @@ body { flex-direction: column; min-height: 100vh; margin-top: 10em; - background-image: url(/img/image.png); + background-image: url(/react/public/img/image.png); background-repeat: no-repeat; background-size: cover; background-position: center; -- 2.39.5 From bab57ab5a89a41823a9f8c0815c2fdb573d92f66 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:24:16 +0200 Subject: [PATCH 11/13] Update app/App.css --- app/App.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/App.css b/app/App.css index adb37ea..84e506f 100644 --- a/app/App.css +++ b/app/App.css @@ -15,7 +15,7 @@ body { flex-direction: column; min-height: 100vh; margin-top: 10em; - background-image: url(/react/public/img/image.png); + background-image: url(/react/react/public/img/image.png); background-repeat: no-repeat; background-size: cover; background-position: center; -- 2.39.5 From 8e4ba2de7477f685d08fedaefb89fe4aa94582d6 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:27:26 +0200 Subject: [PATCH 12/13] Update app/App.css --- app/App.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/App.css b/app/App.css index 84e506f..cc0b3e2 100644 --- a/app/App.css +++ b/app/App.css @@ -15,7 +15,7 @@ body { flex-direction: column; min-height: 100vh; margin-top: 10em; - background-image: url(/react/react/public/img/image.png); + background-image: url(/img/image.png); background-repeat: no-repeat; background-size: cover; background-position: center; -- 2.39.5 From 8438ec2f9c4780619813bfb1c737a9c7d7607c1f Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 4 Sep 2024 21:27:47 +0200 Subject: [PATCH 13/13] Update app/LandingPage.tsx --- app/LandingPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/LandingPage.tsx b/app/LandingPage.tsx index 401ffc8..d5e54f4 100644 --- a/app/LandingPage.tsx +++ b/app/LandingPage.tsx @@ -14,7 +14,7 @@ const Home = () => {

- Patrick + Patrick

Patrick

Patrick is a highly skilled programmer with expertise in Java, GDScript, Bash, C, C++, and C#. He excels in developing scalable applications, automating tasks, and crafting interactive games. Additionally, Patrick is proficient in system administration, adeptly managing and optimizing IT infrastructures for smooth and secure operations. @@ -24,7 +24,7 @@ const Home = () => {