Back to winniegolf
SOURCE / PINNED RELEASE

Made of little things.

winniegolf

Release
017b791c0f4b…
Author-recorded commit
612845c125fd…
License
LICENSE
Author’s source reference
nostr://npub18weq5jzw27gkhwcuf6gu57alcptjdvh78nlulgpkz8s7pnlxfnnspc00s9/wss%3A%2F%2Fgit.napplet.soy%2F/n-2d501957e21

Archive hash verified: 713b42364f27a576…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Winnie Golf — 10-hole mini golf</title>
  </head>
  <body>
    <!--
      A napplet is an applet framed by a runtime: the runtime already shows this
      napplet's name, so there is no page masthead here. The frame is the course
      from the first pixel and adapts to any size the shell gives it.
    -->
    <main id="app" class="app">
      <div class="stage" id="stage">
        <canvas
          id="course"
          tabindex="0"
          aria-label="Golf course. Move the mouse or drag on the course to aim. Set power with the slider or the Up and Down keys. Click the course or press Space to putt."
        ></canvas>

        <header class="hud" id="hud">
          <div class="hud-group hud-hole">
            <span class="badge" id="holeBadge">1</span>
            <span class="hole-name" id="holeName">First Light</span>
          </div>
          <div class="hud-group hud-strokes">
            <span class="hud-label">Strokes</span>
            <strong class="hud-big" id="strokeCount">0</strong>
            <span class="hud-sub" id="hudPar">par 2</span>
          </div>
          <div class="hud-group hud-total">
            <strong class="hud-total-value" id="totalValue">E</strong>
            <span class="hud-label">round</span>
          </div>
          <button
            id="pauseButton"
            class="icon-button"
            type="button"
            aria-label="Pause game"
            title="Pause"
          >
            <span class="glyph-pause" aria-hidden="true"></span>
          </button>
        </header>

        <p class="bar" id="hintBar" hidden></p>
        <p class="bar bar-alert" id="messageBar" role="status" hidden></p>

        <div class="dock" id="dock" hidden>
          <div
            class="dock-power"
            id="powerSlider"
            role="slider"
            tabindex="0"
            aria-label="Power"
            aria-orientation="horizontal"
            aria-valuemin="6"
            aria-valuemax="100"
            aria-valuenow="45"
          >
            <span class="hud-label">Power</span>
            <div class="power-track" id="powerTrack">
              <div class="power-fill" id="powerFill"></div>
              <div class="power-thumb" id="powerThumb"></div>
            </div>
            <span class="power-value" id="powerValue">45%</span>
          </div>
          <button class="putt-button" id="puttButton" type="button">Putt</button>
        </div>

        <div class="overlay" id="overlay">
          <section class="screen" id="screenTitle" hidden>
            <div class="card">
              <span class="logo-mark" aria-hidden="true"></span>
              <h1 class="logo" id="gameTitle">Winnie Golf</h1>
              <p class="kicker">Ten holes, rising trouble</p>
              <p class="blurb">
                Bank off the rails, carry the bunkers, and hold your line across
                the island green.
              </p>
              <div class="score-row">
                <span class="score-label">Best round</span>
                <span class="score-value" id="bestScore">—</span>
              </div>
              <p class="fine-print" id="saveNote" hidden>
                Scores can’t be saved in this shell, so your best only lasts this
                session.
              </p>
              <section class="leaderboard" id="leaderboardTitle" hidden>
                <p class="leader-kicker">Course leaders</p>
                <ol class="leader-list" id="leaderListTitle"></ol>
                <p class="leader-note" id="leaderNoteTitle" hidden></p>
              </section>
              <button class="primary" id="playButton" type="button">Tee off</button>
              <p class="controls-hint">
                Aim by pointing or dragging on the course. Set power with the
                slider or Up / Down, then Putt. On a desktop, a click on the
                course also putts.
              </p>
            </div>
          </section>

          <section class="screen" id="screenPause" hidden>
            <div class="card card-narrow">
              <p class="kicker" id="pauseHole">Hole 1 · First Light</p>
              <h2 class="screen-title">Paused</h2>
              <div class="button-stack">
                <button class="primary" id="resumeButton" type="button">Resume</button>
                <button id="restartButton" type="button">Restart hole</button>
                <button class="ghost" id="quitButton" type="button">Quit to title</button>
              </div>
            </div>
          </section>

          <section class="screen" id="screenHole" hidden>
            <div class="card card-narrow">
              <p class="kicker" id="holeResultKicker">Hole 1 of 10</p>
              <h2 class="screen-title" id="holeResultName">First Light</h2>
              <p class="result-strokes">
                <strong id="holeResultStrokes">2</strong>
                <span id="holeResultUnit">strokes</span>
              </p>
              <p class="result-vs" id="holeResultVs">par 2 · even</p>
              <div class="button-stack">
                <button class="primary" id="nextHoleButton" type="button">Next hole</button>
                <button id="replayHoleButton" type="button">Replay hole</button>
              </div>
            </div>
          </section>

          <section class="screen" id="screenResults" hidden>
            <div class="card card-narrow">
              <p class="kicker">Round complete</p>
              <h2 class="screen-title" id="resultHeadline">Even</h2>
              <p class="result-strokes">
                <strong id="resultTotal">17</strong>
                <span id="resultUnit">strokes · par 17</span>
              </p>
              <p class="result-vs" id="resultBest">Best round: —</p>
              <section class="leaderboard" id="leaderboardResults" hidden>
                <p class="leader-kicker">Top rounds</p>
                <ol class="leader-list" id="leaderListResults"></ol>
                <p class="leader-note" id="leaderNoteResults" hidden></p>
              </section>
              <div class="button-stack">
                <button class="primary" id="playAgainButton" type="button">Play again</button>
                <button id="titleButton" type="button">Back to title</button>
              </div>
            </div>
          </section>
        </div>
      </div>

      <div class="too-small" id="tooSmall" role="status" hidden>
        <p class="too-small-title">A little more room, please</p>
        <p class="too-small-body">
          This round needs a frame of at least <strong>240 × 180</strong>. Enlarge
          the panel and you come straight back to the tee.
        </p>
      </div>
    </main>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>