@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
astro 95 lines 2.09 KB
Raw
1 ---
2 import { type BackfillChart, backfillCharts } from "./backfillCharts.ts";
3 import { renderLineChart } from "./lineChart.ts";
4
5 /**
6 * `<BackfillChart chart="timeByWidth" />` — one of the backfill scaling charts
7 * on the History at scale page, rendered inline so it follows the site theme.
8 */
9 interface Props {
10 chart: BackfillChart;
11 }
12
13 const svg = renderLineChart(backfillCharts[Astro.props.chart]);
14 ---
15
16 <figure class="backfill-chart not-content" set:html={svg} />
17
18 <style is:global>
19 .backfill-chart {
20 margin: 1.5rem 0;
21 --lc-s1: #2a78d6;
22 --lc-s2: #eb6834;
23 --lc-s3: #1baf7a;
24 }
25 :root[data-theme="dark"] .backfill-chart {
26 --lc-s1: #3987e5;
27 --lc-s2: #d95926;
28 --lc-s3: #199e70;
29 }
30 .backfill-chart .lc {
31 display: block;
32 width: 100%;
33 max-width: 640px;
34 height: auto;
35 font-family: var(--alc-font-sans);
36 }
37 .backfill-chart .lc-surface {
38 fill: var(--alc-bg-elev-1);
39 stroke: var(--alc-hairline-2);
40 }
41 .backfill-chart .lc-text {
42 fill: var(--alc-fg-1);
43 }
44 .backfill-chart .lc-muted {
45 fill: var(--alc-fg-3);
46 }
47 .backfill-chart .lc-title {
48 font-size: 14px;
49 font-weight: 600;
50 }
51 .backfill-chart .lc-small {
52 font-size: 11px;
53 }
54 .backfill-chart .lc-grid {
55 stroke: var(--alc-hairline-2);
56 stroke-width: 1;
57 }
58 .backfill-chart .lc-s1,
59 .backfill-chart .lc-s2,
60 .backfill-chart .lc-s3 {
61 stroke-width: 2;
62 stroke-linejoin: round;
63 stroke-linecap: round;
64 }
65 .backfill-chart .lc-s1 {
66 stroke: var(--lc-s1);
67 fill: var(--lc-s1);
68 }
69 .backfill-chart .lc-s2 {
70 stroke: var(--lc-s2);
71 fill: var(--lc-s2);
72 }
73 .backfill-chart .lc-s3 {
74 stroke: var(--lc-s3);
75 fill: var(--lc-s3);
76 }
77 .backfill-chart path[fill="none"] {
78 fill: none;
79 }
80 .backfill-chart .lc-pt > * {
81 stroke: var(--alc-bg-elev-1);
82 stroke-width: 2;
83 }
84 .backfill-chart .lc-label {
85 stroke: var(--alc-bg-elev-1);
86 stroke-width: 3;
87 paint-order: stroke;
88 stroke-linejoin: round;
89 }
90 .backfill-chart .lc-pt:hover > * {
91 transform-box: fill-box;
92 transform-origin: center;
93 transform: scale(1.4);
94 }
95 </style>