← Demos
Web Pages · Hello World

Hello World

by Dylan Pimental Aug 27, 2026 17 views 5.7 KB
Sandbox · hello-world-2 · no access to your account
View source — the whole page is this one file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello World — Golf</title>
<style>
  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #4e9a3f;
    overflow: hidden;
  }

  /* Every layer below is positioned against .course, so the horizon,
     the green and the pin stay in register at any window size. */
  .course {
    position: relative;
    width: min(90vw, 720px, 138vh);
    aspect-ratio: 3 / 2;
    text-align: center;
  }

  /* --- full-bleed scenery bands --- */
  .band {
    position: absolute;
    left: -100vw;
    right: -100vw;
    z-index: 0;
  }
  .sky     { top: -100vh; bottom: 62%; background: linear-gradient(#4ea8e0 0%, #9ed6f2 65%, #d9f0fb 100%); }
  .ocean   { top: 38%; height: 12%; background: linear-gradient(#1b5e86, #2f8fb5 60%, #63bcd6); }
  .sand    { top: 50%; height: 3.5%; background: linear-gradient(#efdcb0, #d9c08a); }
  .fairway { top: 53.5%; bottom: -100vh; background: linear-gradient(#7cc36b, #4e9a3f 60%, #3d7d33); }

  /* moving highlights on the water */
  .ocean::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      90deg,
      transparent 0 40px,
      #ffffff33 40px 62px,
      transparent 62px 130px
    );
    mask-image: linear-gradient(#0000, #000 55%, #0000);
    animation: swell 9s linear infinite;
  }
  @keyframes swell { to { transform: translateX(-130px); } }

  .sun {
    position: absolute;
    right: 6%;
    top: 2%;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff8cf, #ffd84d);
    box-shadow: 0 0 46px #ffd84daa;
    z-index: 0;
  }

  .sail {
    position: absolute;
    top: 40.5%;
    left: 14%;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 20px solid #fdfdfd;
    filter: drop-shadow(0 2px 2px #00000033);
    z-index: 0;
    animation: sail 34s linear infinite;
  }
  .sail.two { left: 76%; transform: scale(.7); animation-duration: 46s; animation-direction: reverse; }
  @keyframes sail { from { margin-left: -8vw; } to { margin-left: 8vw; } }

  /* --- headline --- */
  h1 {
    position: relative;
    z-index: 4;
    padding-top: 4%;
    font-size: clamp(2rem, 8vw, 4.5rem);
    color: #0f3f22;
    text-shadow: 0 2px 0 #ffffff99, 0 6px 16px #0004;
    letter-spacing: -0.02em;
  }
  .tagline {
    position: relative;
    z-index: 4;
    margin-top: 0.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    color: #103d24;
    font-style: italic;
  }

  /* --- the green --- */
  .green {
    position: absolute;
    left: 50%;
    top: 60%;
    transform: translateX(-50%);
    width: 78%;
    height: 34%;
    background: radial-gradient(ellipse at 50% 40%, #74c761, #3f8a34);
    border-radius: 50%;
    box-shadow: inset 0 -8px 20px #00000022, 0 12px 30px #00000033;
    z-index: 1;
  }

  /* hole centre = left 64% / top 52% of .green; the pin and the
     ball's resting spot both use those exact coordinates */
  .hole {
    position: absolute;
    left: 64%;
    top: 52%;
    width: 7%;
    aspect-ratio: 2 / 1;
    transform: translate(-50%, -50%);
    background: #131313;
    border-radius: 50%;
    box-shadow: inset 0 3px 5px #000, 0 1px 0 #ffffff40;
    z-index: 2;
  }

  /* --- flagstick: 130% of the green's height, ~5x the hole width --- */
  .flagstick {
    position: absolute;
    left: 64%;
    bottom: 48%;
    transform: translateX(-50%);
    width: 4px;
    height: 130%;
    background: linear-gradient(#ffffff, #e0e0e0 45%, #a9a9a9);
    border-radius: 2px 2px 0 0;
    box-shadow: 1px 0 3px #00000033;
    z-index: 4;
  }

  .flag {
    position: absolute;
    left: 3px;
    top: 2px;
    width: 50px;
    height: 34px;
    background:
      repeating-linear-gradient(90deg, #00000012 0 10px, transparent 10px 22px),
      linear-gradient(#e5342b, #c11f18);
    border-radius: 0 3px 3px 0;
    transform-origin: left center;
    animation: wave 2.6s ease-in-out infinite;
  }
  @keyframes wave {
    0%, 100% { transform: skewY(0deg)  scaleX(1);   }
    35%      { transform: skewY(-4deg) scaleX(0.94); }
    70%      { transform: skewY(3deg)  scaleX(0.97); }
  }

  /* --- ball: rolls along top 50% and drops into the hole at 64% / 52% --- */
  .ball {
    position: absolute;
    left: 24%;
    top: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff, #dcdcdc 62%, #a5a5a5);
    box-shadow: 0 3px 5px #00000055;
    transform: translate(-50%, -50%);
    z-index: 3;
    animation: putt 5s cubic-bezier(.25,.05,.4,1) infinite;
  }
  @keyframes putt {
    0%, 10%   { left: 24%; top: 50%;   transform: translate(-50%,-50%) scale(1);   opacity: 1; }
    55%       { left: 64%; top: 50%;   transform: translate(-50%,-50%) scale(1);   opacity: 1; }
    64%       { left: 64%; top: 52.5%; transform: translate(-50%,-50%) scale(.85); opacity: 1; }
    74%, 100% { left: 64%; top: 53%;   transform: translate(-50%,-50%) scale(.35); opacity: 0; }
  }
</style>
</head>
<body>
  <main class="course">
    <div class="band sky"></div>
    <div class="band ocean"></div>
    <div class="band sand"></div>
    <div class="band fairway"></div>
    <div class="sun"></div>
    <div class="sail"></div>
    <div class="sail two"></div>

    <h1>&#9971; Hello, World!</h1>
    <p class="tagline">Teeing off on the front nine of programming.</p>

    <div class="green">
      <div class="hole"></div>
      <div class="ball"></div>
      <div class="flagstick"><div class="flag"></div></div>
    </div>
  </main>
</body>
</html>

Reaches out to

Nothing. This page is entirely self-contained and contacts no other website when it runs.

Licence

Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.

Copyright © 2026 Dylan Pimental. Licensed under the MIT License. Published on Globefin.

Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →

Sandbox

Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.