ub-movements-test/index.html

174 lines
4.1 KiB
HTML
Raw Normal View History

2024-04-12 15:33:39 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UvA UB - movements</title>
<style>
#canvas {
background: white;
position: absolute;
top: 0;
left: 0;
transform-origin: top left;
margin: 0;
padding: 0;
overflow: hidden;
}
@font-face {
font-family: 'Fluxisch Mono', sans-serif;
src:
url(assets/fonts/FluxischElse-Regular.woff) format('woff');
font-weight: normal;
}
@font-face {
font-family: 'Fluxisch Mono', sans-serif;
src:
url(assets/fonts/FluxischElse-Light.woff) format('woff');
font-weight: 200;
}
@font-face {
font-family: 'Fluxisch Mono', sans-serif;
src:
url(assets/fonts/FluxischElse-Bold.woff) format('woff');
font-weight: bold;
}
body {
background: #333;
}
/* animation root */
#viz {
width: 100%;
height: 100%;
font-family: "Fluxisch Else";
font-weight: 200;
color: black;
/* background: linear-gradient(180deg, #3a294c 0%, #62487f 100%); */
background: rgb(64, 64, 64)
}
h1 {
position: absolute;
top: calc(50% - 3em);
text-align: center;
font-weight: 200;
font-size: 140pt;
left: 0;
right: 0;
}
#viz #about {
position: absolute;
font-size: 8pt;
bottom: 20px;
right: 20px;
width: 450px;
text-align: right;
}
#lines {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
#motiontitle {
/* animation: jitter 5s infinite; */
display: inline-block;
}
@keyframes jitter {
0% {
transform: skew(0, 0);
}
10% {
transform: skew(10deg, 2deg);
}
15% {
transform: skew(13deg, -2deg);
}
45% {
transform: skew(-3deg, -4deg);
}
70% {
transform: skew(-20deg, 4deg);
}
95% {
transform: skew(20deg, 1deg);
}
100% {
transform: skew(0, 0);
}
}
svg path {
fill: none;
/* stroke: rgba(255, 255, 0, .1); */
stroke: #bc89ff10;
stroke-width: 2px;
}
svg circle{
fill: white
}
svg text{
fill: white;
font-size: 30pt;
}
</style>
<script>
function scaleToFit() {
const el = document.getElementById('canvas');
const sw = window.innerWidth / parseInt(el.style.width);
const sh = window.innerHeight / parseInt(el.style.height);
const s = Math.min(sw, sh);
canvas.style.transform = `scale(${s * 100}%)`;
}
window.addEventListener('resize', scaleToFit);
window.addEventListener('load', scaleToFit);
</script>
<script type="module">
import { viz } from './js/viz.jsx';
viz(document.getElementById('viz'));
</script>
</head>
<body>
<div id="canvas" style="width: 2160px;height: 3840px;">
<div id="viz">
<h1>library of <span id="motiontitle">motions</span></h1>
<div id="about">
Work by <em>Ruben van de Ven</em> for the <em>University of Amsterdam Library</em>. Fonts by <em>Open
Source Publishing</em>, map by <em>OpenStreetMap</em>.
</div>
<svg id="lines" height="3840" width="2160"></svg>
<!--<img src="assets/map-amsterdam-colored.png">-->
</div>
</div>
</body>
</html>