Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
12 changes: 5 additions & 7 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const yaml = require("js-yaml");
const fs = require("node:fs/promises");

module.exports = function (eleventyConfig) {
eleventyConfig.addShortcode("currentYear", function () {
return new Date().getFullYear();
});
module.exports = (eleventyConfig) => {
eleventyConfig.addShortcode("currentYear", () => new Date().getFullYear());
// Add this line to copy your external assets
eleventyConfig.addPassthroughCopy("src/assets");
// 1. Recognize YAML as a template format
Expand All @@ -20,19 +19,18 @@ module.exports = function (eleventyConfig) {
};
},
getData: async (inputPath) => {
const fs = require("fs/promises");
const content = await fs.readFile(inputPath, "utf-8");
return yaml.load(content);
},
});

// 2. The Randomized Collection
eleventyConfig.addCollection("randomPeople", function (collectionApi) {
eleventyConfig.addCollection("randomPeople", (collectionApi) => {
// Grab all yaml files from the users folder
const people = collectionApi.getFilteredByGlob("src/users/*.yaml");

// Create a copy of the array to avoid mutating the original global collection
let shuffled = [...people];
const shuffled = [...people];

// Fisher-Yates Shuffle
for (let i = shuffled.length - 1; i > 0; i--) {
Expand Down
13 changes: 3 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_stages: [pre-commit, pre-push]
minimum_prek_version: "0.2.22"
minimum_pre_commit_version: "0.2.22"
default_language_version:
python: python3
node: 24.13.0
Expand Down Expand Up @@ -118,17 +118,10 @@ repos:
hooks:
- id: biome-check
name: run biome-check
description: Run Biome linter and formatter for JSON files
description: Run Biome linter and formatter for JS and JSON files
types_or: [javascript, json]
additional_dependencies: ["@biomejs/biome"]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
name: run prettier
types_or: [css, html, javascript, json, markdown, yaml]
additional_dependencies: ["prettier@3.8.1"]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.0
hooks:
Expand Down
6 changes: 3 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
"files": {
"includes": ["**/*.json"]
},
"linter": {
"enabled": true,
"rules": {
Expand All @@ -13,5 +10,8 @@
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"files": {
"includes": ["**/*.js", "**/*.json"]
}
}
4 changes: 2 additions & 2 deletions src/_data/build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { execSync } = require("child_process");
const { execSync } = require("node:child_process");

module.exports = () => {
const now = new Date();
Expand All @@ -13,7 +13,7 @@ module.exports = () => {
try {
// Get the short git hash (first 7 characters)
gitHash = execSync("git rev-parse --short HEAD").toString().trim();
} catch (e) {
} catch (_e) {
console.warn("Could not fetch git hash, defaulting to 'development'");
}

Expand Down
14 changes: 0 additions & 14 deletions src/assets/css/style.css
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this CSS ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's required This file contains custom theming the Developer Tools panel Matrix effects and user card styling that Tailwind doesn't cover. It's linked in index.njk and bio.njk I have reverted it to match main in this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the deleted lines from 915 onwards ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have properly reverted the file to match main. The deleted lines have been restored. The file is now identical to main with no changes in this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -912,17 +912,3 @@ a:hover {
opacity: 0;
}
}
#phaser-container {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 9999; /* Ensures it sits ABOVE your website content */
pointer-events: none; /* Let's start with none so it doesn't block the heart */
}

/* Ensure the canvas itself fills the container */
#phaser-container canvas {
display: block;
}
37 changes: 16 additions & 21 deletions src/assets/js/eggs.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const emojiBurst = [

let heartClickCount = 0;
let phaserStarted = false;
let gameInstance;
let _gameInstance;
let player;
let cursors;
let aliens;
Expand Down Expand Up @@ -110,7 +110,7 @@ function initPhaserGame() {
},
};

gameInstance = new Phaser.Game(config);
_gameInstance = new Phaser.Game(config);
}

// 4. PHASER SCENE FUNCTIONS
Expand Down Expand Up @@ -187,40 +187,35 @@ function spawnExplosion(scene) {
}

function setupSpaceInvaders() {
const scene = this;

// Player Rocket
player = scene.add.text(
window.innerWidth / 2,
window.innerHeight - 80,
"🚀",
{ fontSize: "50px" },
);
scene.physics.add.existing(player);
player = this.add.text(window.innerWidth / 2, window.innerHeight - 80, "🚀", {
fontSize: "50px",
});
this.physics.add.existing(player);
player.body.setCollideWorldBounds(true);

// Bullets
bullets = scene.physics.add.group();
bullets = this.physics.add.group();

// Aliens Grid - Adjusted for smaller size
aliens = scene.physics.add.group();
aliens = this.physics.add.group();
const rows = 5;
const cols = 10;
const spacingX = 50; // Tighter horizontal spacing
const spacingY = 45; // Tighter vertical spacing

for (let y = 0; y < rows; y++) {
for (let x = 0; x < cols; x++) {
let alienEmoji = ["👾", "👽", "🛸", "🐙", "👾"][y];
const alienEmoji = ["👾", "👽", "🛸", "🐙", "👾"][y];
// Shrink from 35px to 24px
let alien = scene.add.text(
const alien = this.add.text(
x * spacingX + 80,
y * spacingY + 80,
alienEmoji,
{ fontSize: "24px" },
);

scene.physics.add.existing(alien);
this.physics.add.existing(alien);
alien.body.setAllowGravity(false);
// Shrink the collision box to match the smaller emoji
alien.body.setSize(24, 24);
Expand All @@ -230,16 +225,16 @@ function setupSpaceInvaders() {
}

// Alien Movement Timer
scene.alienDirection = 1;
scene.time.addEvent({
this.alienDirection = 1;
this.time.addEvent({
delay: 800,
callback: moveAliens,
callbackScope: scene,
callbackScope: this,
loop: true,
});

// Collisions
scene.physics.add.overlap(bullets, aliens, (bullet, alien) => {
this.physics.add.overlap(bullets, aliens, (bullet, alien) => {
bullet.destroy();
alien.destroy();
if (aliens.countActive() === 0) {
Expand All @@ -248,7 +243,7 @@ function setupSpaceInvaders() {
}
});

cursors = scene.input.keyboard.createCursorKeys();
cursors = this.input.keyboard.createCursorKeys();
}

function moveAliens() {
Expand Down
Loading