2ccb018bdf
Players can create tours with selected courses/layouts and a date range. Others join via a 6-character tour code, play the courses, and report their total strokes. Live leaderboard with points and +/- par display. Includes: database schema, model, service, routes, views, and styling.
67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
<% var body = `
|
|
<div class="card-section">
|
|
<h3>Create a Tour</h3>
|
|
<div class="tour-form">
|
|
<div class="form-group">
|
|
<label for="tour-name">Tour Name</label>
|
|
<input type="text" class="input" id="tour-name" placeholder="e.g. Summer Tour 2026" />
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="tour-start">Start Date</label>
|
|
<input type="date" class="input" id="tour-start" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="tour-end">End Date</label>
|
|
<input type="date" class="input" id="tour-end" />
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Courses</label>
|
|
<div id="course-selector">
|
|
<div class="course-entry">
|
|
<select class="input course-select" data-index="0">
|
|
<option value="">Loading courses...</option>
|
|
</select>
|
|
<select class="input layout-select" data-index="0" disabled>
|
|
<option value="">Select course first</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<button class="btn btn-secondary" onclick="addCourseEntry()" id="add-course-btn">
|
|
<i class="fas fa-plus"></i> Add Course
|
|
</button>
|
|
</div>
|
|
<button class="btn" onclick="createTour()" id="create-tour-btn">
|
|
<i class="fas fa-flag-checkered"></i> Create Tour
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-section">
|
|
<h3>Join a Tour</h3>
|
|
<div class="card-section-form">
|
|
<input type="text" class="input" id="tour-code" placeholder="Tour code (e.g. X7K9M2)" maxlength="6" style="width: 180px;" />
|
|
<button class="btn" onclick="goToTour()">
|
|
<i class="fas fa-arrow-right"></i> Go
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="tour-created" class="card-section" style="display: none;">
|
|
<h3>Tour Created!</h3>
|
|
<p class="tour-created-message">Share this link with players:</p>
|
|
<div class="tour-code-display">
|
|
<a id="tour-link" href="#" target="_blank"></a>
|
|
</div>
|
|
</div>
|
|
`; %>
|
|
|
|
<%- include('../partials/layout', {
|
|
title: 'Tours - PDGA Ratings',
|
|
heading: 'Tours',
|
|
activePage: 'tours',
|
|
cssFiles: ['tours.css'],
|
|
jsFiles: ['tours.js'],
|
|
body: body
|
|
}) %> |