aboutsummaryrefslogtreecommitdiff
path: root/static/style.scss
blob: 1d47691a28d31bcc170f19ed40e074353ce0ddae (plain)
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
$gray: #757575;
$btn-height: 0.5ex;

html, body {
    height: 100%;
    margin: 0;
}

.root {
    display: grid;
    margin: 0;
    max-width: 100%;
    height: 100%;

    grid-template-columns: auto auto 20em;
    grid-template-rows: auto;

    grid-template-areas:
        "main main nav"
        "main main cal"
            "main main details"
            "main main events"
            "footer footer events";

    /* main the graphical portion
       of both the wide and the table
       view */
    main {
        min-width: 0;  /* for wide */
        min-height: 0; /* for tall */

        /* apparently required if one wants to have multiple
       items within main, without it overflowing
       */
        display: flex;
        flex-direction: column;

        .event:target {
            box-shadow:
                 1em  1em 0.5em gold,
                -1em -1em 0.5em gold,
                 1em -1em 0.5em gold,
                -1em  1em 0.5em gold;
            z-index: 1;
        }
    }


    footer {
        margin: 0.5em;
        color: ray;
        font-size: 8pt;

        display: flex;
        justify-content: space-between;

        flex-direction: row;

        span {
            margin: 0 1em;
            white-space: nowrap;
        }
    }
}

@media (max-aspect-ratio: 3/4) {
    .root {
        grid-template-areas:
            "main main"
                "nav events"
                "cal events"
                "details events"
                ". events"
                "footer events";
        grid-template-rows: 70% auto;
        grid-template-columns: 50% auto;

        footer {
            flex-direction: column;
        }
    }
}

.hidelink {
    color: inherit;
    text-decoration: none;
}


/* Change View
----------------------------------------
"Buttons" for changing between weekly and monthly layout
*/

.calnav {
    display: flex;
    flex-direction: column;
    padding-left: 2em;
    padding-right: 2em;
}

.change-view {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    padding-top: 1ex;
    padding-bottom: 1ex;
}

#jump-to {
    > form {
        display: flex;
    }

    input {
        flex-grow: 2;
        margin-right: 1em;
    }

    button, a {
        /* Same as height, figure out way to force this */
        width: 2.5em;
    }
}

/* button
--------------------------------------------------
*/

.btn {
    padding: 0;

    /* if a */
    text-decoration: none;

    /* if button */
    border: none;
    background-color: inherit;

    > div {
        padding: 0.5em;
        background-color: #3399ff;
        color: white;

        box-sizing: border-box;
        width: 100%;
        height: 100%;

        display: flex;
        justify-content: center;
        align-items: center;

        /* shouldn't be needed, but otherwise wont align with a text input
       inside a shared flex-container.
       It however seems to make <a> and <button> tag refuse to be the same height?
       */
        height: 2.5em;

        box-shadow: $btn-height $btn-height gray;
    }

    &:active > div {
        transform: translate($btn-height, $btn-height);
        box-shadow: none;
    }
}

/* Eventlist
----------------------------------------
The sidebar with all the events
*/

.eventlist {
    min-height: 0;
    overflow: auto;
    border-top: 3px solid $gray;
    /* mostly for long links */
    word-break: break-word;

    .eventtext {
        border-bottom: 1px solid black;
        margin-top: 1em;
        border-left-style: solid;
        border-left-width: 6px;
        padding-left: 2px;
    }

    .eventtext {
        border-color: var(--color);

        &.tentative {
            border-left-style: dashed;
        }
    }
}

/* Text day
----------------------------------------
Each event within the eventlist
*/

.text-day {
    border-left: 2px solid black;
    border-top: 2px solid black;
    padding-left: 2px;
    margin-top: 1em;

    header h2 {
        width: 100%;
        text-align: center;
        font-size: 14pt;
    }
}

/* Small calendar
----------------------------------------
*/

.smallcal {
    display: flex;
    justify-content: center;

    .nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: 150%;
    }
}

.smallcall-head {
    text-align: center;
    font-weight: bold;
}

/* Sass greatly discourages @import in favour of @use. @use however doesn't work
   for me.
*/
@import 'small-calendar';


/* Sliders
----------------------------------------
 */

.sliders {
    label {
        padding-left: 1em;
    }

    input[type="range"] {
        width: 100%;
        margin: 0;
    }

    .input-group {
        display: flex;

        input {
            min-width: 0;
        }
    }
}

/* Calendar List
----------------------------------------
The list of all the loaded calendars,
along with their colors.
*/

