code-server/packages/app/src/index.ts

18 lines
522 B
TypeScript
Raw Normal View History

2019-01-12 07:11:34 +07:00
import { logger } from "@coder/logger";
2019-01-12 01:58:25 +07:00
import "./index.scss";
2019-01-12 07:11:34 +07:00
logger.info("Starting app");
2019-01-12 00:50:54 +07:00
const overlay = document.getElementById("overlay");
const logo = document.getElementById("logo");
if (overlay && logo) {
overlay.addEventListener("mousemove", (event) => {
const xPos = ((event.clientX - logo.offsetLeft) / 24).toFixed(2);
const yPos = ((logo.offsetTop - event.clientY) / 24).toFixed(2);
logo.style.transform = `perspective(200px) rotateX(${yPos}deg) rotateY(${xPos}deg)`;
});
}
2019-01-12 07:11:34 +07:00
import "@coder/vscode";