Skip to content

Commit

Permalink
merge pull request #2 from kotleni/dev
Browse files Browse the repository at this point in the history
[v1.3] Replaced bad editor.png and impl version tip easter egg and some other changes
  • Loading branch information
kotleni authored Jan 4, 2025
2 parents 31105d7 + 641a087 commit 34209e5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<link rel="icon" type="image/svg+xml" href="./public/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>kotleni's website</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="./src/main.tsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host 0.0.0.0",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
Expand Down
Binary file modified src/assets/editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/VersionTip/VersionTip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
position: fixed;
right: 8px;
top: 8px;
user-select: none;

transition: transform .2s ease-in-out;

Expand Down
14 changes: 12 additions & 2 deletions src/components/VersionTip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import {VERSION_NAME} from "../../constants.ts";
import {VERSION_NAME, VERSION_NAME_REPLACEMENT} from "../../constants.ts";

import './VersionTip.scss';
import {useState} from "react";

function VersionTip() {
const [clicksCount, setClicksCount] = useState(0);

const increaseClicks = () => {
setClicksCount(clicksCount + 1);
};
return (
<div className="version-tip">{VERSION_NAME}</div>
<div className="version-tip" onClick={increaseClicks}>{
clicksCount < 8 ?
(clicksCount % 2 === 0 ? VERSION_NAME : VERSION_NAME_REPLACEMENT)
: `Clicks count: ${clicksCount}`
}</div>
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const PARALLAX_SENSITIVITY = 1.4;
export const VERSION_NAME = 'v1.2';
export const VERSION_NAME = 'v1.3';
export const VERSION_NAME_REPLACEMENT = 'Powered by TypeScript';

0 comments on commit 34209e5

Please sign in to comment.