Modernize UI design with new color system, typography and layout
- Add sticky dark header with nav replacing inline text links - Introduce CSS custom properties design system (colors, spacing, shadows) - Use DM Sans + JetBrains Mono fonts replacing Arial - Modernize tables with uppercase headers and subtle hover states - Add gradient fill and rounded line to rating chart - Unify card sections across players and courses pages - Add backdrop blur to modals - Clean up inline styles to use CSS variables
This commit is contained in:
+63
-74
@@ -1,125 +1,113 @@
|
|||||||
/* Course page styles */
|
/* ═══════════════════════════════════════════════════
|
||||||
|
Courses Page
|
||||||
|
═══════════════════════════════════════════════════ */
|
||||||
|
|
||||||
.container {
|
/* ── Controls ─────────────────────────────────── */
|
||||||
max-width: 1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-links {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-links a {
|
|
||||||
margin: 0 15px;
|
|
||||||
color: #007bff;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-links a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
/* ── Search ───────────────────────────────────── */
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-container {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 400px;
|
|
||||||
padding: 10px 15px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 2px solid #ddd;
|
|
||||||
border-radius: 4px;
|
|
||||||
outline: none;
|
|
||||||
transition: border-color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input:focus {
|
|
||||||
border-color: #007bff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-results-info {
|
.search-results-info {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
color: #666;
|
color: var(--text-muted);
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Layouts ──────────────────────────────────── */
|
||||||
|
|
||||||
.layouts-container {
|
.layouts-container {
|
||||||
padding: 15px;
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layouts-container h4 {
|
||||||
|
margin: 0 0 12px 0;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-item {
|
.layout-item {
|
||||||
padding: 10px;
|
padding: 12px 14px;
|
||||||
margin: 5px 0;
|
margin: 4px 0;
|
||||||
background-color: white;
|
background: var(--surface-1);
|
||||||
border-radius: 4px;
|
border-radius: var(--radius-sm);
|
||||||
border: 1px solid #dee2e6;
|
border: 1px solid var(--border);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
transition: border-color var(--transition), box-shadow var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-item:hover {
|
||||||
|
border-color: var(--accent-border);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-name {
|
.layout-name {
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
color: #333;
|
color: var(--text-primary);
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-par {
|
.layout-par {
|
||||||
color: #007bff;
|
color: var(--accent);
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
|
font-size: 14px;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-layouts {
|
.no-layouts {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #999;
|
color: var(--text-muted);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Inactive Layouts Accordion ───────────────── */
|
||||||
|
|
||||||
.inactive-layouts-accordion {
|
.inactive-layouts-accordion {
|
||||||
margin-top: 15px;
|
margin-top: 16px;
|
||||||
border: 1px solid #dee2e6;
|
border: 1px solid var(--border);
|
||||||
border-radius: 4px;
|
border-radius: var(--radius-md);
|
||||||
background-color: #f8f9fa;
|
background: var(--surface-2);
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-header {
|
.accordion-header {
|
||||||
padding: 12px 15px;
|
padding: 12px 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #e9ecef;
|
background: var(--surface-3);
|
||||||
border-radius: 4px;
|
transition: background var(--transition);
|
||||||
transition: background-color 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-header:hover {
|
.accordion-header:hover {
|
||||||
background-color: #dee2e6;
|
background: var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-header-text {
|
.accordion-header-text {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #6c757d;
|
color: var(--text-secondary);
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-icon {
|
.accordion-icon {
|
||||||
transition: transform 0.3s;
|
transition: transform 0.3s ease;
|
||||||
color: #6c757d;
|
color: var(--text-muted);
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-icon.expanded {
|
.accordion-icon.expanded {
|
||||||
@@ -130,15 +118,16 @@
|
|||||||
max-height: 0;
|
max-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: max-height 0.3s ease-out;
|
transition: max-height 0.3s ease-out;
|
||||||
padding: 0 10px;
|
padding: 0 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-content.expanded {
|
.accordion-content.expanded {
|
||||||
max-height: 2000px;
|
max-height: 2000px;
|
||||||
padding: 10px;
|
padding: 12px;
|
||||||
transition: max-height 0.5s ease-in;
|
transition: max-height 0.5s ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-item.inactive {
|
.layout-item.inactive {
|
||||||
opacity: 0.7;
|
opacity: 0.6;
|
||||||
|
border-style: dashed;
|
||||||
}
|
}
|
||||||
|
|||||||
+197
-195
@@ -1,32 +1,50 @@
|
|||||||
/* Player ratings page styles */
|
/* ═══════════════════════════════════════════════════
|
||||||
|
Players Page
|
||||||
|
═══════════════════════════════════════════════════ */
|
||||||
|
|
||||||
|
/* ── Add Player Button ─────────────────────────── */
|
||||||
|
|
||||||
|
.btn-add {
|
||||||
|
background: var(--green);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-add:hover {
|
||||||
|
background: #059669;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Progress ─────────────────────────────────── */
|
||||||
|
|
||||||
.progress-container {
|
.progress-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #f0f0f0;
|
background: var(--surface-3);
|
||||||
border-radius: 10px;
|
border-radius: var(--radius-xl);
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
width: 0%;
|
width: 0%;
|
||||||
height: 30px;
|
height: 26px;
|
||||||
background-color: #007bff;
|
background: linear-gradient(135deg, var(--accent), var(--accent-hover));
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-xl);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 30px;
|
line-height: 26px;
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
transition: width 0.3s ease;
|
font-size: 12px;
|
||||||
|
transition: width 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-text {
|
.progress-text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 10px 0;
|
margin: 8px 0;
|
||||||
font-size: 16px;
|
font-size: 13px;
|
||||||
color: #666;
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Mobile helpers ───────────────────────────── */
|
||||||
|
|
||||||
.mobile-only {
|
.mobile-only {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -37,108 +55,44 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.player-name {
|
.player-name {
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
}
|
|
||||||
|
|
||||||
.chart-container {
|
|
||||||
height: 250px;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-title {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-container {
|
/* ── Rating values ────────────────────────────── */
|
||||||
width: 100%;
|
|
||||||
height: 300px;
|
|
||||||
margin: 10px 0;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-title {
|
|
||||||
text-align: center;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-chart {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: 200px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-tooltip {
|
|
||||||
position: fixed;
|
|
||||||
background-color: rgba(0, 0, 0, 0.9);
|
|
||||||
color: white;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 10000;
|
|
||||||
display: none;
|
|
||||||
white-space: nowrap;
|
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
|
||||||
border: 1px solid rgba(255,255,255,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.rating {
|
.rating {
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
color: #007bff;
|
color: var(--accent);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
.std-dev-tooltip {
|
.rating-value {
|
||||||
position: absolute;
|
font-variant-numeric: tabular-nums;
|
||||||
background-color: rgba(0, 0, 0, 0.9);
|
|
||||||
color: white;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 10000;
|
|
||||||
display: none;
|
|
||||||
white-space: nowrap;
|
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
|
||||||
border: 1px solid rgba(255,255,255,0.2);
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.predicted-value {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pdga-number {
|
.pdga-number {
|
||||||
color: #6c757d;
|
color: var(--text-muted);
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
}
|
font-variant-numeric: tabular-nums;
|
||||||
|
|
||||||
.difference {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.positive {
|
.positive {
|
||||||
color: #28a745;
|
color: var(--green);
|
||||||
}
|
}
|
||||||
|
|
||||||
.negative {
|
.negative {
|
||||||
color: #dc3545;
|
color: var(--red);
|
||||||
}
|
}
|
||||||
|
|
||||||
.neutral {
|
.neutral {
|
||||||
color: #6c757d;
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rating-change {
|
.rating-change {
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-section {
|
.refresh-section {
|
||||||
@@ -146,19 +100,95 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.predicted-value {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
.difference {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Chart ────────────────────────────────────── */
|
||||||
|
|
||||||
|
.chart-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
margin: 10px 0;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--surface-1);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-title {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-chart {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 200px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-tooltip {
|
||||||
|
position: fixed;
|
||||||
|
background: var(--navy-900);
|
||||||
|
color: var(--text-inverse);
|
||||||
|
padding: 8px 12px;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 10000;
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Tooltips ─────────────────────────────────── */
|
||||||
|
|
||||||
|
.std-dev-tooltip {
|
||||||
|
position: absolute;
|
||||||
|
background: var(--navy-900);
|
||||||
|
color: var(--text-inverse);
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 10000;
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Debug Icon ───────────────────────────────── */
|
||||||
|
|
||||||
.debug-icon:hover {
|
.debug-icon:hover {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
color: #007bff !important;
|
color: var(--accent) !important;
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Debug Modal ──────────────────────────────── */
|
||||||
|
|
||||||
.debug-modal {
|
.debug-modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background: rgba(15, 23, 42, 0.5);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
z-index: 10001;
|
z-index: 10001;
|
||||||
display: none;
|
display: none;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -166,96 +196,59 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.debug-content {
|
.debug-content {
|
||||||
background: white;
|
background: var(--surface-1);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-lg);
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
max-width: 600px;
|
max-width: 640px;
|
||||||
|
width: 90%;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
box-shadow: var(--shadow-overlay);
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.debug-header {
|
.debug-header {
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 16px;
|
||||||
color: #333;
|
color: var(--text-primary);
|
||||||
border-bottom: 2px solid #007bff;
|
padding-bottom: 12px;
|
||||||
padding-bottom: 10px;
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.debug-log {
|
.debug-log {
|
||||||
font-family: 'Courier New', monospace;
|
font-family: var(--font-mono);
|
||||||
background-color: #f8f9fa;
|
background: var(--surface-2);
|
||||||
border: 1px solid #e9ecef;
|
border: 1px solid var(--border);
|
||||||
border-radius: 4px;
|
border-radius: var(--radius-md);
|
||||||
padding: 15px;
|
padding: 16px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.4;
|
line-height: 1.6;
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
color: #495057;
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.debug-close {
|
.debug-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 12px;
|
||||||
right: 15px;
|
right: 16px;
|
||||||
font-size: 24px;
|
font-size: 22px;
|
||||||
color: #999;
|
color: var(--text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
transition: color var(--transition), background var(--transition);
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.debug-close:hover {
|
.debug-close:hover {
|
||||||
color: #333;
|
color: var(--text-primary);
|
||||||
|
background: var(--surface-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-player-section {
|
/* ── Add Player Modal ─────────────────────────── */
|
||||||
background-color: #f8f9fa;
|
|
||||||
border: 2px solid #007bff;
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 20px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-player-section h3 {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
color: #333;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-player-form {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdga-input {
|
|
||||||
padding: 10px 15px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 2px solid #ddd;
|
|
||||||
border-radius: 4px;
|
|
||||||
outline: none;
|
|
||||||
width: 250px;
|
|
||||||
transition: border-color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdga-input:focus {
|
|
||||||
border-color: #007bff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-add {
|
|
||||||
background-color: #28a745;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-add:hover {
|
|
||||||
background-color: #218838;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -263,7 +256,8 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background: rgba(15, 23, 42, 0.5);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
z-index: 10001;
|
z-index: 10001;
|
||||||
display: none;
|
display: none;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -271,78 +265,86 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background: white;
|
background: var(--surface-1);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-lg);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
max-width: 500px;
|
max-width: 480px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
box-shadow: var(--shadow-overlay);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
font-size: 20px;
|
font-size: 17px;
|
||||||
padding: 20px;
|
padding: 20px 24px;
|
||||||
color: #333;
|
color: var(--text-primary);
|
||||||
border-bottom: 2px solid #007bff;
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
color: #495057;
|
color: var(--text-secondary);
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-footer {
|
.modal-footer {
|
||||||
padding: 15px 20px;
|
padding: 16px 24px;
|
||||||
border-top: 1px solid #e9ecef;
|
border-top: 1px solid var(--border);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 10px;
|
gap: 8px;
|
||||||
|
background: var(--surface-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-close {
|
.modal-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 12px;
|
||||||
right: 15px;
|
right: 16px;
|
||||||
font-size: 28px;
|
font-size: 24px;
|
||||||
color: #999;
|
color: var(--text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
transition: color var(--transition), background var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-close:hover {
|
.modal-close:hover {
|
||||||
color: #333;
|
color: var(--text-primary);
|
||||||
|
background: var(--surface-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-cancel {
|
.btn-cancel {
|
||||||
background-color: #6c757d;
|
background: var(--surface-3);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-cancel:hover {
|
.btn-cancel:hover {
|
||||||
background-color: #5a6268;
|
background: var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-confirm {
|
.btn-confirm {
|
||||||
background-color: #28a745;
|
background: var(--green);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-confirm:hover {
|
.btn-confirm:hover {
|
||||||
background-color: #218838;
|
background: #059669;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Responsive ───────────────────────────────── */
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.add-player-section {
|
.chart-container {
|
||||||
padding: 15px;
|
height: 250px;
|
||||||
|
margin: 5px 0;
|
||||||
}
|
}
|
||||||
.add-player-form {
|
|
||||||
flex-direction: column;
|
.chart-title {
|
||||||
}
|
font-size: 13px;
|
||||||
.pdga-input {
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+347
-89
@@ -1,163 +1,421 @@
|
|||||||
/* Shared styles for PDGA Ratings app */
|
/* ═══════════════════════════════════════════════════
|
||||||
|
PDGA Ratings — Shared Design System
|
||||||
|
═══════════════════════════════════════════════════ */
|
||||||
|
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');
|
||||||
|
|
||||||
|
:root {
|
||||||
|
/* Color system */
|
||||||
|
--surface-0: #f0f2f5;
|
||||||
|
--surface-1: #ffffff;
|
||||||
|
--surface-2: #f8f9fb;
|
||||||
|
--surface-3: #eef0f4;
|
||||||
|
|
||||||
|
--navy-900: #0f172a;
|
||||||
|
--navy-800: #1e293b;
|
||||||
|
--navy-700: #334155;
|
||||||
|
--navy-600: #475569;
|
||||||
|
|
||||||
|
--text-primary: #0f172a;
|
||||||
|
--text-secondary: #64748b;
|
||||||
|
--text-muted: #94a3b8;
|
||||||
|
--text-inverse: #f8fafc;
|
||||||
|
|
||||||
|
--accent: #3b82f6;
|
||||||
|
--accent-hover: #2563eb;
|
||||||
|
--accent-subtle: rgba(59, 130, 246, 0.08);
|
||||||
|
--accent-border: rgba(59, 130, 246, 0.2);
|
||||||
|
|
||||||
|
--green: #10b981;
|
||||||
|
--green-subtle: rgba(16, 185, 129, 0.1);
|
||||||
|
--red: #ef4444;
|
||||||
|
--red-subtle: rgba(239, 68, 68, 0.1);
|
||||||
|
--amber: #f59e0b;
|
||||||
|
|
||||||
|
--border: #e2e8f0;
|
||||||
|
--border-light: #f1f5f9;
|
||||||
|
|
||||||
|
--radius-sm: 6px;
|
||||||
|
--radius-md: 10px;
|
||||||
|
--radius-lg: 14px;
|
||||||
|
--radius-xl: 20px;
|
||||||
|
|
||||||
|
--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||||
|
--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||||
|
--shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
|
||||||
|
--shadow-overlay: 0 20px 60px rgba(15, 23, 42, 0.15), 0 4px 12px rgba(15, 23, 42, 0.08);
|
||||||
|
|
||||||
|
--font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
|
--font-mono: 'JetBrains Mono', 'SF Mono', monospace;
|
||||||
|
|
||||||
|
--transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Reset & Base ─────────────────────────────── */
|
||||||
|
|
||||||
|
*, *::before, *::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: var(--font-sans);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 20px;
|
padding: 0;
|
||||||
background-color: #f5f5f5;
|
background-color: var(--surface-0);
|
||||||
|
color: var(--text-primary);
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
/* ── App Shell ────────────────────────────────── */
|
||||||
body {
|
|
||||||
padding: 10px;
|
.app-header {
|
||||||
}
|
background: var(--navy-900);
|
||||||
|
color: var(--text-inverse);
|
||||||
|
padding: 0 24px;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 100;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.header-inner {
|
||||||
max-width: 800px;
|
max-width: 960px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background: white;
|
display: flex;
|
||||||
padding: 30px;
|
align-items: center;
|
||||||
border-radius: 8px;
|
justify-content: space-between;
|
||||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
height: 56px;
|
||||||
overflow-x: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
.app-logo {
|
||||||
.container {
|
font-size: 17px;
|
||||||
padding: 15px;
|
font-weight: 700;
|
||||||
border-radius: 0;
|
letter-spacing: -0.02em;
|
||||||
box-shadow: none;
|
color: var(--text-inverse);
|
||||||
}
|
text-decoration: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.app-logo .logo-icon {
|
||||||
color: #333;
|
width: 28px;
|
||||||
text-align: center;
|
height: 28px;
|
||||||
margin-bottom: 30px;
|
background: var(--accent);
|
||||||
}
|
border-radius: var(--radius-sm);
|
||||||
|
display: flex;
|
||||||
@media (max-width: 768px) {
|
align-items: center;
|
||||||
h1 {
|
justify-content: center;
|
||||||
font-size: 24px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading {
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
margin-top: 20px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
.app-nav {
|
||||||
padding: 12px;
|
display: flex;
|
||||||
text-align: left;
|
gap: 2px;
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
.app-nav a {
|
||||||
table {
|
padding: 6px 14px;
|
||||||
font-size: 12px;
|
color: var(--text-muted);
|
||||||
}
|
text-decoration: none;
|
||||||
th, td {
|
font-size: 14px;
|
||||||
padding: 8px 4px;
|
font-weight: 500;
|
||||||
}
|
border-radius: var(--radius-sm);
|
||||||
.mobile-hide {
|
transition: color var(--transition), background var(--transition);
|
||||||
display: none;
|
}
|
||||||
}
|
|
||||||
|
.app-nav a:hover {
|
||||||
|
color: var(--text-inverse);
|
||||||
|
background: rgba(255, 255, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-nav a.active {
|
||||||
|
color: var(--text-inverse);
|
||||||
|
background: rgba(255, 255, 255, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Container ────────────────────────────────── */
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 960px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 28px 24px 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-primary);
|
||||||
|
letter-spacing: -0.03em;
|
||||||
|
margin: 0 0 24px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Loading ──────────────────────────────────── */
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
text-align: center;
|
||||||
|
padding: 40px 20px;
|
||||||
|
font-size: 15px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Tables ───────────────────────────────────── */
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 56px;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f8f9fa;
|
padding: 10px 16px;
|
||||||
font-weight: bold;
|
text-align: left;
|
||||||
color: #495057;
|
font-weight: 600;
|
||||||
|
font-size: 11px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
background: var(--surface-2);
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
tr:hover {
|
th:first-child {
|
||||||
background-color: #f5f5f5;
|
border-radius: var(--radius-md) 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
th:last-child {
|
||||||
|
border-radius: 0 var(--radius-md) 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-bottom: 1px solid var(--border-light);
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expandable-row {
|
.expandable-row {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.expandable-row:hover {
|
.expandable-row:hover {
|
||||||
background-color: #e3f2fd;
|
background: var(--accent-subtle);
|
||||||
}
|
}
|
||||||
|
|
||||||
.expanded-content {
|
.expanded-content {
|
||||||
display: none;
|
display: none;
|
||||||
background-color: #f8f9fa;
|
|
||||||
border-top: 2px solid #007bff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.expanded-content td {
|
.expanded-content td {
|
||||||
padding: 20px;
|
padding: 0;
|
||||||
|
background: var(--surface-2);
|
||||||
|
border-top: 2px solid var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.expanded-cell {
|
||||||
|
padding: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Links ────────────────────────────────────── */
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #007bff;
|
color: var(--accent);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
transition: color var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
color: var(--accent-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Buttons ──────────────────────────────────── */
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
background-color: #007bff;
|
background: var(--accent);
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: var(--font-sans);
|
||||||
|
transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.btn:hover {
|
||||||
background-color: #0056b3;
|
background: var(--accent-hover);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:active {
|
||||||
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:disabled {
|
.btn:disabled {
|
||||||
background-color: #6c757d;
|
background: var(--text-muted);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Card Section ─────────────────────────────── */
|
||||||
|
|
||||||
|
.card-section {
|
||||||
|
background: var(--surface-1);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
padding: 24px;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-section h3 {
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-section-form {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Inputs ───────────────────────────────────── */
|
||||||
|
|
||||||
|
.input {
|
||||||
|
padding: 9px 14px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: var(--font-sans);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
outline: none;
|
||||||
|
background: var(--surface-1);
|
||||||
|
color: var(--text-primary);
|
||||||
|
transition: border-color var(--transition), box-shadow var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input:focus {
|
||||||
|
border-color: var(--accent);
|
||||||
|
box-shadow: 0 0 0 3px var(--accent-subtle);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input::placeholder {
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.card-section {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-section-form {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-section-form .input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Refresh Icons ────────────────────────────── */
|
||||||
|
|
||||||
.refresh-icon {
|
.refresh-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0.6;
|
opacity: 0.4;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
color: #6c757d;
|
color: var(--text-secondary);
|
||||||
transition: all 0.2s ease;
|
transition: all var(--transition);
|
||||||
padding: 2px;
|
padding: 4px;
|
||||||
border-radius: 3px;
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-icon:hover {
|
.refresh-icon:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
color: #007bff;
|
color: var(--accent);
|
||||||
background-color: rgba(0, 123, 255, 0.1);
|
background: var(--accent-subtle);
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-icon.spinning {
|
.refresh-icon.spinning {
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 0.8s linear infinite;
|
||||||
color: #007bff;
|
color: var(--accent);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
background-color: rgba(0, 123, 255, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% { transform: rotate(0deg); }
|
to { transform: rotate(360deg); }
|
||||||
100% { transform: rotate(360deg); }
|
}
|
||||||
|
|
||||||
|
/* ── Responsive ───────────────────────────────── */
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.container {
|
||||||
|
padding: 16px 12px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-inner {
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-logo {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-nav a {
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 10px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
top: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
th, td {
|
||||||
|
padding: 8px 6px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+118
-89
@@ -1,121 +1,150 @@
|
|||||||
function createRatingChart(container, history) {
|
function createRatingChart(container, history) {
|
||||||
const width = container.clientWidth - 40;
|
const width = container.clientWidth;
|
||||||
const height = 250;
|
const height = 280;
|
||||||
const margin = { top: 20, right: 30, bottom: 40, left: 60 };
|
const margin = { top: 24, right: 20, bottom: 44, left: 56 };
|
||||||
const chartWidth = width - margin.left - margin.right;
|
const chartWidth = width - margin.left - margin.right;
|
||||||
const chartHeight = height - margin.top - margin.bottom;
|
const chartHeight = height - margin.top - margin.bottom;
|
||||||
|
|
||||||
const pdgaNumber = container.id.replace('chart-', '');
|
const pdgaNumber = container.id.replace('chart-', '');
|
||||||
const tooltip = document.getElementById(`tooltip-${pdgaNumber}`);
|
const tooltip = document.getElementById(`tooltip-${pdgaNumber}`);
|
||||||
|
|
||||||
const ratings = history.map(h => h.rating);
|
const ratings = history.map(h => h.rating);
|
||||||
const minRating = Math.min(...ratings) - 10;
|
const minRating = Math.min(...ratings) - 10;
|
||||||
const maxRating = Math.max(...ratings) + 10;
|
const maxRating = Math.max(...ratings) + 10;
|
||||||
|
|
||||||
const xStep = chartWidth / (history.length - 1 || 1);
|
const xStep = chartWidth / (history.length - 1 || 1);
|
||||||
const yScale = chartHeight / (maxRating - minRating);
|
const yScale = chartHeight / (maxRating - minRating);
|
||||||
|
|
||||||
let svg = `<svg width="${width}" height="${height}" style="font-family: Arial, sans-serif;" id="svg-${pdgaNumber}">`;
|
// Build points array
|
||||||
|
|
||||||
svg += `<rect x="0" y="0" width="${width}" height="${height}" fill="white" stroke="#ddd"/>`;
|
|
||||||
svg += `<rect x="${margin.left}" y="${margin.top}" width="${chartWidth}" height="${chartHeight}" fill="#f9f9f9" stroke="#ccc"/>`;
|
|
||||||
|
|
||||||
for (let i = 0; i <= 5; i++) {
|
|
||||||
const y = margin.top + (i * chartHeight / 5);
|
|
||||||
const rating = Math.round(maxRating - (i * (maxRating - minRating) / 5));
|
|
||||||
svg += `<line x1="${margin.left}" y1="${y}" x2="${margin.left + chartWidth}" y2="${y}" stroke="#e0e0e0"/>`;
|
|
||||||
svg += `<text x="${margin.left - 5}" y="${y + 4}" text-anchor="end" font-size="12" fill="#666">${rating}</text>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
let pathData = '';
|
|
||||||
const points = [];
|
const points = [];
|
||||||
|
let pathData = '';
|
||||||
|
|
||||||
history.forEach((point, i) => {
|
history.forEach((point, i) => {
|
||||||
const x = margin.left + (i * xStep);
|
const x = margin.left + (i * xStep);
|
||||||
const y = margin.top + ((maxRating - point.rating) * yScale);
|
const y = margin.top + ((maxRating - point.rating) * yScale);
|
||||||
|
|
||||||
points.push({ x, y, rating: point.rating, date: point.displayDate });
|
points.push({ x, y, rating: point.rating, date: point.displayDate });
|
||||||
|
pathData += i === 0 ? `M ${x} ${y}` : ` L ${x} ${y}`;
|
||||||
if (i === 0) {
|
|
||||||
pathData += `M ${x} ${y}`;
|
|
||||||
} else {
|
|
||||||
pathData += ` L ${x} ${y}`;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
svg += `<path d="${pathData}" stroke="#007bff" stroke-width="2" fill="none"/>`;
|
// Area fill path (close to bottom)
|
||||||
|
const areaPath = pathData +
|
||||||
|
` L ${points[points.length - 1].x} ${margin.top + chartHeight}` +
|
||||||
|
` L ${points[0].x} ${margin.top + chartHeight} Z`;
|
||||||
|
|
||||||
|
let svg = `<svg width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" style="display: block;">`;
|
||||||
|
|
||||||
|
// Defs: gradient + glow
|
||||||
|
svg += `<defs>
|
||||||
|
<linearGradient id="areaGrad-${pdgaNumber}" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0%" stop-color="#3b82f6" stop-opacity="0.15"/>
|
||||||
|
<stop offset="100%" stop-color="#3b82f6" stop-opacity="0.01"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="lineGrad-${pdgaNumber}" x1="0" y1="0" x2="1" y2="0">
|
||||||
|
<stop offset="0%" stop-color="#3b82f6"/>
|
||||||
|
<stop offset="100%" stop-color="#2563eb"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>`;
|
||||||
|
|
||||||
|
// Background
|
||||||
|
svg += `<rect x="0" y="0" width="${width}" height="${height}" fill="white" rx="10"/>`;
|
||||||
|
|
||||||
|
// Grid lines
|
||||||
|
const gridCount = 5;
|
||||||
|
for (let i = 0; i <= gridCount; i++) {
|
||||||
|
const y = margin.top + (i * chartHeight / gridCount);
|
||||||
|
const rating = Math.round(maxRating - (i * (maxRating - minRating) / gridCount));
|
||||||
|
|
||||||
|
svg += `<line x1="${margin.left}" y1="${y}" x2="${margin.left + chartWidth}" y2="${y}" stroke="#f1f5f9" stroke-width="1"/>`;
|
||||||
|
svg += `<text x="${margin.left - 10}" y="${y + 4}" text-anchor="end" font-size="11" font-family="'DM Sans', sans-serif" fill="#94a3b8" font-weight="500">${rating}</text>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Area fill
|
||||||
|
svg += `<path d="${areaPath}" fill="url(#areaGrad-${pdgaNumber})"/>`;
|
||||||
|
|
||||||
|
// Line
|
||||||
|
svg += `<path d="${pathData}" stroke="url(#lineGrad-${pdgaNumber})" stroke-width="2.5" fill="none" stroke-linejoin="round" stroke-linecap="round"/>`;
|
||||||
|
|
||||||
|
// Data points
|
||||||
points.forEach((point, i) => {
|
points.forEach((point, i) => {
|
||||||
svg += `<circle cx="${point.x}" cy="${point.y}" r="12" fill="transparent" class="hover-area" data-index="${i}" style="cursor: pointer;"/>`;
|
svg += `<circle cx="${point.x}" cy="${point.y}" r="14" fill="transparent" class="hover-area" data-index="${i}" style="cursor: pointer;"/>`;
|
||||||
svg += `<circle cx="${point.x}" cy="${point.y}" r="4" fill="#007bff" stroke="white" stroke-width="2" class="data-point" data-index="${i}" style="pointer-events: none;"/>`;
|
svg += `<circle cx="${point.x}" cy="${point.y}" r="3.5" fill="#3b82f6" stroke="white" stroke-width="2" class="data-point" data-index="${i}" style="pointer-events: none;"/>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// X-axis labels
|
||||||
const labelStep = Math.max(1, Math.floor(history.length / 6));
|
const labelStep = Math.max(1, Math.floor(history.length / 6));
|
||||||
history.forEach((point, i) => {
|
history.forEach((point, i) => {
|
||||||
if (i % labelStep === 0 || i === history.length - 1) {
|
if (i % labelStep === 0 || i === history.length - 1) {
|
||||||
const x = margin.left + (i * xStep);
|
const x = margin.left + (i * xStep);
|
||||||
const date = new Date(point.date).toLocaleDateString('en-US', { month: 'short', year: '2-digit' });
|
const date = new Date(point.date).toLocaleDateString('en-US', { month: 'short', year: '2-digit' });
|
||||||
svg += `<text x="${x}" y="${height - 10}" text-anchor="middle" font-size="11" fill="#666">${date}</text>`;
|
svg += `<text x="${x}" y="${height - 12}" text-anchor="middle" font-size="11" font-family="'DM Sans', sans-serif" fill="#94a3b8" font-weight="500">${date}</text>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
svg += `<text x="20" y="${height/2}" text-anchor="middle" font-size="12" fill="#333" transform="rotate(-90, 20, ${height/2})">Rating</text>`;
|
// Y-axis label
|
||||||
|
svg += `<text x="16" y="${height / 2}" text-anchor="middle" font-size="11" font-family="'DM Sans', sans-serif" fill="#94a3b8" font-weight="500" transform="rotate(-90, 16, ${height / 2})">Rating</text>`;
|
||||||
|
|
||||||
svg += '</svg>';
|
svg += '</svg>';
|
||||||
|
|
||||||
container.innerHTML = svg;
|
container.textContent = '';
|
||||||
|
container.insertAdjacentHTML('beforeend', svg);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const svgElement = document.getElementById(`svg-${pdgaNumber}`);
|
const svgElement = document.getElementById(`svg-${pdgaNumber}`) || container.querySelector('svg');
|
||||||
|
if (!svgElement) return;
|
||||||
if (svgElement) {
|
|
||||||
const hoverAreas = svgElement.querySelectorAll('.hover-area');
|
const hoverAreas = svgElement.querySelectorAll('.hover-area');
|
||||||
const dataPoints = svgElement.querySelectorAll('.data-point');
|
const dataPoints = svgElement.querySelectorAll('.data-point');
|
||||||
|
|
||||||
let currentTooltip = null;
|
let currentTooltip = null;
|
||||||
let tooltipTimeout = null;
|
let tooltipTimeout = null;
|
||||||
|
|
||||||
hoverAreas.forEach((area, i) => {
|
hoverAreas.forEach((area, i) => {
|
||||||
area.addEventListener('mouseenter', (e) => {
|
area.addEventListener('mouseenter', (e) => {
|
||||||
if (tooltipTimeout) {
|
if (tooltipTimeout) {
|
||||||
clearTimeout(tooltipTimeout);
|
clearTimeout(tooltipTimeout);
|
||||||
tooltipTimeout = null;
|
tooltipTimeout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTooltip !== null && currentTooltip !== i) {
|
if (currentTooltip !== null && currentTooltip !== i) {
|
||||||
dataPoints[currentTooltip].setAttribute('r', '4');
|
dataPoints[currentTooltip].setAttribute('r', '3.5');
|
||||||
dataPoints[currentTooltip].setAttribute('fill', '#007bff');
|
dataPoints[currentTooltip].setAttribute('fill', '#3b82f6');
|
||||||
}
|
}
|
||||||
|
|
||||||
currentTooltip = i;
|
currentTooltip = i;
|
||||||
const point = points[i];
|
const point = points[i];
|
||||||
tooltip.innerHTML = `<strong>${point.date}</strong><br>Rating: ${point.rating}`;
|
|
||||||
tooltip.style.display = 'block';
|
tooltip.textContent = '';
|
||||||
|
const strong = document.createElement('strong');
|
||||||
|
strong.textContent = point.date;
|
||||||
|
tooltip.appendChild(strong);
|
||||||
|
tooltip.appendChild(document.createElement('br'));
|
||||||
|
tooltip.appendChild(document.createTextNode('Rating: ' + point.rating));
|
||||||
|
|
||||||
|
tooltip.style.display = 'block';
|
||||||
|
tooltip.style.left = `${e.clientX + 15}px`;
|
||||||
|
tooltip.style.top = `${e.clientY - 35}px`;
|
||||||
|
|
||||||
|
dataPoints[i].setAttribute('r', '6');
|
||||||
|
dataPoints[i].setAttribute('fill', '#2563eb');
|
||||||
|
});
|
||||||
|
|
||||||
|
area.addEventListener('mousemove', (e) => {
|
||||||
|
if (currentTooltip === i) {
|
||||||
tooltip.style.left = `${e.clientX + 15}px`;
|
tooltip.style.left = `${e.clientX + 15}px`;
|
||||||
tooltip.style.top = `${e.clientY - 35}px`;
|
tooltip.style.top = `${e.clientY - 35}px`;
|
||||||
|
}
|
||||||
dataPoints[i].setAttribute('r', '6');
|
|
||||||
dataPoints[i].setAttribute('fill', '#0056b3');
|
|
||||||
});
|
|
||||||
|
|
||||||
area.addEventListener('mousemove', (e) => {
|
|
||||||
if (currentTooltip === i) {
|
|
||||||
tooltip.style.left = `${e.clientX + 15}px`;
|
|
||||||
tooltip.style.top = `${e.clientY - 35}px`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
area.addEventListener('mouseleave', () => {
|
|
||||||
if (currentTooltip === i) {
|
|
||||||
tooltipTimeout = setTimeout(() => {
|
|
||||||
tooltip.style.display = 'none';
|
|
||||||
dataPoints[i].setAttribute('r', '4');
|
|
||||||
dataPoints[i].setAttribute('fill', '#007bff');
|
|
||||||
currentTooltip = null;
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
area.addEventListener('mouseleave', () => {
|
||||||
|
if (currentTooltip === i) {
|
||||||
|
tooltipTimeout = setTimeout(() => {
|
||||||
|
tooltip.style.display = 'none';
|
||||||
|
dataPoints[i].setAttribute('r', '3.5');
|
||||||
|
dataPoints[i].setAttribute('fill', '#3b82f6');
|
||||||
|
currentTooltip = null;
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-18
@@ -1,21 +1,22 @@
|
|||||||
<% var body = `
|
<% var body = `
|
||||||
<div class="search-container">
|
<div class="card-section">
|
||||||
<input
|
<h3>Find Courses</h3>
|
||||||
type="text"
|
<div class="card-section-form">
|
||||||
class="search-input"
|
<input
|
||||||
id="course-search"
|
type="text"
|
||||||
name="q"
|
class="input"
|
||||||
placeholder="Search courses by name or city..."
|
id="course-search"
|
||||||
hx-get="/partials/course-table"
|
name="q"
|
||||||
hx-trigger="input changed delay:300ms, search"
|
placeholder="Search courses by name or city..."
|
||||||
hx-target="#courses-table"
|
hx-get="/partials/course-table"
|
||||||
/>
|
hx-trigger="input changed delay:300ms, search"
|
||||||
</div>
|
hx-target="#courses-table"
|
||||||
|
style="width: 340px;"
|
||||||
<div class="controls">
|
/>
|
||||||
<button class="btn" onclick="scrapeCourses()" id="scrape-courses-btn">
|
<button class="btn" onclick="scrapeCourses()" id="scrape-courses-btn">
|
||||||
<i class="fas fa-sync-alt"></i> Scrape Courses
|
<i class="fas fa-sync-alt"></i> Scrape Courses
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="loading" class="loading" style="display: none;">Loading courses...</div>
|
<div id="loading" class="loading" style="display: none;">Loading courses...</div>
|
||||||
@@ -29,4 +30,4 @@
|
|||||||
cssFiles: ['courses.css'],
|
cssFiles: ['courses.css'],
|
||||||
jsFiles: ['courses.js'],
|
jsFiles: ['courses.js'],
|
||||||
body: body
|
body: body
|
||||||
}) %>
|
}) %>
|
||||||
@@ -1,23 +1,24 @@
|
|||||||
<% var body = `
|
<% var body = `
|
||||||
<!-- Add Player Section -->
|
<!-- Add Player Section -->
|
||||||
<div class="add-player-section">
|
<div class="card-section">
|
||||||
<h3>Add Yourself to Tracked Players</h3>
|
<h3>Add Yourself to Tracked Players</h3>
|
||||||
<div class="add-player-form">
|
<div class="card-section-form">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="pdga-number-input"
|
id="pdga-number-input"
|
||||||
class="pdga-input"
|
class="input"
|
||||||
placeholder="Enter your PDGA number"
|
placeholder="Enter your PDGA number"
|
||||||
min="1"
|
min="1"
|
||||||
|
style="width: 240px;"
|
||||||
/>
|
/>
|
||||||
<button class="btn btn-add" onclick="searchAndAddPlayer()">
|
<button class="btn btn-add" onclick="searchAndAddPlayer()">
|
||||||
<i class="fas fa-user-plus"></i> Add Player
|
<i class="fas fa-user-plus"></i> Add Player
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="position: absolute; top: 10px; right: 15px;">
|
<div style="display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 16px;">
|
||||||
<a href="#" onclick="loadAllPlayers(); return false;" style="color: #007bff; font-size: 11px; text-decoration: none; margin-right: 10px;" title="Load all player data" id="load-all-btn">Load All</a>
|
<a href="#" onclick="loadAllPlayers(); return false;" style="color: var(--accent); font-size: 12px; text-decoration: none;" title="Load all player data" id="load-all-btn">Load All</a>
|
||||||
<a href="#" onclick="clearCache(); return false;" style="color: #ccc; font-size: 12px; text-decoration: none; opacity: 0.3;" title="Clear cache"><i class="fas fa-cog"></i></a>
|
<a href="#" onclick="clearCache(); return false;" style="color: var(--text-muted); font-size: 12px; text-decoration: none; opacity: 0.4;" title="Clear cache"><i class="fas fa-cog"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="loading" class="loading" style="display: none;">Loading ratings...</div>
|
<div id="loading" class="loading" style="display: none;">Loading ratings...</div>
|
||||||
<div id="progress-section" style="display: none;">
|
<div id="progress-section" style="display: none;">
|
||||||
|
|||||||
@@ -20,14 +20,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
%>
|
%>
|
||||||
<h4 style="margin-top: 0;">Layouts:</h4>
|
<h4>Layouts:</h4>
|
||||||
|
|
||||||
<% if (activeLayouts.length > 0) { %>
|
<% if (activeLayouts.length > 0) { %>
|
||||||
<% activeLayouts.forEach(function(layout) {
|
<% activeLayouts.forEach(function(layout) {
|
||||||
var ratingDisplay = layout.mean_rating ?
|
var ratingDisplay = layout.mean_rating ?
|
||||||
'<span style="color: #28a745; font-weight: bold; margin-left: 10px;">Rating: ' + layout.mean_rating + '</span>' : '';
|
'<span style="color: var(--green); font-weight: 700; margin-left: 10px;">Rating: ' + layout.mean_rating + '</span>' : '';
|
||||||
var dateDisplay = layout.last_played ?
|
var dateDisplay = layout.last_played ?
|
||||||
'<span style="color: #6c757d; font-size: 12px; margin-left: 10px;">Last played: ' + new Date(layout.last_played).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' }) + '</span>' : '';
|
'<span style="color: var(--text-muted); font-size: 12px; margin-left: 10px;">Last played: ' + new Date(layout.last_played).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' }) + '</span>' : '';
|
||||||
%>
|
%>
|
||||||
<div class="layout-item">
|
<div class="layout-item">
|
||||||
<div>
|
<div>
|
||||||
@@ -48,10 +48,10 @@
|
|||||||
<div class="accordion-content" id="accordion-<%= courseId %>">
|
<div class="accordion-content" id="accordion-<%= courseId %>">
|
||||||
<% inactiveLayouts.forEach(function(layout) {
|
<% inactiveLayouts.forEach(function(layout) {
|
||||||
var ratingDisplay = layout.mean_rating ?
|
var ratingDisplay = layout.mean_rating ?
|
||||||
'<span style="color: #28a745; font-weight: bold; margin-left: 10px;">Rating: ' + layout.mean_rating + '</span>' : '';
|
'<span style="color: var(--green); font-weight: 700; margin-left: 10px;">Rating: ' + layout.mean_rating + '</span>' : '';
|
||||||
var dateDisplay = layout.last_played ?
|
var dateDisplay = layout.last_played ?
|
||||||
'<span style="color: #6c757d; font-size: 12px; margin-left: 10px;">Last played: ' + new Date(layout.last_played).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' }) + '</span>' :
|
'<span style="color: var(--text-muted); font-size: 12px; margin-left: 10px;">Last played: ' + new Date(layout.last_played).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' }) + '</span>' :
|
||||||
'<span style="color: #dc3545; font-size: 12px; margin-left: 10px;">Never played</span>';
|
'<span style="color: var(--red); font-size: 12px; margin-left: 10px;">Never played</span>';
|
||||||
%>
|
%>
|
||||||
<div class="layout-item inactive">
|
<div class="layout-item inactive">
|
||||||
<div>
|
<div>
|
||||||
@@ -68,4 +68,4 @@
|
|||||||
<% if (activeLayouts.length === 0 && inactiveLayouts.length === 0) { %>
|
<% if (activeLayouts.length === 0 && inactiveLayouts.length === 0) { %>
|
||||||
<div class="no-layouts">No layouts found. Click the refresh icon to scrape layouts.</div>
|
<div class="no-layouts">No layouts found. Click the refresh icon to scrape layouts.</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
@@ -14,9 +14,17 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<header class="app-header">
|
||||||
|
<div class="header-inner">
|
||||||
|
<a href="/" class="app-logo">
|
||||||
|
<span class="logo-icon"><i class="fas fa-compact-disc"></i></span>
|
||||||
|
PDGA Ratings
|
||||||
|
</a>
|
||||||
|
<%- include('../partials/nav') %>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1><%= heading %></h1>
|
|
||||||
<%- include('../partials/nav') %>
|
|
||||||
<%- body %>
|
<%- body %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div style="text-align: center; margin-bottom: 20px;">
|
<nav class="app-nav">
|
||||||
<a href="/" style="margin: 0 15px; color: <%= activePage === 'players' ? '#333' : '#007bff' %>; text-decoration: none; font-weight: bold;">Player Ratings</a>
|
<a href="/" class="<%= activePage === 'players' ? 'active' : '' %>">Players</a>
|
||||||
<a href="/courses" style="margin: 0 15px; color: <%= activePage === 'courses' ? '#333' : '#007bff' %>; text-decoration: none; font-weight: bold;">Courses</a>
|
<a href="/courses" class="<%= activePage === 'courses' ? 'active' : '' %>">Courses</a>
|
||||||
</div>
|
</nav>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<% if (ratings.length === 0) { %>
|
<% if (ratings.length === 0) { %>
|
||||||
<p>No ratings found.</p>
|
<p style="text-align: center; color: var(--text-muted); padding: 40px 0;">No ratings found.</p>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
<td class="mobile-hide"><%= index + 1 %></td>
|
<td class="mobile-hide"><%= index + 1 %></td>
|
||||||
<td class="player-name">
|
<td class="player-name">
|
||||||
<a href="https://www.pdga.com/player/<%= player.pdgaNumber %>" target="_blank" onclick="event.stopPropagation()"><%= player.name %></a>
|
<a href="https://www.pdga.com/player/<%= player.pdgaNumber %>" target="_blank" onclick="event.stopPropagation()"><%= player.name %></a>
|
||||||
<div class="mobile-only pdga-number" style="font-size: 11px; color: #999; margin-top: 2px;">PDGA #<%= player.pdgaNumber %></div>
|
<div class="mobile-only pdga-number" style="font-size: 11px; margin-top: 2px;">PDGA #<%= player.pdgaNumber %></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="pdga-number mobile-hide">#<%= player.pdgaNumber %></td>
|
<td class="pdga-number mobile-hide">#<%= player.pdgaNumber %></td>
|
||||||
<td class="rating">
|
<td class="rating">
|
||||||
<div class="refresh-section">
|
<div class="refresh-section">
|
||||||
<span class="rating-value" data-rating="<%= player.rating || '' %>" data-stddev="<%= player.stdDev || '' %>" data-pdga="<%= player.pdgaNumber %>" style="cursor: help;"><%- player.rating || '<span style="color: #999; font-style: italic;">Click refresh</span>' %></span>
|
<span class="rating-value" data-rating="<%= player.rating || '' %>" data-stddev="<%= player.stdDev || '' %>" data-pdga="<%= player.pdgaNumber %>" style="cursor: help;"><%- player.rating || '<span style="color: var(--text-muted); font-style: italic;">Click refresh</span>' %></span>
|
||||||
<i class="fas fa-sync-alt refresh-icon" onclick="refreshPlayer(<%= player.pdgaNumber %>)" title="Refresh player data"></i>
|
<i class="fas fa-sync-alt refresh-icon" onclick="refreshPlayer(<%= player.pdgaNumber %>)" title="Refresh player data"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="mobile-only rating-change <%= ratingChangeClass %>" style="font-size: 11px; margin-top: 2px;"><%= ratingChangeText %></div>
|
<div class="mobile-only rating-change <%= ratingChangeClass %>" style="font-size: 11px; margin-top: 2px;"><%= ratingChangeText %></div>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<td class="predicted-rating mobile-hide" id="predicted-<%= player.pdgaNumber %>">
|
<td class="predicted-rating mobile-hide" id="predicted-<%= player.pdgaNumber %>">
|
||||||
<div class="refresh-section">
|
<div class="refresh-section">
|
||||||
<span class="predicted-value" data-stddev="<%= player.stdDev || '' %>" data-pdga="<%= player.pdgaNumber %>" style="cursor: help;"><%= player.predictedRating || 'N/A' %></span>
|
<span class="predicted-value" data-stddev="<%= player.stdDev || '' %>" data-pdga="<%= player.pdgaNumber %>" style="cursor: help;"><%= player.predictedRating || 'N/A' %></span>
|
||||||
<i class="fas fa-question-circle debug-icon" onclick="showDebugInfo(<%= player.pdgaNumber %>)" title="Show calculation details" style="margin-left: 5px; color: #6c757d; cursor: pointer; opacity: 0.6;"></i>
|
<i class="fas fa-question-circle debug-icon" onclick="showDebugInfo(<%= player.pdgaNumber %>)" title="Show calculation details" style="margin-left: 5px; color: var(--text-muted); cursor: pointer; opacity: 0.6;"></i>
|
||||||
<i class="fas fa-sync-alt refresh-icon" onclick="refreshRoundHistory(<%= player.pdgaNumber %>)" title="Refresh prediction data"></i>
|
<i class="fas fa-sync-alt refresh-icon" onclick="refreshRoundHistory(<%= player.pdgaNumber %>)" title="Refresh prediction data"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="std-dev-tooltip" id="tooltip-stddev-<%= player.pdgaNumber %>"></div>
|
<div class="std-dev-tooltip" id="tooltip-stddev-<%= player.pdgaNumber %>"></div>
|
||||||
@@ -61,4 +61,4 @@
|
|||||||
<% }); %>
|
<% }); %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<% } %>
|
<% } %>
|
||||||
Reference in New Issue
Block a user