File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -502,27 +502,43 @@ projectTitle raw =
502
502
projectYear : Year -> Html msg
503
503
projectYear year =
504
504
let
505
- displayRange : Date -> Date -> String
505
+ displayRange : Date -> Date -> List ( Html msg )
506
506
displayRange start end =
507
507
if Date . year start == Date . year end then
508
- String . fromInt ( Date . year start)
508
+ [ Html . span
509
+ [ Html . Styled . Attributes . title ( Date . format " EEEE, MMMM d y" start ++ " - " ++ Date . format " EEEE, MMMM d y" end) ]
510
+ [ Html . text <| String . fromInt ( Date . year start) ]
511
+ ]
509
512
510
513
else
511
- String . fromInt ( Date . year start) ++ " - " ++ String . fromInt ( Date . year end)
514
+ [ Html . span
515
+ [ Html . Styled . Attributes . title <| Date . format " EEEE, MMMM d y" start ]
516
+ [ Html . text <| String . fromInt ( Date . year start) ]
517
+ , Html . text " - "
518
+ , Html . span
519
+ [ Html . Styled . Attributes . title <| Date . format " EEEE, MMMM d y" end ]
520
+ [ Html . text <| String . fromInt ( Date . year end) ]
521
+ ]
512
522
513
- dateString =
523
+ dateHtml =
514
524
case year of
515
525
Manual y ->
516
- String . fromInt y
526
+ [ Html . text ( String . fromInt y) ]
517
527
518
528
Range start end ->
519
529
displayRange start end
520
530
in
521
531
Html . p
522
532
[ css
523
533
[ fontSize ( em 0.75 ) ]
534
+ , case year of
535
+ Manual _ ->
536
+ Html . Styled . Attributes . attribute " data-datetype" " manual"
537
+
538
+ Range _ _ ->
539
+ Html . Styled . Attributes . attribute " data-datetype" " range"
524
540
]
525
- [ Html . text dateString ]
541
+ dateHtml
526
542
527
543
528
544
You can’t perform that action at this time.
0 commit comments