Hack ClubHack Club — 3-part handbook

THE 3-PART HANDBOOK

Interactive demos & cheat sheets: Everything from the three Cursed Socials beginner PDFs, with live code examples you can poke and test right in your browser.


The 3 Guide PDFs

Download or read the illustrated PDF handbooks directly:

Filter demos:

Part 1: HTML & CSS Basics

Demo 1: The Box Model Visualizer

From page 5: In CSS, every single element is a box. Content is the Polaroid picture, Padding is the bubble wrap inside, Border is the cardboard walls, and Margin is the space pushing other boxes away.

Presets:
Polaroid Content
@you: hello from html!
.post {
  padding: 16px;
  margin: 16px auto;
  border: 2px solid #ec3750;
}

Part 2: Flexbox & CSS Grid

Demo 2: Flexbox Side-by-Side

Browsers naturally stack elements like pancakes. Toggle display: flex to see how items snap into a horizontal row:

Box 1 (Avatar)
Box 2 (Username)
Box 3 (Follow Btn)
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

Demo 3: CSS Grid (Real Photo Feed vs Discord Layout)

Use CSS Grid when you need rows and columns. Toggle between a real 3-column photo grid and a 2-column sidebar:

Cursed cat
Paper background
FAQ pattern
Sketch design
Unpolished notes
YSWS art
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

Part 3: JavaScript & Shipping

Demo 4: Like Counter (with spam alert)

A simple click event listener that updates text on the screen. Click 10 times for the spam warning:

clicked 0 times · click 10 times for easter egg
let likes = 0;
const likeBtn = document.getElementById("like-btn");

likeBtn.addEventListener("click", function () {
  likes = likes + 1;
  likeBtn.textContent = "Like (" + likes + ")";

  if (likes === 10) {
    alert("bro stop liking your own post");
  }
});

Demo 5: One-Click Dark Mode Toggle

Toggles a .dark class with four lines of JavaScript. Click below to see the card invert its colors live:

state: class="light"
@priyanshu · post · light mode

Hello! This card uses background and text colors that flip instantly when the .dark class is added.

const themeBtn = document.getElementById("theme-btn");

themeBtn.addEventListener("click", function () {
  document.body.classList.toggle("dark");
});

Demo 6: Live In-Browser Comments

Type something and press Post. JavaScript creates a new <p> element and appends it to the list:

Live comments (2):
@alex: this actually works lol
@sam: wait flexbox makes so much sense now
const input = document.getElementById("comment-input");
const postBtn = document.getElementById("post-btn");
const list = document.getElementById("comments-list");

postBtn.addEventListener("click", function () {
  if (input.value === "") return;
  const newComment = document.createElement("p");
  newComment.textContent = "@you: " + input.value;
  list.appendChild(newComment);
  input.value = "";
});

Ready for Part 2?

Once your site works, jump into Part 2: runaway buttons, gravity text, and chaotic layouts.

Go to Part 2: Cursed Socials Back to Part 1 Guide