@@ -156,27 +156,24 @@ view config isPaused isOpen numMsgs state =
156156
157157 else if isPaused then
158158 div
159- [ style " width" " 100%"
160- , style " height" " 100%"
159+ [ id " elm-debugger-overlay"
160+ , style " position" " fixed"
161+ , style " top" " 0"
162+ , style " left" " 0"
163+ , style " width" " 100vw"
164+ , style " height" " 100vh"
161165 , style " cursor" " pointer"
162- , style " text-align" " center"
166+ , style " display" " flex"
167+ , style " align-items" " center"
168+ , style " justify-content" " center"
163169 , style " pointer-events" " auto"
164170 , style " background-color" " rgba(200, 200, 200, 0.7)"
165171 , style " color" " white"
166172 , style " font-family" " 'Trebuchet MS', 'Lucida Grande', 'Bitstream Vera Sans', 'Helvetica Neue', sans-serif"
167173 , style " z-index" " 2147483646"
168174 , onClick config. resume
169175 ]
170- [ div
171- [ style " position" " absolute"
172- , style " top" " calc(50% - 40px)"
173- , style " font-size" " 80px"
174- , style " line-height" " 80px"
175- , style " height" " 80px"
176- , style " width" " 100%"
177- ]
178- [ text " Click to Resume"
179- ]
176+ [ span [ style " font-size" " 80px" ] [ text " Click to Resume" ]
180177 , viewMiniControls config numMsgs
181178 ]
182179
@@ -213,8 +210,8 @@ viewMessage config title details buttons =
213210 , style " position" " fixed"
214211 , style " top" " 0"
215212 , style " left" " 0"
216- , style " width" " 100% "
217- , style " height" " 100% "
213+ , style " width" " 100vw "
214+ , style " height" " 100vh "
218215 , style " color" " white"
219216 , style " pointer-events" " none"
220217 , style " font-family" " 'Trebuchet MS', 'Lucida Grande', 'Bitstream Vera Sans', 'Helvetica Neue', sans-serif"
@@ -223,7 +220,7 @@ viewMessage config title details buttons =
223220 [ div
224221 [ style " position" " absolute"
225222 , style " width" " 600px"
226- , style " height" " 100% "
223+ , style " height" " 100vh "
227224 , style " padding-left" " calc(50% - 300px)"
228225 , style " padding-right" " calc(50% - 300px)"
229226 , style " background-color" " rgba(200, 200, 200, 0.7)"
@@ -242,7 +239,7 @@ viewMessage config title details buttons =
242239 [ id " elm-debugger-details"
243240 , style " padding" " 8px 20px"
244241 , style " overflow-y" " auto"
245- , style " max-height" " calc(100% - 156px)"
242+ , style " max-height" " calc(100vh - 156px)"
246243 , style " background-color" " rgb(61, 61, 61)"
247244 ]
248245 details
@@ -388,8 +385,7 @@ so great in the long run. You are better off using simpler data, like
388385"""
389386
390387
391- goodNews2 =
392- """
388+ goodNews2 = """
393389function can pattern match on that data and call whatever functions, JSON
394390decoders, etc. you need. This makes the code much more explicit and easy to
395391follow for other readers (or you in a few months!)
@@ -398,93 +394,74 @@ follow for other readers (or you in a few months!)
398394
399395viewProblemType : Metadata .ProblemType -> Html msg
400396viewProblemType { name, problems } =
401- li []
402- [ viewCode name
403- , text ( " can contain " ++ addCommas ( List . map problemToString problems) ++ " ." )
404- ]
397+ li []
398+ [ viewCode name
399+ , text ( " can contain " ++ addCommas ( List . map problemToString problems) ++ " ." )
400+ ]
405401
406402
407403problemToString : Metadata .Problem -> String
408404problemToString problem =
409- case problem of
410- Metadata . Function ->
411- " functions"
412-
413- Metadata . Decoder ->
414- " JSON decoders"
415-
416- Metadata . Task ->
417- " tasks"
418-
419- Metadata . Process ->
420- " processes"
421-
422- Metadata . Socket ->
423- " web sockets"
424-
425- Metadata . Request ->
426- " HTTP requests"
427-
428- Metadata . Program ->
429- " programs"
430-
431- Metadata . VirtualDom ->
432- " virtual DOM values"
405+ case problem of
406+ Metadata . Function -> " functions"
407+ Metadata . Decoder -> " JSON decoders"
408+ Metadata . Task -> " tasks"
409+ Metadata . Process -> " processes"
410+ Metadata . Socket -> " web sockets"
411+ Metadata . Request -> " HTTP requests"
412+ Metadata . Program -> " programs"
413+ Metadata . VirtualDom -> " virtual DOM values"
433414
434415
435416addCommas : List String -> String
436417addCommas items =
437- case items of
438- [] ->
439- " "
418+ case items of
419+ [] ->
420+ " "
440421
441- [ item ] ->
442- item
422+ [ item] ->
423+ item
443424
444- [ item1, item2 ] ->
445- item1 ++ " and " ++ item2
425+ [ item1, item2] ->
426+ item1 ++ " and " ++ item2
446427
447- lastItem :: otherItems ->
448- String . join " , " ( otherItems ++ [ " and " ++ lastItem ] )
428+ lastItem :: otherItems ->
429+ String . join " , " ( otherItems ++ [ " and " ++ lastItem ] )
449430
450431
451432
452433-- VIEW MESSAGE BUTTONS
453434
454435
455436type Buttons
456- = Accept String
457- | Choose String String
437+ = Accept String
438+ | Choose String String
458439
459440
460441viewButtons : Buttons -> Html Msg
461442viewButtons buttons =
462- let
463- btn msg string =
464- Html . button
465- [ style " margin-right" " 20px"
466- , onClick msg
467- ]
468- [ text string ]
469-
470- buttonNodes =
471- case buttons of
472- Accept proceed ->
473- [ btn Proceed proceed
474- ]
475-
476- Choose cancel proceed ->
477- [ btn Cancel cancel
478- , btn Proceed proceed
479- ]
480- in
481- div
482- [ style " height" " 60px"
483- , style " line-height" " 60px"
484- , style " text-align" " right"
485- , style " background-color" " rgb(50, 50, 50)"
486- ]
487- buttonNodes
443+ let
444+ btn msg string =
445+ Html . button [ style " margin-right" " 20px" , onClick msg ] [ text string ]
446+
447+ buttonNodes =
448+ case buttons of
449+ Accept proceed ->
450+ [ btn Proceed proceed
451+ ]
452+
453+ Choose cancel proceed ->
454+ [ btn Cancel cancel
455+ , btn Proceed proceed
456+ ]
457+ in
458+ div
459+ [ style " height" " 60px"
460+ , style " line-height" " 60px"
461+ , style " text-align" " right"
462+ , style " background-color" " rgb(50, 50, 50)"
463+ ]
464+ buttonNodes
488465
489466
490467
0 commit comments