Skip to content

Commit

Permalink
Adding boilerplate (thanks Claude)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobinsouth committed Sep 9, 2024
1 parent a6bbc51 commit cdfad4c
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 0 deletions.
81 changes: 81 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LABRACADABRA</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<canvas id="canvas"></canvas>
<div class="container">
<h1>LABRACADABRA</h1>
<p class="subtitle">The untold history of the future</p>
<div class="info">
<p>Festival at MIT Media Lab</p>
<p>October 15–18, 2024</p>
<p>Hackathon / Panels (Interactive Time Capsules) / Workshops: October 15–17</p>
<p>Party (Labaret) Exhibition and Performances: October 18, 2024 6pm – 1am</p>
<p>Music mischief</p>
</div>
<div style="text-align: center;">
<a href="https://www.eventbrite.com/e/labracadabra-tickets-123456789" class="btn" target="_blank">RSVP to Hackathon</a>
<a href="https://www.eventbrite.com/e/labracadabra-party-tickets-987654321" class="btn" target="_blank">RSVP to Party</a>
<a href="#" class="btn" onclick="alert('Thank you for your interest in contributing! Please contact us at contribute@labracadabra.mit.edu for more information on travel/stay reimbursements.')">Contribute</a>
</div>
<div id="countdown"></div>
</div>

<script>
// Three.js background
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('canvas') });
renderer.setSize(window.innerWidth, window.innerHeight);

const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ color: 0x00ffff, wireframe: true });
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);

camera.position.z = 5;

function animate() {
requestAnimationFrame(animate);
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
renderer.render(scene, camera);
}
animate();

// Countdown timer
const countdownDate = new Date("Oct 15, 2024 00:00:00").getTime();
const countdownElement = document.getElementById("countdown");

const countdownTimer = setInterval(function() {
const now = new Date().getTime();
const distance = countdownDate - now;

const days = Math.floor(distance / (1000 * 60 * 60 * 24));
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);

countdownElement.innerHTML = `${days}d ${hours}h ${minutes}m ${seconds}s`;

if (distance < 0) {
clearInterval(countdownTimer);
countdownElement.innerHTML = "LABRACADABRA HAS BEGUN!";
}
}, 1000);

// Resize handler
window.addEventListener('resize', function() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
</script>
</body>
</html>
81 changes: 81 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body, html {
margin: 0;
padding: 0;
height: 100%;
font-family: 'Orbitron', sans-serif;
background-color: #000;
color: #0ff;
overflow: hidden;
}

#canvas {
position: fixed;
top: 0;
left: 0;
z-index: -1;
}

.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
position: relative;
z-index: 1;
}

h1 {
font-size: 4em;
text-align: center;
margin-bottom: 0;
text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff;
animation: glitch 2s infinite;
}

@keyframes glitch {
0% { transform: translate(0); }
20% { transform: translate(-5px, 5px); }
40% { transform: translate(-5px, -5px); }
60% { transform: translate(5px, 5px); }
80% { transform: translate(5px, -5px); }
100% { transform: translate(0); }
}

.subtitle {
font-size: 1.5em;
text-align: center;
margin-top: 0;
color: #f0f;
}

.info {
background-color: rgba(0, 255, 255, 0.1);
border: 1px solid #0ff;
padding: 20px;
margin-top: 20px;
backdrop-filter: blur(5px);
}

.btn {
display: inline-block;
padding: 10px 20px;
background-color: #f0f;
color: #000;
text-decoration: none;
border: none;
cursor: pointer;
transition: all 0.3s ease;
margin: 10px;
}

.btn:hover {
background-color: #0ff;
box-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff;
}

#countdown {
font-size: 2em;
text-align: center;
margin-top: 20px;
}

0 comments on commit cdfad4c

Please sign in to comment.