Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
def82e2
Add typescript migration draft
akumm2k Aug 9, 2025
f4c3c5d
Update tsconfig
akumm2k Aug 10, 2025
2e8fbde
Refactor css for width limit
akumm2k Dec 9, 2025
2b38fe0
GitIgnore node_modules
akumm2k Dec 9, 2025
3997107
Use transpiled js in index.html
akumm2k Dec 9, 2025
467634f
Update css
akumm2k Dec 9, 2025
93afd91
Add html validation action
akumm2k Dec 9, 2025
a90976f
Fix github action version
akumm2k Dec 9, 2025
7bc6836
Fix ts -> js import conversion
akumm2k Dec 10, 2025
7f65564
Update project highlights
akumm2k Dec 14, 2025
36736e4
Ignore jekyll generated files
akumm2k Dec 14, 2025
f58fea5
Add teaching articles via jekyll rendering
akumm2k Dec 14, 2025
52cad25
Fix html validation workflow by excluding jekyll yt component
akumm2k Dec 14, 2025
ac3cb53
Use const iterator in proj_highlighter
akumm2k Dec 14, 2025
c550897
Revert to inline blacklist in github workflow
akumm2k Dec 14, 2025
716cf9a
Fix github workflow blacklist
akumm2k Dec 14, 2025
7508d68
Fix c-sharp id to match the one used in ts
akumm2k Dec 14, 2025
03842fe
Try more exclusion patterns in html validation workflow
akumm2k Dec 14, 2025
68a0b46
Add consistency to const naming
akumm2k Dec 14, 2025
155fc1d
Fix no-space-between-attr error in index.html
akumm2k Dec 14, 2025
529b9f8
Try extra key in github workflow to ignore _includes
akumm2k Dec 14, 2025
52da4bb
Add strict null check to tsconfig
akumm2k Dec 14, 2025
dc11b42
Fix assertion check in proj_highlighter.ts
akumm2k Dec 14, 2025
2de808a
Fix validation checks in index.html
akumm2k Dec 14, 2025
93f5449
Remove unused erasableSyntaxOnly field from tsconfig
akumm2k Dec 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
max_line_length = 120
insert_final_newline = true

[*.ts]
indent_style = space
indent_size = 2
18 changes: 18 additions & 0 deletions .github/workflows/html-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: HTML Validation

on:
pull_request:
branches: [ '*' ]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate HTML
uses: Cyb3r-Jak3/html5validator-action@v7.2.0
with:
root: .
blacklist: .git,.github,node_modules
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
node_modules/
23 changes: 4 additions & 19 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ body {
transition: filter ease 0.7s;
}

.icon-container i:hover, .icon-container svg:hover, .icon-container i.hover,
.icon-container svg.hover {
.icon-container i:hover, .icon-container svg:hover,
.icon-container i.hover, .icon-container svg.hover {
filter: contrast(1);
filter: brightness(1);
transition: filter 0.7s;
Expand Down Expand Up @@ -160,29 +160,14 @@ body.light-mode-body {
}

header {
height: 6rem;
}

header nav ul {
display: flex;
width: 100%;
float: none !important;
justify-content: center;
align-items: center;
padding: 1rem 0 0 0;
height: 4rem;
}
}

@media only screen and (max-width: 610px) {
body {
margin: 1rem 1rem;
}

header nav ul {
justify-content: space-around;
align-items: flex-end;
}

}

/* de-emphasize underlines */
Expand All @@ -195,4 +180,4 @@ ol.proj-list li a:hover {
}
ol.proj-list li {
margin: 5px 0;
}
}
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ <h2>Contact</h2>
<span class="blob"></span>
</label>
</div>
<script src="./js/age.js"></script>
<script src="./js/invert.js"></script>
<script src="./js/proj-highlighter.js"></script>
<script type="module" src="./ts/dist/age.js"></script>
<script type="module" src="./ts/dist/invert.js"></script>
<script type="module" src="./ts/dist/proj_highlighter.js"></script>
</body>
</html>
12 changes: 0 additions & 12 deletions js/age.js

This file was deleted.

19 changes: 0 additions & 19 deletions js/invert.js

This file was deleted.

34 changes: 0 additions & 34 deletions js/proj-highlighter.js

This file was deleted.

