Add filestructure (placeholder) and basic responsiveness

main
Nyxaeroz 8 months ago
parent ad16958c1f
commit 880305d943

@ -1,17 +1,80 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<style> <style>
body {
font-family: "Courier New", monospace;
font-size: x-large;
}
.wrapper {
width: 100vw;
height: 100vh;
display: grid;
grid-template-columns: 1fr;
}
.wrapper div {
width: 100%;
justify-self: center;
}
@media (min-width: 1200px) {
.wrapper {
grid-template-columns: 1fr 1fr;
}
.wrapper div:first-child {
justify-self: start;
}
.wrapper div:last-child {
justify-self: end;
margin-top: 10%;
}
}
#flyer { #flyer {
width: 100%; width: 100%;
max-width: 800px; max-width: 800px;
} }
#animated-header {
text-align: center;
font-size: xx-large;
}
#filestructure ul {
display: table;
margin: 0 auto;
}
#filestructure ul li {
padding: 5%;
}
</style> </style>
<body> <body>
<div class="wrapper">
<!-- the flyer svg -->
<object id="flyer" type="image/svg+xml" data="flyer.svg" ></object>
<div>
<!-- the flyer svg --> <div id="filestructure">
<object id="flyer" type="image/svg+xml" data="flyer.svg" ></object> <!-- <h1 id="animated-header">BROWSE THE FILESTRUCTURE >>></h1> -->
<div id="animated-header"></div>
<ul>
<li>/Door: <a href="https://hub.xpub.nl/chopchop/~v/hdwgh/index.html">How did we get here?</a></li>
<li>/Table: <a href="https://hub.xpub.nl/chopchop/si-23-website-table/">loading: feminist server...</a></li>
<li>/Kitchen: <a href="https://hub.xpub.nl/chopchop/~chef/kitchen/kitchen.html">The Greasy Chip</a></li>
<li>/Shelves: ...</li>
<li>/Aquarium: ...</li>
</ul>
</div>
</div>
</div>
</body> </body>
<script> <script>
@ -51,7 +114,54 @@
}, false); }, false);
// inspired by: https://codepen.io/alan8r/
function ASCIIAnimation(animArray, DOMtarget, speed, looping = true) {
var currentFrame = 0;
for(var i = 0; i < animArray.length; i++) {
animArray[i] = animArray[i].replace(/ /g,"&nbsp;");
animArray[i] = "<pre>" + animArray[i] + "</pre>";
}
DOMtarget.innerHTML = animArray[0];
currentFrame++;
this.animation = setInterval(function() {
DOMtarget.innerHTML = animArray[currentFrame];
currentFrame++;
if(currentFrame >= animArray.length && looping) currentFrame = 0;
if (currentFrame >= animArray.length && !looping) currentFrame = animArray.length - 1;
}, speed);
this.getCurrentFrame = function() {
return currentFrame;
}
}
ASCIIAnimation.prototype.stopAnimation = function() {
clearInterval(this.animation);
}
var header_anim_array = [
"BROWSE THE FILESTRUCTURE [ ]",
"BROWSE THE FILESTRUCTURE [> ]",
"BROWSE THE FILESTRUCTURE [>> ]",
"BROWSE THE FILESTRUCTURE [>>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>> ]",
"BROWSE THE FILESTRUCTURE [ >>>]",
"BROWSE THE FILESTRUCTURE [ >>]",
"BROWSE THE FILESTRUCTURE [ >]",
];
var header_div = document.getElementById("animated-header");
var loading_anim = new ASCIIAnimation(header_anim_array, header_div, 300);
</script> </script>
<script src="https://issue.xpub.nl/23/quilt/quilt.js" data-cutFileName="false" data-cutFileName="false"></script> <script src="https://issue.xpub.nl/23/quilt/quilt.js" data-cutFileName="false" data-cutFileName="false"></script>
<link rel="stylesheet" type="text/css" href="https://issue.xpub.nl/23/quilt/quilt.css"> <link rel="stylesheet" type="text/css" href="https://issue.xpub.nl/23/quilt/quilt.css">
</html> </html>

Loading…
Cancel
Save