2024-08-23 19:20:17 +00:00
|
|
|
<!DOCTYPE html>
|
2024-08-23 18:34:46 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
2024-08-23 19:20:17 +00:00
|
|
|
<link rel="stylesheet" href="/style/style.css" />
|
|
|
|
<style>
|
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2024-08-25 15:12:43 +00:00
|
|
|
.app-name {
|
|
|
|
font-family: "Source Sans Pro", sans-serif;
|
|
|
|
font-size: 36px;
|
|
|
|
}
|
|
|
|
|
2024-08-23 19:20:17 +00:00
|
|
|
body {
|
|
|
|
margin-top: 48px;
|
2024-08-25 15:12:43 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2024-08-23 19:20:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#logo {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
gap: 8px;
|
2024-08-25 14:32:32 +00:00
|
|
|
border: 1px solid white;
|
2024-08-23 19:20:17 +00:00
|
|
|
padding: 24px 48px;
|
|
|
|
gap: 24px;
|
2024-08-25 14:32:32 +00:00
|
|
|
|
|
|
|
transition-property: transform;
|
|
|
|
transition-duration: 100ms;
|
2024-08-23 19:20:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#logo-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2024-08-25 15:12:43 +00:00
|
|
|
grid-area: main;
|
|
|
|
}
|
|
|
|
|
|
|
|
#pan-container {
|
|
|
|
padding: 20px;
|
2024-08-23 19:20:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.brand-name {
|
|
|
|
font-family: "Source Code Pro", monospace;
|
|
|
|
font-size: 64px;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.reverse {
|
|
|
|
transform: scaleX(-1);
|
|
|
|
}
|
2024-08-25 14:32:32 +00:00
|
|
|
|
2024-08-25 15:12:43 +00:00
|
|
|
.container {
|
|
|
|
width: 1280px;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 256px 1fr 256px;
|
|
|
|
grid-template-rows: 290px 290px 290px;
|
|
|
|
gap: 24px 0px;
|
|
|
|
grid-auto-flow: row;
|
|
|
|
grid-template-areas:
|
|
|
|
"app1 main app2"
|
|
|
|
". main app3"
|
|
|
|
". main .";
|
|
|
|
}
|
|
|
|
|
|
|
|
.app {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
border: 1px solid black;
|
|
|
|
gap: 24px;
|
|
|
|
height: 290px;
|
|
|
|
opacity: 0.3;
|
|
|
|
}
|
|
|
|
|
|
|
|
.app1 {
|
|
|
|
grid-area: app1;
|
|
|
|
padding: 20px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.app2 {
|
|
|
|
grid-area: app2;
|
|
|
|
padding: 20px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.app3 {
|
|
|
|
grid-area: app3;
|
|
|
|
padding: 20px 0;
|
|
|
|
}
|
|
|
|
|
2024-08-25 14:32:32 +00:00
|
|
|
@media (prefers-color-scheme: light) {
|
|
|
|
#logo {
|
|
|
|
border: 1px solid black;
|
|
|
|
}
|
|
|
|
}
|
2024-08-23 19:20:17 +00:00
|
|
|
</style>
|
2024-08-23 18:34:46 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>Vite + TS</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
2024-08-25 15:12:43 +00:00
|
|
|
<div class="container">
|
|
|
|
<div class="app1">
|
|
|
|
<div class="app">
|
|
|
|
<img src="/ikon.png" height="128px" width="128px" />
|
|
|
|
<p class="app-name">Blog</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="app2">
|
|
|
|
<div class="app">
|
|
|
|
<img src="/ikon.png" height="128px" width="128px" />
|
|
|
|
<p class="app-name">Blog</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="app3">
|
|
|
|
<div class="app">
|
|
|
|
<img src="/ikon.png" height="128px" width="128px" />
|
|
|
|
<p class="app-name">Blog</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="logo-container">
|
|
|
|
<div id="pan-container">
|
|
|
|
<div id="logo">
|
|
|
|
<div id="brand-reversed" class="brand-name reverse">
|
|
|
|
<p>A</p>
|
|
|
|
<p>C</p>
|
|
|
|
<p>A</p>
|
|
|
|
<p>Y</p>
|
|
|
|
<p>İ</p>
|
|
|
|
<p>P</p>
|
|
|
|
</div>
|
|
|
|
<img width="624" height="624" src="/acayip-logo.png" />
|
|
|
|
<div id="brand" class="brand-name">
|
|
|
|
<p>A</p>
|
|
|
|
<p>C</p>
|
|
|
|
<p>A</p>
|
|
|
|
<p>Y</p>
|
|
|
|
<p>İ</p>
|
|
|
|
<p>P</p>
|
|
|
|
</div>
|
2024-08-25 14:32:32 +00:00
|
|
|
</div>
|
2024-08-23 19:20:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-08-25 14:32:32 +00:00
|
|
|
<script>
|
|
|
|
let constrain = 600;
|
|
|
|
let panContainer = document.getElementById("pan-container");
|
|
|
|
let ex1Layer = document.getElementById("logo");
|
|
|
|
|
|
|
|
function transforms(x, y, el) {
|
|
|
|
let box = el.getBoundingClientRect();
|
|
|
|
let calcX = -(y - box.y - box.height / 2) / constrain;
|
|
|
|
let calcY = (x - box.x - box.width / 2) / constrain;
|
|
|
|
|
|
|
|
return (
|
|
|
|
"perspective(100px) " +
|
|
|
|
" rotateX(" +
|
|
|
|
calcX +
|
|
|
|
"deg) " +
|
|
|
|
" rotateY(" +
|
|
|
|
calcY +
|
|
|
|
"deg) "
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function resetTransform(x, y, el) {
|
|
|
|
return (
|
|
|
|
"perspective(100px) " + " rotateX(0deg) " + " rotateY(0deg) "
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function transformElement(el, xyEl) {
|
|
|
|
el.style.transform = transforms.apply(null, xyEl);
|
|
|
|
}
|
|
|
|
|
|
|
|
function resetElement(el, xyEl) {
|
|
|
|
el.style.transform = resetTransform.apply(null, xyEl);
|
|
|
|
}
|
|
|
|
|
|
|
|
panContainer.onmousemove = function (e) {
|
|
|
|
let xy = [e.clientX, e.clientY];
|
|
|
|
let position = xy.concat([ex1Layer]);
|
|
|
|
|
|
|
|
window.requestAnimationFrame(function () {
|
|
|
|
transformElement(ex1Layer, position);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
panContainer.onmouseleave = function (e) {
|
|
|
|
let xy = [0, 0];
|
|
|
|
let position = xy.concat([ex1Layer]);
|
|
|
|
|
|
|
|
window.requestAnimationFrame(function () {
|
|
|
|
resetElement(ex1Layer, position);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
</script>
|
2024-08-23 18:34:46 +00:00
|
|
|
</body>
|
|
|
|
</html>
|