Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions hackathon_site/event/jinja2/event/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
{% block nav_background_color %}{% endblock %}

{% block head_extends %}
{% include "event/lcd_styles.html" %}
<script defer src="{{ static('event/scripts/lcd-typewriter.js') }}"></script>
<script defer src="{{ static('event/scripts/lcd-glow.js') }}"></script>
<script>
const registrationOpenDate = new Date("{{ localtime(registration_open_date)|strftime('%b %-d, %Y, %H:%M:%S') }}");
const registrationCloseDate = new Date("{{ localtime(registration_close_date)|strftime('%b %-d, %Y, %H:%M:%S') }}");
Expand Down Expand Up @@ -58,18 +61,13 @@
<a id="mlh-trust-badge" style="display:block;max-width:100px;min-width:60px;position:fixed;right:50px;top:0;width:10%;z-index:10000" href="https://mlh.io/seasons/2027/events" target="_blank"><img src="https://s3.amazonaws.com/logged-assets/trust-badge/2027/mlh-trust-badge-2027-white.svg" alt="Major League Hacking 2027 Hackathon Season" style="width:100%"></a>
<div class="wrapper">
<div class="landingBackground">
<img class="hero-chip" src="{{ static('event/images/hero-chip.svg') }}" alt="" aria-hidden="true" />
<div class="container">
<div class="section row" id="landing">
<div class="col container s12 m12 l7">
<h1 class="row header">MakeUofT 2027</h1>
<h1 class="row header">MakeUofT <span class="secondaryText">2027</span></h1>
<div class="row">
<h4 class="header s12">Canada's Largest Makeathon</h4>
<div class="definition">
<div class="definition-shape">
<p>Make·a·thon</p>
</div>
<p>a hackathon where hardware-based projects are manifested </p>
</div>
</div>
<div class="row">
<h5>University of Toronto</h5>
Expand All @@ -94,9 +92,21 @@ <h5>
{% endif %}
</div>
</div>
<div class="col s12 m12 l5 landingImg">
<img src="{{ static('event/images/landing.svg') }}" alt="landing"/>
</div>
</div>
</div>
<div class="lcd-definition" role="group" aria-label="Makeathon definition">
<div class="lcd-glow" aria-hidden="true"></div>
<svg class="lcd-wires" viewBox="0 0 300 400" preserveAspectRatio="none" aria-hidden="true">
<g fill="none" stroke="#c5b94d" stroke-width="2">
<path d="M0 109 H170 L300 20" />
<path d="M0 174 H300" />
<path d="M0 237 H300" />
<path d="M0 301 H170 L300 390" />
</g>
</svg>
<div class="lcd-board">
<img class="lcd-art" src="{{ static('event/images/lcd.png') }}" alt="MAKE A THON" />
<p class="lcd-text" data-lcd-typewriter>a hackathon where hardware-based projects are manifested.</p>
</div>
</div>
</div>
Expand Down
123 changes: 123 additions & 0 deletions hackathon_site/event/jinja2/event/lcd_styles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<!-- Keep LCD layout with its template so cached/generated global CSS cannot omit it. -->
<style>
/* Clip wires without creating a formatting context that collides with navbar floats. */
.landingBackground {
position: relative;
overflow: clip;
padding-bottom: 230px;
}
.hero-chip {
position: absolute;
top: clamp(60px, 8vw, 120px);
right: 11.2%;
width: clamp(157.5px, 20.25vw, 306px);
height: auto;
pointer-events: none;
}
.lcd-definition {
position: absolute;
width: clamp(260px, 28vw, 420px);
aspect-ratio: 837 / 400;
right: 12.2%;
bottom: 44px;
text-align: left;
isolation: isolate;
}
.lcd-glow {
position: absolute;
z-index: -1;
pointer-events: none;
width: 190%;
aspect-ratio: 1;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background:
radial-gradient(ellipse at 32% 40%, rgba(255, 255, 255, 0.7), transparent 55%),
radial-gradient(ellipse at 68% 60%, rgba(255, 255, 255, 0.45), transparent 52%);
filter: blur(28px);
opacity: 0.4;
}
.lcd-board {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 2%;
background: #0c2d1e;
}
.lcd-art {
position: absolute;
width: 244.6834%;
max-width: none;
height: 257.25%;
left: -98.9247%;
top: -132.25%;
}
.lcd-text {
position: absolute;
left: 9.8%;
top: 49%;
width: 79%;
margin: 0;
color: #fff;
font-family: Arial, sans-serif;
font-size: clamp(11px, 1.05vw, 16px);
line-height: 1.3;
text-align: left;
}
.lcd-wires {
position: absolute;
left: 99.8%;
top: 0;
width: 12.3vw;
height: 100%;
}
.lcd-screen-reader-text {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
@media (min-width: 993px) {
.hero-chip {
top: 120px;
width: 306px;
min-width: 306px;
max-width: none;
}
}
@media (max-width: 992px) {
.landingBackground { padding-bottom: 270px; }
.hero-chip {
top: auto;
bottom: 240px;
width: 226.8px;
}
}
@media (min-width: 601px) and (max-width: 992px) {
.hero-chip { width: clamp(226.8px, calc(20.256vw + 105.06px), 306px); }
.lcd-definition { width: 300px; }
.lcd-text { font-size: 12px; }
}
@media (max-width: 600px) {
.landingBackground { padding-bottom: 210px; }
.hero-chip {
display: none;
}
.lcd-definition {
right: 8%;
width: min(82vw, 360px);
bottom: 40px;
}
.lcd-wires { width: 8.1vw; }
.lcd-text { font-size: clamp(11px, 3vw, 14px); }
}

</style>
145 changes: 145 additions & 0 deletions hackathon_site/event/static/event/images/hero-chip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackathon_site/event/static/event/images/lcd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions hackathon_site/event/static/event/scripts/lcd-glow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
(() => {
const glow = document.querySelector(".lcd-glow");
if (!glow || typeof glow.animate !== "function") return;

const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
let animations = [];

function updateMotion() {
animations.forEach((animation) => animation.cancel());
animations = [];
if (reducedMotion.matches) return;

animations = [
glow.animate(
[
{ transform: "translate(-50%, -50%) rotate(0deg)" },
{ transform: "translate(-50%, -50%) rotate(360deg)" },
],
{ duration: 24000, iterations: Infinity, easing: "linear" }
),
// A soft strobe: smooth, slow brightness changes without hard flashes.
glow.animate(
[
{ opacity: 0.22, offset: 0 },
{ opacity: 0.52, offset: 0.45 },
{ opacity: 0.32, offset: 0.7 },
{ opacity: 0.22, offset: 1 },
],
{ duration: 4200, iterations: Infinity, easing: "ease-in-out" }
),
];
}

updateMotion();
reducedMotion.addEventListener("change", updateMotion);
})();
24 changes: 24 additions & 0 deletions hackathon_site/event/static/event/scripts/lcd-typewriter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(() => {
const text = document.querySelector("[data-lcd-typewriter]");
if (!text || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
const sentence = text.textContent.trim();
const accessible = document.createElement("span");
accessible.className = "lcd-screen-reader-text";
accessible.textContent = sentence;
const visible = document.createElement("span");
visible.setAttribute("aria-hidden", "true");
text.replaceChildren(accessible, visible);
// Standard WPM uses five characters per word: 48 ms per character.
const millisecondsPerCharacter = 60000 / (250 * 5);
let startedAt;
function type(now) {
if (startedAt === undefined) startedAt = now;
const count = Math.min(
sentence.length,
Math.floor((now - startedAt) / millisecondsPerCharacter)
);
visible.textContent = sentence.slice(0, count);
if (count < sentence.length) requestAnimationFrame(type);
}
requestAnimationFrame(type);
})();
Loading
Loading