From 477ea9f4614a9c3d41b9d2d9ad926878f39720fe Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 19 Mar 2021 16:03:42 -0400 Subject: Add label for private repos --- Biz/Devalloc.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Biz/Devalloc.hs') diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs index 9d0b2ce..28bf50e 100644 --- a/Biz/Devalloc.hs +++ b/Biz/Devalloc.hs @@ -916,6 +916,16 @@ baseStyle = do Biz.Look.marginAll (px 0) Biz.Look.paddingAll (px 0) + ".badge" ? do + Clay.borderWidth (px 1) + Clay.borderColor Clay.grey + Clay.borderStyle Clay.solid + Biz.Look.borderRadiusAll (rem 2) + Clay.fontSize (rem 0.8) + Biz.Look.marginAll (rem 1) + Biz.Look.paddingX (rem 0.5) + Biz.Look.paddingY (rem 0.25) + "label" ? do Clay.display Clay.inlineBlock Clay.width (px 100) @@ -1214,7 +1224,9 @@ instance Lucid.ToHtml SelectRepo where Lucid.value_ <| GitHub.untagName <| GitHub.repoName repo ] + when (GitHub.repoPrivate repo) <| privateBadge maybe mempty (Lucid.p_ <. Lucid.toHtml) (GitHub.repoDescription repo) + privateBadge = Lucid.span_ [Lucid.class_ "badge"] "Private" -- * parts -- cgit v1.2.3