.calendarlist li {
    font-size: 8pt;
    list-style-type: none;
    border-left-width: 1em;
    border-left-style: solid;
    border-color: var(--color);
    padding-left: 1ex;

    /* force to single line */
    overflow: hidden;
    white-space: nowrap;
}

/* Caltable
----------------------------------------
*/

.table-head {
    font-size: 200%;
    text-align: center;
}

.caltable {
    flex-grow: 10;

    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* grid template rows is generated
       inline in the HTML */

    max-height: 100%;
    /* Apparently needed to ensure that parent
       can contain all its children */
    min-height: 0;

    .thead {
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thead, .cal-cell {
        border: 1px solid $gray;
    }

    .cal-cell {
        overflow-y: auto;

        .event {
            font-size: 8pt;
            border-radius: 5px;
            padding: 2px;
            margin: 2px;
            font-family: arial;
        }
    }

    .cal-cell-time {
        border-bottom: none;
    }

    .cal-cell-short {
        border-top: none
    }


    .longevents {
        border-bottom: none;
        border-top: none;
        position: relative;

        .event {
            margin: 0;
            /* TODO use other border rules */
            border: 1px solid black;

            position: absolute;
            box-sizing: border-box;
            padding: 0;
        }
    }
}


.date-info {
    color: $gray;
    .day-number {
        padding: 2pt;
    }

    &.current .day-number {
        color: black;
    }
}


/* Weekly calendar
----------------------------------------
*/

.calendar {
    width: 100%;
    height: 100%;
    display: flex;
    flex-grow: 2;
}

.clock {
    color: $gray;
    border-top: 1px dotted $gray;
    width: 100%;
    pointer-events: none;
}

.sideclock {
    padding: 0;
    grid-row: 3;
    position: relative;
    .day {
        border: 1px transparent;
        min-width: 0;
    }
    .clock {
        border-top: 1px dotted $gray;
        grid-row: 3;
    }
}

.days {
    display: grid;
    grid-template-rows: 4em 4em auto;
    grid-template-columns: 5ch auto;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow-x: scroll;

    /* allow for popup placement */
    position: relative;

    .meta {
        border-bottom: 2px solid $gray;
        grid-row: 1;
    }

    .events {
        grid-row: 3;
    }

    .event {
        border: 1px solid black;
    }

    .longevents {
        grid-row: 2;
        grid-column-start: 2;
        position: relative;
    }
}

.events {
    position: relative;
    border: 1px solid $gray;

    .event {
        width: 100%;

        &.generated {
            width: calc(100% * var(--editmode));
        }

        &.continuing {
            border-bottom: none;
            background-image: linear-gradient(to top, #0007 0%,#FFF0 2em);
        }

        &.continued {
            border-top: none;
            background-image: linear-gradient(to bottom, #FFF7 0%,#FFF0 3em);
        }

        &.continued.continuing {
            border-top: none;
            border-bottom: none;
            background-image:
                linear-gradient(to bottom,
                                #FFF7  0%, #FFF0 10%,
                                #FFF0 90%, #0007 100%);
        }

    }

}

/*
 * This makes the borders of the object be part of the size.
 * Making placing it on the correct line much simpler.
 */
.clock, .days .event, .eventlike {
    position: absolute;
    box-sizing: border-box;
    margin: 0;
    display: block;
}

.clocktext {
    z-index: 1;
    text-align: right;
}

.meta {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

    padding-left: 1em;
    padding-right: 1em;
    .dayname {
        position: absolute;
        left: 5px;
        top: 2px;
        color: $gray;
    }

    .daydate {
        white-space: nowrap;
        font-size: 150%;
    }
}

.event {
    transition: 0.3s;
    font-size: var(--event-font-size);
    overflow: visible;
    background-color: var(--color);
    color: var(--complement);

    /* Event is not confirmed to happen */
    &.tentative {
        border: 3px dashed black;
    }

    /* Event duration is not "busy" time */
    &.transparent {
        background-image: linear-gradient(45deg,
                                          #EE617DFF 25%,
                                          #00000000 25%,
                                          #00000000 50%,
                                          #EE617DFF 50%,
                                          #EE617DFF 75%,
                                          #00000000 75%,
                                          #00000000 100%);
        background-size: 56px 56px;
    }

    &.generated {
        opacity: 40%;
        transition: none;
    }

    &.repeating {
        float: left;
        font-size: 150%;
    }

    .location {
        display: block;
        font-size: 80%;
        font-style: italic;
        white-space: pre;
    }
}

.event-body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.zero-width-events .event {
    width: initial;
    padding: 0.5em;
    margin: 0.2em;
    border-radius: 1ex;
    position: relative;
    float: left;
}


.repeating {
    color: red;
}

.eventtext {
    white-space: pre-line;
    font-size: 10pt;

    h3 {
        font-size: 12pt;
        border-bottom: 1px solid $gray;
        margin-bottom: 0;
        font-weight: 300;
        margin-top: 0;
    }

    .location {
        display: inline-block;
        vertical-align: text-top;
    }

    .last-modified, .rrule {
        display: flex;
        justify-content: right;
        text-align: right;
        font-size: 80%;
        color: $gray;
        padding-right: 1em;
    }
}

/* */

.longevents {
    .event {
        border-radius: 1em;
        padding-left: 1em;

        height: 90%;

        &.continuing {
            border-right: none;
            border-radius: 1em 0 0 1em;
        }

        &.continued {
            border-left: none;
            border-radius: 0 1em 1em 0;
        }

        &.continued.continuing {
            border-radius: 0;
        }

    }
}

/*
 * All other CAL_ classes are generated by the backend.
 * NOTE Possibly move this there.
 */
.CAL_Generated {
    background-color: #55FF55;
}

.clock-0  { top: calc(100%/24 *  0); }
.clock-2  { top: calc(100%/24 *  2); }
.clock-4  { top: calc(100%/24 *  4); }
.clock-6  { top: calc(100%/24 *  6); }
.clock-8  { top: calc(100%/24 *  8); border-width: 2px; }
.clock-10 { top: calc(100%/24 * 10); }
.clock-12 { top: calc(100%/24 * 12); }
.clock-14 { top: calc(100%/24 * 14); }
.clock-16 { top: calc(100%/24 * 16); border-width: 2px; }
.clock-18 { top: calc(100%/24 * 18); }
.clock-20 { top: calc(100%/24 * 20); }
.clock-22 { top: calc(100%/24 * 22); }
.clock-24 { top: calc(100%/24 * 24); }


/* Search page
----------------------------------------
 */

.paginator > * {
    padding-left: 1em;
    display: inline-block;
}

.summary-line {
    display: inline-flex;

    > * {
        display: inline-block;
    }

    time {
        font-family: monospace;
        min-width: 18ch;
    }
}

/* Popups
----------------------------------------
*/


.popup {
    display: flex;
    background-color: #dedede;
    color: black;
    font-size: 80%;

    /* overflow-y: auto; */
    max-width: 60ch;
    max-height: 60ch;
    min-width: 40ch;
    min-height: 20ch;

    &-container {
        display: none;
        position: absolute;
        z-index: 10;

        /* ??? */
        left: 10px;
        top: -50px;

        box-shadow: gray 10px 10px 10px;

        &.visible {
            display: block;
        }
    }

    input {
        white-space: initial;
        border: 1px solid gray;
        max-width: 100%;
    }

    .eventtext {
        /* makes the text in the popup scroll, but not the sidebar */
        overflow-y: auto;
        padding: 1em;
        word-break: break-word;
    }

    .location {
        font-style: initial;
    }

    .popup-control {
        display: flex;
        flex-direction: column;

        /* not needed, but the icons aren't text
       and should therefor not be copied */
        user-select: none;

        cursor: grab;
        background-color: var(--color);
        /* Transition for background color 
         * Matches that of '.event'.
         * TODO break out to common place */
        transition: 0.3s;

        .btn {
            max-width: 2em;
            max-height: 2em;
            margin: 1em;

            display: flex;
            align-items: center;
            justify-content: center;

            font-size: 150%;
        }

    }
}


#bar {
    width: calc(100% + 2em);
    height: 4px;
    background: blue;
    border-color: blue;
    left: -1em;
}

/* Tabs
----------------------------------------
*/

.tabgroup {
    position: relative;
    width: 100%;
    resize: both;
    --tab-size: 6ex;
}

.tab {
    label {
        position: absolute;

        left: 100%;
        top: 0;
        display: block;

        max-height: 5ex;
        min-height: 5ex;
        min-width: 5ex;
        max-width: 5ex;

        border: 1px solid #ccc;
        border-radius: 0 5px 5px 0;
        background-color: #aeaeae;

        display: flex;
        justify-content: center;
        align-items: center;
    }

    [type=radio] {
        display: none;
        &:checked ~ label {
            z-index: 1;
            /* to align all tab */
            border-left: 3px solid transparent;
            background-color: #dedede;

            ~ .content {
                z-index: 1;
            }
        }
    }

    .content {
        position: absolute;
        top: 0;
        left: 0;
        background-color: #dedede;
        right: 0;
        bottom: 0;
        overflow: auto;

        min-width: 100%;
        min-height: 100%;
    }
}

/* Other
----------------------------------------
*/

.template {
    display: none;
}


.summary-line .square {
    margin-right: 1em;
}

.square {
    width: 1em;
    height: 1em;
    background-color: var(--color);
}

/* Icalendar
----------------------------------------
*/

/* Below is for styling embedded xcalendar components in the xhtml
   document. I can't find anything about if this is allowed
   according to any standard, but it seems to work.
   Firefox doesn't want to admit it, and shows nothing in the
   inspector, but the document renders fine.
   Vivaldi works fine in the inspector.
 */

icalendar {
    display: inline-block;
    padding-left: 1ch;
    font-family: monospace;
    font-size: xx-small;
    padding-left: 1ch;

    properties > * {
        display: block;
    }

    properties * {
        padding-right: 1ch;
    }


    /* All icalendar properties  */
    calscale::before { content: "calscale: "; }
    method::before { content: "method: "; }
    prodid::before { content: "prodid: "; }
    version::before { content: "version: "; }
    attach::before { content: "attach: "; }
    categories::before { content: "categories: "; }
    class::before { content: "class: "; }
    comment::before { content: "comment: "; }
    description::before { content: "description: "; }
    geo::before { content: "geo: "; }
    location::before { content: "location: "; }
    percent-complete::before { content: "percent-complete: "; }
    priority::before { content: "priority: "; }
    resources::before { content: "resources: "; }
    status::before { content: "status: "; }
    summary::before { content: "summary: "; }
    completed::before { content: "completed: "; }
    dtend::before { content: "dtend: "; }
    due::before { content: "due: "; }
    dtstart::before { content: "dtstart: "; }
    duration::before { content: "duration: "; }
    freebusy::before { content: "freebusy: "; }
    transp::before { content: "transp: "; }
    tzid::before { content: "tzid: "; }
    tzname::before { content: "tzname: "; }
    tzoffsetfrom::before { content: "tzoffsetfrom: "; }
    tzoffsetto::before { content: "tzoffsetto: "; }
    tzurl::before { content: "tzurl: "; }
    attendee::before { content: "attendee: "; }
    contact::before { content: "contact: "; }
    organizer::before { content: "organizer: "; }
    recurrence-id::before { content: "recurrence-id: "; }
    related-to::before { content: "related-to: "; }
    url::before { content: "url: "; }
    uid::before { content: "uid: "; }
    exdate::before { content: "exdate: "; }
    rdate::before { content: "rdate: "; }
    rrule::before { content: "rrule: "; }
    action::before { content: "action: "; }
    repeat::before { content: "repeat: "; }
    trigger::before { content: "trigger: "; }
    created::before { content: "created: "; }
    dtstamp::before { content: "dtstamp: "; }
    last-modified::before { content: "last-modified: "; }
    sequence::before { content: "sequence: "; }
    request-status::before { content: "request-status: "; }

    parameters {
        color: gray;

        /* icalendar parameters */
        altrep::before { content: "altrep:"; }
        cn::before { content: "cn:"; }
        cutype::before { content: "cutype:"; }
        delegated-from::before { content: "delegated-from:"; }
        delegated-to::before { content: "delegated-to:"; }
        dir::before { content: "dir:"; }
        encoding::before { content: "encoding:"; }
        fmttype::before { content: "fmttype:"; }
        fbtype::before { content: "fbtype:"; }
        language::before { content: "language:"; }
        member::before { content: "member:"; }
        partstat::before { content: "partstat:"; }
        range::before { content: "range:"; }
        related::before { content: "related:"; }
        reltype::before { content: "reltype:"; }
        role::before { content: "role:"; }
        rsvp::before { content: "rsvp:"; }
        sent-by::before { content: "sent-by:"; }
        tzid::before { content: "tzid:"; }
    }

    /* special fields inside some properties */
    period {
        start { content: "start:"; }
        end { content: "end:"; }
        duration { content: "duration:" }
    }

    recur {
        freq  { content: "freq:"; }
        until { content: "until:"; }
        count { content: "count:"; }
        bymonth    { content: "bymonth"; }
        byweekno   { content: "byweekno"; }
        byyearday  { content: "byyearday"; }
        bymonthday { content: "bymonthday"; }
        byday      { content: "byday"; }
        byhour     { content: "byhour"; }
        byminute   { content: "byminute"; }
        bysecond   { content: "bysecond"; }
        bysetpos   { content: "bysetpos"; }
    }

    /* types */
    date-time, date, until {color: purple;}
    text { color: green; }
    integer { color: blue; }
    unknown { color: red; }
}

/* vim:expandtab:softtabstop=4:shiftwidth=4:
 */