Skip to content

Commit

Permalink
Merge pull request #2 from Lindwen/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
Lindwen authored Jul 13, 2024
2 parents cf4797d + f2dd1a9 commit fe0bb8a
Show file tree
Hide file tree
Showing 16 changed files with 455 additions and 369 deletions.
3 changes: 1 addition & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "daily"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[![deploy](https://github.com/Lindwen/personnal-website/actions/workflows/deploy.yml/badge.svg)](https://github.com/Lindwen/personnal-website/actions/workflows/deploy.yml)
[![deploy](https://github.com/Lindwen/personnal-website/actions/workflows/deploy.yml/badge.svg)](https://github.com/Lindwen/personnal-website/actions/workflows/deploy.yml)
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
services:

lindwen_fr:
container_name: lindwen_fr
image: ghcr.io/static-web-server/static-web-server:2
Expand All @@ -24,4 +23,3 @@ services:
networks:
proxy-net:
external: true
...
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "personnal-website",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"prettier": "3.3.2"
}
}
24 changes: 24 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions public/assets/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
::selection {
color: #00FF78;
color: #00ff78;
}

@keyframes bounce {

0%,
100%,
20%,
50%,
80% {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0)
transform: translateY(0);
}

40% {
-webkit-transform: translateY(-30px);
-ms-transform: translateY(-30px);
transform: translateY(-30px)
transform: translateY(-30px);
}

60% {
-webkit-transform: translateY(-15px);
-ms-transform: translateY(-15px);
transform: translateY(-15px)
transform: translateY(-15px);
}
}

Expand All @@ -44,4 +43,4 @@ figure:hover {
cursor: grab;
animation-name: bounce;
-moz-animation-name: bounce;
}
}
2 changes: 1 addition & 1 deletion public/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ document.addEventListener("DOMContentLoaded", () => {

console.log(
"%cSTOP! ✋ This area is intended for developers.",
"font-size: 18px; font-weight: 700; color: red;"
"font-size: 18px; font-weight: 700; color: red;",
);
const konamiCode = [
"ArrowUp",
Expand Down
4 changes: 2 additions & 2 deletions public/assets/js/oneko-ie6.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ function neko() {

nekoPosX = Math.min(
Math.max(16, nekoPosX),
document.getElementsByTagName("body")[0].clientWidth - 16
document.getElementsByTagName("body")[0].clientWidth - 16,
);
nekoPosY = Math.min(
Math.max(16, nekoPosY),
document.getElementsByTagName("body")[0].clientHeight - 16
document.getElementsByTagName("body")[0].clientHeight - 16,
);

nekoEl.style.left = nekoPosX - 16 + "px";
Expand Down
18 changes: 7 additions & 11 deletions public/assets/js/oneko-webring.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

// please use data-neko="true" on your A elements that link to another site with oneko-webring.js instead of this
// this is deprecated and will eventually be removed
const nekoSites = [
"localhost",
];

const nekoSites = ["localhost"];

try {
const searchParams = location.search
.replace("?", "")
Expand Down Expand Up @@ -154,10 +152,10 @@
nekoEl.style.top = `${nekoPosY - 16}px`;
nekoEl.style.zIndex = Number.MAX_VALUE;

let nekoFile = "assets/img/oneko.gif"
const curScript = document.currentScript
let nekoFile = "assets/img/oneko.gif";
const curScript = document.currentScript;
if (curScript && curScript.dataset.cat) {
nekoFile = curScript.dataset.cat
nekoFile = curScript.dataset.cat;
}
nekoEl.style.backgroundImage = `url(${nekoFile})`;

Expand All @@ -182,8 +180,8 @@
lastFrameTimestamp = timestamp;
}
if (timestamp - lastFrameTimestamp > 100) {
lastFrameTimestamp = timestamp
frame()
lastFrameTimestamp = timestamp;
frame();
}

window.requestAnimationFrame(onAnimationFrame);
Expand Down Expand Up @@ -255,8 +253,6 @@
idleAnimationFrame += 1;
}



function frame() {
frameCount += 1;
const diffX = nekoPosX - mousePosX;
Expand Down
28 changes: 15 additions & 13 deletions public/assets/js/oneko.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@
nekoEl.style.top = `${nekoPosY - 16}px`;
nekoEl.style.zIndex = Number.MAX_VALUE;

let nekoFile = "assets/img/oneko.gif"
const curScript = document.currentScript
let nekoFile = "assets/img/oneko.gif";
const curScript = document.currentScript;
if (curScript && curScript.dataset.cat) {
nekoFile = curScript.dataset.cat
nekoFile = curScript.dataset.cat;
}
nekoEl.style.backgroundImage = `url(${nekoFile})`;

Expand All @@ -124,8 +124,8 @@
lastFrameTimestamp = timestamp;
}
if (timestamp - lastFrameTimestamp > 100) {
lastFrameTimestamp = timestamp
frame()
lastFrameTimestamp = timestamp;
frame();
}
window.requestAnimationFrame(onAnimationFrame);
}
Expand Down Expand Up @@ -164,7 +164,7 @@
}
idleAnimation =
avalibleIdleAnimations[
Math.floor(Math.random() * avalibleIdleAnimations.length)
Math.floor(Math.random() * avalibleIdleAnimations.length)
];
}

Expand Down Expand Up @@ -205,14 +205,16 @@
const centerY = rect.top + rect.height / 2 + scrollTop;

for (let i = 0; i < 10; i++) {
const heart = document.createElement('div');
heart.className = 'heart';
heart.textContent = '❤';
const heart = document.createElement("div");
heart.className = "heart";
heart.textContent = "❤";
const offsetX = (Math.random() - 0.5) * 50;
const offsetY = (Math.random() - 0.5) * 50;
heart.style.left = `${centerX + offsetX - 16}px`;
heart.style.top = `${centerY + offsetY - 16}px`;
heart.style.transform = `translate(-50%, -50%) rotate(${Math.random() * 360}deg)`;
heart.style.transform = `translate(-50%, -50%) rotate(${
Math.random() * 360
}deg)`;
parent.appendChild(heart);

setTimeout(() => {
Expand All @@ -221,7 +223,7 @@
}
}

const style = document.createElement('style');
const style = document.createElement("style");
style.innerHTML = `
@keyframes heartBurst {
0% { transform: scale(0); opacity: 1; }
Expand All @@ -237,7 +239,7 @@
`;

document.head.appendChild(style);
nekoEl.addEventListener('click', explodeHearts);
nekoEl.addEventListener("click", explodeHearts);

function frame() {
frameCount += 1;
Expand Down Expand Up @@ -279,4 +281,4 @@
}

init();
})();
})();
Loading

0 comments on commit fe0bb8a

Please sign in to comment.