Skip to content

Commit fe373bf

Browse files
committed
Split client-side JS into separate file. Tweaks to layout and styling.
1 parent 2c28f94 commit fe373bf

4 files changed

Lines changed: 433 additions & 654 deletions

File tree

‎jgclark.Summaries/plugin.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"plugin.script": "script.js",
1616
"plugin.requiredFiles": [
1717
"chart.umd.min.js",
18-
"chartStats.css"
18+
"chartStats.css",
19+
"chartStatsScripts.js"
1920
],
2021
"plugin.isRemote": "false",
2122
"plugin.commands": [
@@ -525,7 +526,7 @@
525526
"title": "Colors for Charts",
526527
"description": "Comma-separated list of colors to use in the charts. Supported color formats are:\n- CSS names (e.g. 'red', 'blue')\n- Tailwind color names (e.g. 'gray-500', 'blue-500')\n- RGB Hex (e.g. '#F00', '#FF0000')\n- RGB decimal (e.g. 'rgba(255 0 0 / 0.7)')\n- HSL (e.g. 'hsl(0 100% 50%)')\n(If this is left blank, the default colors will be used.)",
527528
"type": "string",
528-
"default": "#0a84ff, purple, green, red, yellow, orange, cyan, pink, mint, brown, indigo, rose",
529+
"default": "blue, purple, yellow, green, red, orange, cyan, pink, brown, indigo, #ff2d55, grey",
529530
"required": true
530531
},
531532
{

‎jgclark.Summaries/requiredFiles/chartStats.css‎

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** ----------------------------------------------------------------------------
22
* Chart Stats styles - loaded at runtime from requiredFiles/chartStats.css.
33
* Originally written by AI prompted by @grdn, then significantly modified by @jgclark.
4-
* Last updated 2026-01-30 for v1.1.0, @jgclark
4+
* Last updated 2026-02-01 for v1.1.0, @jgclark
55
* ---------------------------------------------------------------------------- */
66

77
* {
@@ -44,29 +44,33 @@ button, input {
4444
font-weight: 500;
4545
}
4646

47-
.header {
48-
margin-bottom: 24px;
49-
}
50-
5147
h1 {
5248
font-size: 1.75rem;
5349
font-weight: 600;
5450
letter-spacing: -0.5px;
5551
color: var(--text-primary);
5652
}
5753

54+
/*
55+
.header {
56+
margin-bottom: 24px;
57+
}
58+
*/
59+
5860
.section-header {
5961
display: flex;
6062
align-items: center;
6163
gap: 0.75rem;
6264
margin-bottom: 1rem;
6365
}
6466

67+
/*
6568
.section-header h2 {
6669
font-size: 1.25rem;
6770
font-weight: 600;
6871
color: var(--text-primary);
6972
}
73+
*/
7074

7175
.controls-wrapper {
7276
display: flex;
@@ -169,7 +173,7 @@ h1 {
169173
gap: 8px;
170174
}
171175

172-
.tag-checkbox {
176+
.filter-checkbox {
173177
width: 1.1rem;
174178
height: 1.1rem;
175179
cursor: pointer;
@@ -301,7 +305,7 @@ h1 {
301305
.charts-container {
302306
display: flex;
303307
flex-direction: column;
304-
gap: 20px;
308+
gap: 1rem;
305309
}
306310

307311
.chart-wrapper {
@@ -334,21 +338,25 @@ h1 {
334338
height: var(--chart-height, 11rem);
335339
}
336340

341+
/*
337342
.yesno-chart-container {
338343
height: var(--yesno-chart-height, 8rem);
339344
}
345+
*/
340346

341347
canvas {
342348
max-height: 100%;
343349
}
344350

351+
/*
345352
.chart-stats {
346353
display: flex;
347354
gap: 8px;
348355
align-items: center;
349356
font-size: 0.85rem;
350357
color: var(--text-secondary);
351358
}
359+
*/
352360

353361
.stat-separator {
354362
color: var(--text-secondary);
@@ -357,8 +365,8 @@ canvas {
357365

358366
.section-divider {
359367
margin: 1.5rem 0;
360-
padding-top: 1.5rem;
361-
border-top: 2px solid var(--border-color);
368+
/* padding-top: 1.5rem; */
369+
border-top: 2px dotted var(--border-color);
362370
}
363371

364372
.habit-type-badge {
@@ -376,7 +384,7 @@ canvas {
376384
/* Visualization display containers */
377385
.viz-display {
378386
display: block;
379-
padding: 0.75rem 0;
387+
/* padding: 0.75rem 0; */
380388
}
381389

382390
.heatmap-grid {
@@ -414,6 +422,7 @@ canvas {
414422
border-color: var(--border-color);
415423
}
416424

425+
/*
417426
.heatmap-legend {
418427
display: flex;
419428
align-items: center;
@@ -434,8 +443,9 @@ canvas {
434443
height: 12px;
435444
border-radius: 2px;
436445
border: 1px solid var(--border-color);
437-
}
446+
} */
438447

448+
/*
439449
.viz-selector {
440450
display: flex;
441451
gap: 4px;
@@ -463,7 +473,7 @@ canvas {
463473
.viz-option.active {
464474
background: var(--accent-color);
465475
color: white;
466-
}
476+
} */
467477

468478
/* Combined yes/no layout */
469479
.yesno-combined-wrapper {

0 commit comments

Comments
 (0)