Skip to content

Instantly share code, notes, and snippets.

@frdnrdb
Last active January 5, 2020 14:55
Show Gist options
  • Save frdnrdb/bcacf4a23559cfa78936c12a8bece512 to your computer and use it in GitHub Desktop.
Save frdnrdb/bcacf4a23559cfa78936c12a8bece512 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>kraft</title>
<style>
body {
font-size: 50vw;
font-family: sans-serif;
font-weight: 900;
letter-spacing: -5vw;
background: #e7e6e4;
color: #222;
width: 100vw;
height: 100vh;
max-width: 100vw;
max-height: 100vh;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
svg {
width: auto;
height: 65vh;
}
</style>
</head>
<body>
<script>
var content = [
10,
9,
8,
7,
6,
5,
4,
3,
2,
1,
'https://wp-js-frontend.now.sh/'
];
function action() {
if (content.length) {
var c = content.shift();
var link = /^http/.test(c);
var nextFunc = !link
? action
: () => window.location.href = c;
document.body.innerHTML = link ? '' : c;
setTimeout(nextFunc, link ? 0 : 1000);
}
}
document.addEventListener('click', action);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment