Files
golf-score/frontend/index.html
T
Jiří Stachandaider 74769f057f feat: add draft auto-save and remove save button
Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
2026-10-09 23:02:06 +02:00

67 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Golf Prototype</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 720px; margin: 2rem auto; padding: 0 1rem; color: #222; }
section { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid #ddd; border-radius: 8px; background: #fafafa; }
h1 { font-size: 1.5rem; }
label { display: inline-block; margin: 0.25rem 0; }
input, select { padding: 0.25rem; }
button { padding: 0.4rem 0.8rem; margin-right: 0.5rem; cursor: pointer; }
#stats-display p { margin: 0.2rem 0; }
#hole-info { font-size: 0.95rem; color: #555; margin-bottom: 0.5rem; }
</style>
</head>
<body>
<h1>Golf Score Card — Prototype</h1>
<section id="signup-section">
<h2>Sign Up</h2>
<label>Name: <input id="name" type="text" placeholder="Your name" /></label><br>
<label>Handicap: <input id="hcp" type="number" value="0" /></label><br>
<button onclick="signup()">Sign Up</button>
</section>
<section id="start-section" style="display:none;">
<h2>Course</h2>
<p id="course-info"></p>
<label>Tee: <select id="tee-select"><option>White</option><option>Yellow</option><option>Blue</option><option>Red</option></select></label><br>
<button onclick="startRound()">Start Round</button>
</section>
<section id="round-section" style="display:none;">
<h2>Round</h2>
<div>
<button id="prev-btn" onclick="prevHole()">Prev</button>
<strong id="hole-label">Hole 1</strong>
<button id="next-btn" onclick="nextHole()">Next</button>
<button onclick="skipHole()">Skip</button>
</div>
<div id="hole-info"></div>
<form id="hole-form" onsubmit="event.preventDefault();">
<input type="hidden" id="hole-score-id" />
<label>Strokes (1+): <input id="strokes" type="number" value="1" min="1" oninput="saveDraft()" /></label><br>
<label>Unfinished (X): <input id="unfinished" type="checkbox" oninput="saveDraft()" /></label><br>
<label>Fairway Hit: <input id="fairway" type="checkbox" oninput="saveDraft()" /></label><br>
<label>Putts on Green: <input id="putts-green" type="number" value="0" min="0" oninput="saveDraft()" /></label><br>
<label>Putts Off Green: <input id="putts-off-green" type="number" value="0" min="0" oninput="saveDraft()" /></label><br>
<label>Penalty - Water: <input id="pen-water" type="checkbox" oninput="saveDraft()" /></label><br>
<label>Penalty - OB: <input id="pen-ob" type="checkbox" oninput="saveDraft()" /></label><br>
<label>Penalty - Lost Ball: <input id="pen-lost" type="checkbox" oninput="saveDraft()" /></label><br>
<label>Bunker - Greenside: <input id="bunker-greenside" type="checkbox" oninput="saveDraft()" /></label><br>
<label>Bunker - Fairway: <input id="bunker-fairway" type="checkbox" oninput="saveDraft()" /></label><br>
</form>
<p>GIR: <strong id="gir-display">No</strong></p>
</section>
<section id="stats-section" style="display:none;">
<h2>Basic Stats</h2>
<div id="stats-display"></div>
</section>
<script src="app.js"></script>
</body>
</html>