Skip to content

Commit

Permalink
Make the icons in the background of the tiles in accessibility mode s…
Browse files Browse the repository at this point in the history
…maller

smaller icons, but more icons.

Refers to #185, follow up to #194
  • Loading branch information
L7R7 committed Dec 27, 2024
1 parent d707791 commit 4a7a526
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Ports/Inbound/HTTP/BuildStatuses/Html.hs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ resultToHtml'' Result {..} =
div_ [class_ "status-content"] $ do
p_ (toHtml name)
p_ [class_ "textual-status"] (buildStatusToString buildStatus)
section_ [class_ "icon-box", style_ "position: absolute; height: 100%; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 48px;"] $ do
section_ [class_ "icon-box", style_ "position: absolute; height: 100%; width: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: auto;"] $ do
if isBroken buildStatus
then replicateM_ 16 (toHtmlRaw ("<svg viewBox=\"0 0 48 48\"><polygon fill=\"#c41934\" points=\"36,0 0,37.4 2.8,40.2 38.8,2.7\"/><polygon fill=\"#c41934\" points=\"0,2.8 2.8,0 38.8,37.4 36,40.2\"/></svg>" :: String))
then replicateM_ 40 (toHtmlRaw ("<svg viewBox=\"0 0 38.8 40.2\"><polygon fill=\"#c41934\" points=\"36,0 0,37.4 2.8,40.2 38.8,2.7\"/><polygon fill=\"#c41934\" points=\"0,2.8 2.8,0 38.8,37.4 36,40.2\"/></svg>" :: String))
else pure ()
if isHealthy buildStatus
then replicateM_ 16 (toHtmlRaw ("<svg viewBox=\"0 0 48 48\"><polygon fill=\"#43A047\" points=\"36,0 12.4,23.6 2.8,14.0 0,16.9 12.4,29.1 38.8,2.7\"/></svg>" :: String))
then replicateM_ 40 (toHtmlRaw ("<svg viewBox=\"0 0 38.8 29.1\"><polygon fill=\"#43A047\" points=\"36,0 12.4,23.6 2.8,14.0 0,16.9 12.4,29.1 38.8,2.7\"/></svg>" :: String))
else pure ()

buildStatusToString :: (IsString a) => BuildStatus -> a
Expand Down

0 comments on commit 4a7a526

Please sign in to comment.