diff --git a/Dockerfile b/Dockerfile index 5e82aa3..413c4a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN npm run build WORKDIR /usr/share/nginx/html COPY index.html . COPY default.css . +COPY pages/ . RUN mkdir -p /usr/share/nginx/html/public diff --git a/default.css b/default.css index 90107a7..2ff93d1 100644 --- a/default.css +++ b/default.css @@ -1,75 +1,67 @@ +/* + * base text: #06CDFF + * important text: #8200FF + * background: #03001C + */ + body { font-family: Arial, sans-serif; - font-size: 14px; - color: #cad3f5; + color: #06CDFF; + background: #03001C; line-height: 1.5; - max-width: 1920px; margin-inline: auto; - background: #24273a; - margin: 0px auto; + margin: 0 auto; +} + +.inside { + max-width: 80rem; + margin: 0 auto; + padding: 2rem 1.5rem; } #navigation { - background: #181926; - display: flex; - border-bottom-left-radius: 18px; - border-bottom-right-radius: 18px; + padding: 1rem; + text-align: center; } -.navItem { - margin: 6px; - margin-top: 0px; - padding: 8px; - line-height: 21px; +.trianta { + font-size: 3.5rem !important; + color: #06CDFF !important; + border: none !important; + margin: -1rem; +} + +.canvas { + margin: auto; display: inline-block; + width: 60rem; + vertical-align: bottom; + border: solid 4px #06CDFF; } -#top { - margin-bottom: 6px; - border-radius: 16px; - border-top-left-radius: 0px; - margin: 4px auto; - margin-top: 0px; - height: 55px; -} - -#main { - /*background: #1e2030;*/ -} - -.cardStats { +.stats { font-size: 18px; + display: inline-block; + width: 12rem; + vertical-align: middle; } h1 { - width: 130px; - text-align: center; - display: inline-block; - font-size: 1.8rem; - margin: 0px; - padding: 8px; - border-top-left-radius: 18px; - border-top-right-radius: 18px; + max-width: 650px; + text-align: left; + padding: 8px 1.5rem; } h2 { - color: #6c6f85; - font-size: 1.8rem; + border: solid 2px #06CDFF; + margin: auto; + padding: 8px; text-align: center; - margin-top: 0; - margin-bottom: 0.5rem; + width: 400px; } h3 { - color: #dc8a78; - font-size: 1.3rem; - margin-top: 0; - margin-bottom: 0; -} - -h4 { - color: #8c8fa1; - font-size: 1.1rem; + text-align: center; margin-top: 0; margin-bottom: 0.5rem; } @@ -79,67 +71,64 @@ p { } a { - text-decoration: none; + background-color: #03001C; + border: solid 2px #06CDFF; + border-radius: 12px; + color: #06CDFF; + display: inline-block; + margin: 6px; + margin-top: 0px; + max-width: 8rem; padding: 8px; - color: #8aadf4; + text-align: center; + text-decoration: none; + width: 100%; } a:hover, a:active { - border-radius: 9px; text-decoration: underline; - text-shadow: 1px 1px 1px #333; - animation: hover 3s linear infinite; } a.button { margin: 14px 10%; padding: 4px 12px; - border: 1px outset #494d64; - border-radius: 9px; - color: #8aadf4; display: inline-block; - background-color: #363a4f; text-decoration: none; width: 80px; text-align: center; } +a:visited { + border: solid 2px #8200FF; + color: #8200FF; +} + @keyframes hover { - 0% { box-shadow: 0 0 8px 4px #24273a; } - 15% { box-shadow: 0 0 8px 4px #494d64; } - 50% { box-shadow: 0 0 8px 4px #b7bdf8; } - 85% { box-shadow: 0 0 8px 4px #494d64; } - 100% { box-shadow: 0 0 8px 4px #24273a; } + 0% { box-shadow: 0 0 8px 4px #eff1f5; } + 15% { box-shadow: 0 0 8px 4px #bcc0cc; } + 50% { box-shadow: 0 0 8px 4px #7287fd; } + 85% { box-shadow: 0 0 8px 4px #bcc0cc; } + 100% { box-shadow: 0 0 8px 4px #eff1f5; } } @keyframes card { - 0% { box-shadow: 0 0 8px 4px #24273a; } - 50% { box-shadow: 0 0 8px 4px #df8e1d; } - 100% { box-shadow: 0 0 8px 4px #24273a; } + 0% { box-shadow: 0 0 8px 4px #eff1f5; } + 50% { box-shadow: 0 0 8px 4px #fe640b; } + 100% { box-shadow: 0 0 8px 4px #eff1f5; } } .card { - background: #363a4f; text-align: center; - border-radius: 6px; - border-top-left-radius: 18px; - border-top-right-radius: 18px; - animation: card 3s linear infinite; - width: 800px; - height: 800px; margin: 0px auto; margin-top: 25px; margin-bottom: 25px; } -.cardTop { - background: #1e2030; - border-top-left-radius: 18px; - border-top-right-radius: 18px; +.reserve { + max-height: 800px; } #pong { margin: 6px; - border-radius: 9px; - background: #494d64; + background: #03001C; } diff --git a/index.html b/index.html index a399945..1fcb420 100644 --- a/index.html +++ b/index.html @@ -1,38 +1,23 @@ - - Trianta - + + Trianta + - -
-
-

Pong

- - - - -

Left Paddle Height:

-

Right Paddle Height:

- View Code +
+
+ TRIANTA +

Function over form by design

-
-

Snake

- - -

Snake Head Location:

-

Food Location:

- View Code +
diff --git a/pages/completed/.htaccess b/pages/completed/.htaccess new file mode 100644 index 0000000..717ec6f --- /dev/null +++ b/pages/completed/.htaccess @@ -0,0 +1 @@ +DirectoryIndex index.html diff --git a/pages/completed/index.html b/pages/completed/index.html new file mode 100644 index 0000000..fd6d589 --- /dev/null +++ b/pages/completed/index.html @@ -0,0 +1,61 @@ + + + + + Trianta + + + +
+
+ TRIANTA +

Function over form by design

+
+ +

Completed Projects

+
+
+ + + + +
+
+

Pong

+

Left Paddle Height:

+

Right Paddle Height:

+ View Code +
+
+
+
+ + +
+
+

Snake

+

+ Adjust game size -- Width: + + Height: + +

+

Snake Head Location:

+

Food Location:

+ View Code +
+
+
+ + diff --git a/pages/contact/.htaccess b/pages/contact/.htaccess new file mode 100644 index 0000000..717ec6f --- /dev/null +++ b/pages/contact/.htaccess @@ -0,0 +1 @@ +DirectoryIndex index.html diff --git a/pages/contact/index.html b/pages/contact/index.html new file mode 100644 index 0000000..f6bc55c --- /dev/null +++ b/pages/contact/index.html @@ -0,0 +1,27 @@ + + + + + Trianta + + + +
+
+ TRIANTA +

Function over form by design

+
+ +

Contact Methods

+

E-mail: gregcraw2001@gmail.com

+

Discord: trianta

+
+ + diff --git a/pages/current/.htaccess b/pages/current/.htaccess new file mode 100644 index 0000000..717ec6f --- /dev/null +++ b/pages/current/.htaccess @@ -0,0 +1 @@ +DirectoryIndex index.html diff --git a/pages/current/index.html b/pages/current/index.html new file mode 100644 index 0000000..5ebb764 --- /dev/null +++ b/pages/current/index.html @@ -0,0 +1,38 @@ + + + + + Trianta + + + +
+
+ TRIANTA +

Function over form by design

+
+ +

Current Personal Projects

+
+

Wrench

+

Description: A simple application to handle all of your Linux configuration needs.

+

Language: C++26

+

Tools: CMake

+

Frameworks: Qt6

+ View Repository +
+
+

Synopsis

+

Description: A markdown repository containing details and changes of servers I maintain.

+ View Repository +
+
+ + diff --git a/pages/other/.htaccess b/pages/other/.htaccess new file mode 100644 index 0000000..717ec6f --- /dev/null +++ b/pages/other/.htaccess @@ -0,0 +1 @@ +DirectoryIndex index.html diff --git a/pages/other/index.html b/pages/other/index.html new file mode 100644 index 0000000..0552553 --- /dev/null +++ b/pages/other/index.html @@ -0,0 +1,68 @@ + + + + + Trianta + + + +
+
+ TRIANTA +

Function over form by design

+
+ +

Other Projects

+
+

Hyprland

+

Description: An independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.

+ View Repository +

Language: C++26

+

Tools: CMake

+

and various libraries.

+

Contributions (newest first)

+ hyprwm/Hyprland#8323 + hyprwm/Hyprland#8044 + hyprwm/Hyprland#7959 +
+ hyprwm/Hyprland#7755 + hyprwm/Hyprland#7683 + hyprwm/Hyprland#7633 +
+ hyprwm/Hyprland#7575 + hyprwm/Hyprland#7458 + hyprwm/Hyprland#6652 +
+
+

Proxy

+

Description: A program written in C++ to act as a proxy for another server.

+ View Repository +

Language: C++11

+

Tools: CMake

+

Testing Frameworks: Unity Test (ThrowTheSwitch)

+
+
+

Cloudcare

+

Description: A sample repository that uses downloaded .bed files to train a model on DNA using PyTorch.

+ View Repository +

Languages: Python, Bash

+

Libraries: PyTorch

+

Tools: Conda

+
+
+

N-Queens

+

Description: The N-Queens problem recreated in C++ which gets solved using a Genetic Algorithm.

+ View Repository +

Language: C++11

+

Tools: CMake

+
+
+ + diff --git a/src/snake.ts b/src/snake.ts index 236ac7d..9563c75 100644 --- a/src/snake.ts +++ b/src/snake.ts @@ -158,7 +158,7 @@ class SnakeCore { else if (isBitSet(g_snake.board[i][j], BoardState.FOOD)) g_snake.context.fillStyle = "red"; else - g_snake.context.fillStyle = "black"; + continue; g_snake.context.fillRect(j * g_snake.grid, i * g_snake.grid, g_snake.grid, g_snake.grid); } } @@ -169,6 +169,21 @@ class SnakeCore { document.getElementById("snakeHead").innerHTML = "x: " + this.body[this.body.length - 1].x + " y: " + this.body[this.body.length - 1].y; document.getElementById("snakeFood").innerHTML = "x: " + this.food.x + " y: " + this.food.y ; } + + // Update width and height from page to match game + getPageNumbers() { + let specifiedWidth = parseInt((document.getElementById("snakeWidth") as HTMLInputElement).value); + let specifiedHeight = parseInt((document.getElementById("snakeHeight") as HTMLInputElement).value); + if (this.width == specifiedWidth && this.height == specifiedHeight) + return false; + this.width = specifiedWidth; + this.height = specifiedHeight; + while (this.height > this.board.length) + this.board.push(new Array(this.width)); + this.canvas.setAttribute("width", String(specifiedWidth * this.grid)); + this.canvas.setAttribute("height", String(specifiedHeight * this.grid)); + return true; + } } class Bot { @@ -270,7 +285,7 @@ const g_snakebot: Bot = new Bot(); // game loop function snakeloop() { // Reset of needed - if (g_snake.gameover) + if (g_snake.gameover || g_snake.getPageNumbers()) g_snake.reset(); // Simulate movement of snake