3 changes: 3 additions & 0 deletions ts/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
build
7 changes: 7 additions & 0 deletions ts/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"semi": true,
"trailingComma": "es5",
"printWidth": 72,
"tabWidth": 2
}
20 changes: 20 additions & 0 deletions ts/dist/age.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function calculateAge(birthday) {
const today = new Date();
const yearsSinceBirth = today.getUTCFullYear() - birthday.getUTCFullYear();
const birthMonth = birthday.getUTCMonth();
const currMonth = today.getUTCMonth();
const todayDate = today.getUTCDate();
const birthDate = birthday.getUTCDate();
if (currMonth < birthMonth ||
(currMonth === birthMonth && todayDate < birthDate)) {
return yearsSinceBirth - 1;
}
return yearsSinceBirth;
}
const MY_BIRTHDAY = new Date(Date.UTC(2002, 4, 24));
const MY_AGE = calculateAge(MY_BIRTHDAY);
const aboutParagraph = document.querySelector('#about > p');
if (aboutParagraph) {
aboutParagraph.textContent += ` I am ${MY_AGE} years old.`;
}
export {};
11 changes: 11 additions & 0 deletions ts/dist/constants/projects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const PROJECTS = {
REVERSI: 'reversi',
MAZE_RUNNER_PAGE_READER: 'maze-runner-page-reader',
SUDOKU_SOLVER: 'sudoku-solver',
CRUD_APP: 'crud-app',
RB_TREE: 'rbTree',
GAUSS: 'gauss',
DICE_ROLLER: 'diceRoller',
PORTFOLIO: 'portfolio',
WEB_STUDIO: 'web-studio',
};
14 changes: 14 additions & 0 deletions ts/dist/constants/tools.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const TOOLS = {
JAVA: 'java',
JAVASCRIPT: 'javascript',
TYPESCRIPT: 'typescript',
PYTHON: 'python',
CSS3: 'css3',
HTML5: 'html5',
GIT: 'git',
C_SHARP: 'csharp',
GITLAB: 'gitlab',
GITHUB: 'github',
CPP: 'cpp',
PHP: 'php',
};
20 changes: 20 additions & 0 deletions ts/dist/invert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const DARK_MODE_CHECKBOX = document.querySelector('#dark-mode-checkbox');
const body = document.body;
const DARK_MODE = 'dark-mode-body', LIGHT_MODE = 'light-mode-body';
if (DARK_MODE_CHECKBOX) {
DARK_MODE_CHECKBOX.addEventListener('change', () => {
body.classList.toggle(DARK_MODE);
body.classList.toggle(LIGHT_MODE);
});
if (window.matchMedia &&
window.matchMedia('(prefers-color-scheme: dark)').matches) {
DARK_MODE_CHECKBOX.checked = true;
body.classList.toggle(DARK_MODE);
}
if (window.matchMedia &&
window.matchMedia('(prefers-color-scheme: light)').matches) {
DARK_MODE_CHECKBOX.checked = false;
body.classList.toggle(LIGHT_MODE);
}
}
export {};
54 changes: 54 additions & 0 deletions ts/dist/proj_highlighter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { TOOLS } from './constants/tools';
import { PROJECTS } from './constants/projects';
const PROJ_NODES = document.querySelectorAll('ol.proj-list > li > a');
const PROJ_STACK = {
[PROJECTS.REVERSI]: [TOOLS.JAVA, TOOLS.GITHUB],
[PROJECTS.MAZE_RUNNER_PAGE_READER]: [TOOLS.PYTHON],
[PROJECTS.SUDOKU_SOLVER]: [TOOLS.CPP, TOOLS.GIT, TOOLS.GITLAB],
[PROJECTS.CRUD_APP]: [
TOOLS.PHP,
TOOLS.JAVASCRIPT,
TOOLS.CSS3,
TOOLS.HTML5,
TOOLS.GIT,
],
[PROJECTS.RB_TREE]: [TOOLS.C_SHARP, TOOLS.GIT, TOOLS.GITLAB],
[PROJECTS.GAUSS]: [TOOLS.PYTHON, TOOLS.GITLAB],
[PROJECTS.DICE_ROLLER]: [TOOLS.CPP, TOOLS.GITLAB],
[PROJECTS.PORTFOLIO]: [
TOOLS.JAVASCRIPT,
TOOLS.HTML5,
TOOLS.CSS3,
TOOLS.GIT,
TOOLS.GITHUB,
],
[PROJECTS.WEB_STUDIO]: [
TOOLS.JAVASCRIPT,
TOOLS.HTML5,
TOOLS.CSS3,
TOOLS.GIT,
TOOLS.GITHUB,
],
};
Object.keys(PROJ_STACK).forEach((project) => {
const projElement = document.getElementById(project);
console.assert(projElement !== undefined, `${project} is not present in html`);
});
PROJ_NODES.forEach((proj) => {
proj.addEventListener('mouseover', () => {
for (let tech of PROJ_STACK[proj.id]) {
const techElement = document.getElementById(tech);
if (techElement !== null) {
techElement.classList.add('hover');
}
}
});
proj.addEventListener('mouseout', () => {
for (let tech of PROJ_STACK[proj.id]) {
const techElement = document.getElementById(tech);
if (techElement !== null) {
techElement.classList.remove('hover');
}
}
});
});
9 changes: 9 additions & 0 deletions ts/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
Comment thread
akumm2k marked this conversation as resolved.

export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
Comment thread
akumm2k marked this conversation as resolved.
tseslint.configs.recommended,
]);
Loading