-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1003 lines (978 loc) · 27.7 KB
/
Copy pathindex.html
File metadata and controls
1003 lines (978 loc) · 27.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>UK ILR absence tracker</title>
<script>
try {
const theme = localStorage.getItem("ilr.theme");
if (theme === "light" || theme === "dark") {
document.documentElement.dataset.theme = theme;
}
} catch {
/* private mode */
}
</script>
<style>
:root {
color-scheme: light;
--page: #f9f9f7;
--surface-1: #fcfcfb;
--text-primary: #0b0b0b;
--text-secondary: #52514e;
--text-muted: #898781;
--grid: #e1e0d9;
--axis: #c3c2b7;
--today-guide: #898781;
--border: rgba(11, 11, 11, 0.1);
--series-1: #2a78d6;
--series-1-wash: rgba(42, 120, 214, 0.12);
--peak: #d97706;
--critical: #d03b3b;
--critical-wash: rgba(208, 59, 59, 0.16);
--good: #0ca30c;
--field: #ffffff;
--win-wash: rgba(11, 11, 11, 0.06);
--win-edge: rgba(11, 11, 11, 0.22);
--win-hatch: rgba(42, 120, 214, 0.38);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--page: #0d0d0d;
--surface-1: #1a1a19;
--text-primary: #ffffff;
--text-secondary: #c3c2b7;
--text-muted: #898781;
--grid: #2c2c2a;
--axis: #383835;
--today-guide: #b8b7b0;
--border: rgba(255, 255, 255, 0.1);
--series-1: #3987e5;
--series-1-wash: rgba(57, 135, 229, 0.16);
--peak: #f59e0b;
--critical: #d03b3b;
--critical-wash: rgba(208, 59, 59, 0.22);
--good: #0ca30c;
--field: #232322;
--win-wash: rgba(255, 255, 255, 0.07);
--win-edge: rgba(255, 255, 255, 0.28);
--win-hatch: rgba(57, 135, 229, 0.48);
}
}
:root[data-theme="dark"] {
color-scheme: dark;
--page: #0d0d0d;
--surface-1: #1a1a19;
--text-primary: #ffffff;
--text-secondary: #c3c2b7;
--text-muted: #898781;
--grid: #2c2c2a;
--axis: #383835;
--today-guide: #b8b7b0;
--border: rgba(255, 255, 255, 0.1);
--series-1: #3987e5;
--series-1-wash: rgba(57, 135, 229, 0.16);
--peak: #f59e0b;
--critical: #d03b3b;
--critical-wash: rgba(208, 59, 59, 0.22);
--good: #0ca30c;
--field: #232322;
--win-wash: rgba(255, 255, 255, 0.07);
--win-edge: rgba(255, 255, 255, 0.28);
--win-hatch: rgba(57, 135, 229, 0.48);
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: var(--page);
color: var(--text-primary);
font:
13px/1.45 system-ui,
-apple-system,
"Segoe UI",
sans-serif;
-webkit-font-smoothing: antialiased;
overflow: hidden; /* the layout is sized to the viewport */
}
.wrap {
height: 100%;
display: grid;
grid-template-rows: auto 1fr auto;
gap: 12px;
padding: 14px 18px 16px;
max-width: 1800px;
margin: 0 auto;
}
header.top {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
column-gap: 12px;
row-gap: 2px;
align-items: center;
}
header.top > div {
min-width: 0;
}
.header-actions {
display: flex;
align-items: center;
gap: 7px;
}
h1 {
font-size: 17px;
font-weight: 600;
margin: 0 0 2px;
letter-spacing: -0.01em;
}
.sub {
color: var(--text-secondary);
font-size: 12px;
margin: 0;
}
.theme-toggle {
width: 34px;
height: 34px;
padding: 0;
border-radius: 50%;
display: grid;
place-items: center;
flex: none;
}
.header-action {
position: relative;
width: 34px;
height: 34px;
display: grid;
place-items: center;
flex: none;
padding: 0;
color: var(--text-primary);
background: var(--field);
border: 1px solid var(--border);
border-radius: 50%;
text-decoration: none;
}
.header-action:hover {
border-color: var(--axis);
}
.header-action:focus-visible {
outline: 2px solid var(--series-1);
outline-offset: 1px;
}
.github-link svg {
width: 17px;
height: 17px;
fill: currentColor;
}
.share-button svg {
width: 17px;
height: 17px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.header-action::after {
content: attr(aria-label);
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 8;
padding: 4px 7px;
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-primary);
background: var(--surface-1);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
font-size: 11px;
line-height: 1.2;
white-space: nowrap;
pointer-events: none;
opacity: 0;
visibility: hidden;
transition: opacity 80ms ease 100ms, visibility 0s linear 180ms;
}
.header-action:hover::after,
.header-action:focus-visible::after {
opacity: 1;
visibility: visible;
transition-delay: 100ms;
}
.theme-toggle svg {
width: 17px;
height: 17px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.theme-toggle .sun {
display: none;
}
:root[data-theme="dark"] .theme-toggle .moon {
display: none;
}
:root[data-theme="dark"] .theme-toggle .sun {
display: block;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .theme-toggle .moon {
display: none;
}
:root:not([data-theme="light"]) .theme-toggle .sun {
display: block;
}
}
main {
display: grid;
grid-template-columns: var(--split, 38.2%) 10px 1fr;
gap: 6px;
min-height: 0; /* lets children shrink instead of overflowing */
}
.splitter {
position: relative;
cursor: col-resize;
touch-action: none;
background: none;
border: none;
padding: 0;
border-radius: 4px;
}
.splitter::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 4px;
width: 2px;
background: var(--border);
border-radius: 2px;
transition: background 0.12s;
}
.splitter:hover::after,
.splitter.active::after,
.splitter:focus-visible::after {
background: var(--series-1);
}
.splitter:focus-visible {
outline: none;
}
body.resizing {
cursor: col-resize;
user-select: none;
}
.col {
display: flex;
flex-direction: column;
gap: 10px;
min-height: 0;
}
input[type="date"],
input[type="text"] {
font: inherit;
font-size: 12px;
color: var(--text-primary);
background: var(--field);
border: 1px solid var(--border);
border-radius: 5px;
padding: 3px 6px;
width: 100%;
}
input:focus-visible,
button:focus-visible {
outline: 2px solid var(--series-1);
outline-offset: 1px;
}
.tiles {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 10px;
flex: none;
}
.tile {
background: var(--surface-1);
border: 1px solid var(--border);
border-radius: 10px;
padding: 9px 12px;
}
.tile .k {
font-size: 11px;
color: var(--text-secondary);
margin-bottom: 2px;
}
.tile .v {
font-size: 25px;
font-weight: 600;
line-height: 1.15;
letter-spacing: -0.02em;
}
.tile .n {
font-size: 10.5px;
color: var(--text-muted);
margin-top: 1px;
line-height: 1.35;
}
.v.breach {
color: var(--critical);
}
.v.ok {
color: var(--good);
}
.card {
background: var(--surface-1);
border: 1px solid var(--border);
border-radius: 10px;
padding: 10px 12px;
display: flex;
flex-direction: column;
min-height: 0;
}
.card h2 {
font-size: 13px;
font-weight: 600;
margin: 0 0 1px;
flex: none;
}
.card-title {
display: flex;
align-items: center;
gap: 5px;
margin-bottom: 6px;
flex: none;
}
.card-title h2 {
margin: 0;
}
.trip-info {
position: relative;
width: 17px;
height: 17px;
display: grid;
place-items: center;
color: var(--text-muted);
cursor: help;
border-radius: 50%;
}
.trip-info:hover {
color: var(--series-1);
}
.trip-info:focus-visible {
outline: 2px solid var(--series-1);
outline-offset: 1px;
}
.trip-info svg {
width: 15px;
height: 15px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.trip-info-text {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 6;
width: min(310px, calc(100vw - 52px));
margin: 0;
padding: 9px 11px;
color: var(--text-secondary);
background: var(--surface-1);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
font-size: 11px;
line-height: 1.45;
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: opacity 0.09s;
}
.trip-info:hover .trip-info-text,
.trip-info:focus-visible .trip-info-text {
visibility: visible;
opacity: 1;
}
.card p.note {
font-size: 11px;
color: var(--text-secondary);
margin: 0 0 6px;
flex: none;
}
/* The chart gets first claim on spare height; tables give way, since they
scroll internally and stay usable when short. */
.card.chart {
flex: 3 1 240px;
min-height: 210px;
}
.card.strip {
flex: none;
}
.card.grow {
flex: 1 1 150px;
min-height: 110px;
}
/* overflow:hidden keeps a stale svg height from spilling onto the next card
in the moment between a box change and the redraw */
.plot {
position: relative;
min-height: 0;
overflow: hidden;
}
.card.chart .plot {
flex: 1 1 0;
}
.card.chart .plot.can-select-window {
cursor: pointer;
}
.card.chart .plot,
.card.strip {
touch-action: pan-y;
}
/* Fixed so the strip's height never depends on whether its svg is present.
Must match the height drawTrips() computes: PAD.t + 2 + barH + 26. */
.card.strip .plot {
height: 58px;
}
.plot svg {
display: block;
width: 100%;
}
.plot .bar {
cursor: pointer;
}
/* Fixed, not absolute: the chart clips its own overflow, and an absolutely
positioned tooltip inside that box gets cut off near the edges. */
.tt {
position: fixed;
pointer-events: none;
opacity: 0;
transition: opacity 0.09s;
background: var(--surface-1);
border: 1px solid var(--border);
border-radius: 8px;
padding: 7px 9px;
font-size: 11.5px;
line-height: 1.45;
white-space: nowrap;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
z-index: 5;
}
.tt b {
font-weight: 600;
}
.tt hr {
border: none;
border-top: 1px solid var(--grid);
margin: 5px 0;
}
.tt .row {
display: flex;
justify-content: space-between;
gap: 14px;
}
.tt .sw {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 2px;
margin-right: 5px;
vertical-align: baseline;
}
.tt .muted {
color: var(--text-muted);
}
.tt .selection-help {
display: block;
max-width: 240px;
color: var(--text-muted);
font-size: 10.5px;
white-space: normal;
}
.tt .touch-help {
display: none;
}
@media (pointer: coarse) {
.tt {
background: color-mix(in srgb, var(--surface-1) 70%, transparent);
}
.tt .keyboard-help {
display: none;
}
.tt .touch-help {
display: block;
}
}
.scrolly {
overflow-y: auto;
min-height: 0;
flex: 1 1 0;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
th,
td {
text-align: left;
padding: 4px 7px;
border-bottom: 1px solid var(--grid);
}
th {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-muted);
font-weight: 600;
position: sticky;
top: 0;
background: var(--surface-1);
z-index: 1;
}
td.num,
th.num {
text-align: right;
font-variant-numeric: tabular-nums;
}
/* the visa-validity header scrolls away with its row; only the trips
header sticks */
th.plainhead {
position: static;
}
td.firstnote-cell {
padding-top: 5px;
padding-bottom: 8px;
}
.firstnote {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 8px 10px;
border: 1px solid var(--border);
border-left: 3px solid var(--series-1);
border-radius: 6px;
color: var(--text-secondary);
background: var(--series-1-wash);
font-size: 11px;
line-height: 1.4;
}
.firstnote b,
.firstnote span span {
display: block;
}
.firstnote b {
margin-bottom: 1px;
color: var(--text-primary);
font-weight: 600;
}
.firstnote svg {
width: 15px;
height: 15px;
margin-top: 1px;
flex: none;
fill: none;
stroke: var(--series-1);
stroke-width: 1.8;
stroke-linecap: round;
}
.section-separator td {
height: 12px;
padding: 0;
border-bottom: 1px solid var(--border);
}
#triptable tr.trip-row td {
border-bottom: none;
}
#triptable tr.trip-row {
background-image: linear-gradient(var(--border), var(--border));
background-position: center bottom;
background-repeat: no-repeat;
background-size: calc(100% - 24px) 1px;
}
#triptable tr.trip-row:last-child {
background-image: none;
}
tbody tr:last-child td {
border-bottom: none;
}
tr.bad td {
background: var(--critical-wash);
}
#wintable tr.selected-window td {
background: var(--series-1-wash);
}
#wintable tbody tr {
cursor: pointer;
}
#wintable tbody tr:hover:not(.selected-window) td {
background: var(--win-wash);
}
#wintable tbody tr:focus-visible {
outline: 2px solid var(--series-1);
outline-offset: -2px;
}
#wintable tr.selected-window td:first-child {
box-shadow: inset 3px 0 0 var(--series-1);
}
tr.bad td:first-child {
box-shadow: inset 2px 0 0 var(--critical);
}
.badnote {
color: var(--critical);
font-size: 11px;
margin: 6px 0 0;
flex: none;
}
.pill {
font-size: 10px;
font-weight: 600;
padding: 1px 6px;
border-radius: 99px;
display: inline-block;
}
.pill.ok {
color: var(--good);
background: rgba(12, 163, 12, 0.12);
}
.pill.breach {
color: var(--critical);
background: var(--critical-wash);
}
button {
font: inherit;
font-size: 12px;
cursor: pointer;
background: var(--field);
color: var(--text-primary);
border: 1px solid var(--border);
border-radius: 5px;
padding: 4px 9px;
}
button:hover {
border-color: var(--axis);
}
.icon-button {
position: relative;
width: 30px;
height: 30px;
display: grid;
place-items: center;
padding: 0;
}
.icon-button::after {
content: attr(aria-label);
position: absolute;
left: 50%;
bottom: calc(100% + 6px);
z-index: 8;
padding: 4px 7px;
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-primary);
background: var(--surface-1);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
font-size: 11px;
font-weight: 400;
line-height: 1.2;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transform: translate(-50%, 2px);
visibility: hidden;
transition: opacity 80ms ease 100ms, transform 80ms ease 100ms,
visibility 0s linear 180ms;
}
.icon-button:hover::after,
.icon-button:focus-visible::after {
opacity: 1;
transform: translate(-50%, 0);
visibility: visible;
transition-delay: 100ms;
}
.icon-button svg {
width: 17px;
height: 17px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
button.link {
background: none;
border: none;
color: var(--text-muted);
padding: 1px 4px;
font-size: 11px;
}
button.link:hover {
color: var(--critical);
}
.rowbar {
display: flex;
gap: 14px;
align-items: center;
padding-top: 8px;
flex: none;
flex-wrap: wrap;
}
.control-group {
display: flex;
gap: 7px;
align-items: center;
}
.control-group.data-actions {
margin-left: auto;
}
.rowbar-status {
flex-basis: 100%;
font-size: 11px;
color: var(--text-muted);
}
footer {
display: flex;
align-items: baseline;
gap: 16px;
font-size: 10.5px;
color: var(--text-muted);
line-height: 1.5;
flex: none;
}
.footer-credit {
margin-left: auto;
text-align: right;
white-space: nowrap;
}
footer code {
background: var(--field);
padding: 0 4px;
border-radius: 3px;
border: 1px solid var(--border);
}
/* Anything narrower than a laptop goes back to one column and scrolls. */
@media (max-width: 1100px), (max-height: 640px) {
body {
overflow: auto;
}
.wrap {
height: auto;
}
main {
grid-template-columns: 1fr;
}
.splitter {
display: none;
}
main > .col .card.grow {
min-height: 420px;
}
.card.chart {
flex: none;
min-height: auto;
}
.card.chart .plot {
min-height: 220px;
}
.tiles {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.footer-credit {
margin-left: 0;
text-align: left;
}
}
@media (max-width: 520px) {
.subtitle-lead,
.subtitle-tail {
display: block;
}
footer {
flex-wrap: wrap;
}
.footer-credit {
flex-basis: 100%;
}
}
</style>
</head>
<body>
<div class="wrap">
<header class="top">
<div>
<h1>UK ILR absence tracker</h1>
<p class="sub" id="subtitle"></p>
</div>
<div class="header-actions">
<button
class="theme-toggle header-action"
id="theme-toggle"
type="button"
aria-label="Switch to dark theme"
>
<svg class="moon" viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path>
</svg>
<svg class="sun" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="4"></circle>
<path
d="M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.66 6.34l1.41-1.41"
></path>
</svg>
</button>
<a
class="header-action github-link"
href="https://github.com/indradhanush/ilr"
target="_blank"
rel="noopener noreferrer"
aria-label="Found it useful? Please star it on GitHub?"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 .7a11.5 11.5 0 0 0-3.6 22.4c.6.1.8-.2.8-.6v-2.2c-3.3.7-4-1.4-4-1.4-.5-1.4-1.3-1.8-1.3-1.8-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1.1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.7-.3-5.5-1.3-5.5-5.7 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.6.1-3.1 0 0 1-.3 3.2 1.2a11 11 0 0 1 5.9 0c2.2-1.5 3.2-1.2 3.2-1.2.6 1.5.2 2.8.1 3.1.8.8 1.2 1.8 1.2 3.1 0 4.4-2.8 5.4-5.5 5.7.4.4.8 1.1.8 2.2v3.3c0 .4.2.7.8.6A11.5 11.5 0 0 0 12 .7Z"></path>
</svg>
</a>
<button
class="header-action share-button"
id="share"
type="button"
aria-label="Copy a shareable trips link"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<circle cx="18" cy="5" r="2.5"></circle>
<circle cx="6" cy="12" r="2.5"></circle>
<circle cx="18" cy="19" r="2.5"></circle>
<path d="m8.2 10.8 7.6-4.5M8.2 13.2l7.6 4.5"></path>
</svg>
</button>
</div>
</header>
<main id="main">
<!-- left: the data you edit -->
<div class="col">
<div class="card grow">
<div class="card-title">
<h2>Trips</h2>
<div
class="trip-info"
tabindex="0"
aria-label="About entering trips"
aria-describedby="trip-info-text"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="9"></circle>
<path d="M9.7 9a2.5 2.5 0 1 1 3.2 2.4c-.6.3-.9.8-.9 1.6M12 17h.01"></path>
</svg>
<p class="trip-info-text" id="trip-info-text" role="tooltip">
Start with entering your visa valid from date and your first
day of arrival. A delayed initial arrival counts as absence.
Add your trips (past, present and future) to see how it
affects the 180 day criteria. All data is saved locally in
your browser only, so you can close this window at any time
and come back to find it as you left it (unless you cleared
browser state).
</p>
</div>
</div>
<div class="scrolly"><table id="triptable"></table></div>
<p class="badnote" id="tripwarn"></p>
<div class="rowbar">
<div class="control-group">
<button class="icon-button" id="addrow" type="button" aria-label="Add trip">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 5v14M5 12h14"></path>
</svg>
</button>
<button class="icon-button" id="reset" type="button" aria-label="Reset trips">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 3v5h5M3.7 8a9 9 0 1 1-.6 7"></path>
</svg>
</button>
</div>
<div class="control-group data-actions">
<button class="icon-button" id="export" type="button" aria-label="Export trips">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 16V4M7 9l5-5 5 5M5 15v4h14v-4"></path>
</svg>
</button>
<button class="icon-button" id="import" type="button" aria-label="Import trips">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 4v12M7 11l5 5 5-5M5 15v4h14v-4"></path>
</svg>
</button>
<input id="import-file" type="file" accept="application/json,.json" hidden />
</div>
<span class="rowbar-status" id="copied"></span>
</div>
</div>
</div>
<div
class="splitter"
id="splitter"
role="separator"
aria-orientation="vertical"
aria-label="Resize columns"
tabindex="0"
></div>
<!-- right: what the data means -->
<div class="col">
<div class="tiles" id="tiles"></div>
<div class="card chart">
<h2>
Cumulative days spent outside the UK in a rolling 12-month window
</h2>
<p class="note">
On any date, how many days in the 365-day window centred on it
were spent outside the UK. Above the line breaks continuous
residence.
</p>
<div class="plot" id="plot1"><div class="tt" id="tt1"></div></div>
</div>
<div class="card strip" id="trip-timeline">
<div class="card-title">
<h2>Trips timeline</h2>
<div
class="trip-info"
tabindex="0"
aria-label="About selecting trip windows"
aria-describedby="timeline-info-text"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="9"></circle>
<path d="M9.7 9a2.5 2.5 0 1 1 3.2 2.4c-.6.3-.9.8-.9 1.6M12 17h.01"></path>
</svg>
<p class="trip-info-text" id="timeline-info-text" role="tooltip">
Click the same trip repeatedly to cycle the rolling window.
The first click places the trip at the window start, the
second centres it, and the third places it at the window end.
</p>
</div>
</div>
<div class="plot" id="plot2"><div class="tt" id="tt2"></div></div>
</div>
<div class="card grow">
<h2>Travel windows</h2>
<div class="scrolly"><table id="wintable"></table></div>
</div>
</div>
</main>
<footer>
<span>According to the official guidance, the days of departure or arrival are not counted as an absence.</span>
<span class="footer-credit">Made with ❤️ by Indradhanush Gupta</span>
</footer>
</div>
<script src="dist/trips-data.js"></script>
<script src="dist/model.js"></script>