diff --git a/config.toml b/config.toml index d48953acc85a988a1d7e9197cb07d3ba11355920..652344841ea30d8ce4437419854e7520b7625e45 100644 --- a/config.toml +++ b/config.toml @@ -27,6 +27,7 @@ generation = 1 backlink_prefix = "world://lobby#start_" contact_mail = "world@muc.hacc.space" +howto_link = "https://di.c3voc.de/howto:world" # linter's config for this org lintconfig = "./config.json" diff --git a/server/HtmlOrphans.hs b/server/HtmlOrphans.hs index dad29543c6bc2c0188dbde7bc3dfe4de27eb1704..c6f74d58096787303b99666f3d47dabd7033bb44 100644 --- a/server/HtmlOrphans.hs +++ b/server/HtmlOrphans.hs @@ -31,7 +31,7 @@ import Lucid.Html5 (a_, body_, button_, class_, code_, disabled_, onclick_, p_, rel_, script_, span_, src_, title_, type_, ul_) import Server (JobStatus (..), - Org (Org, orgBacklinkPrefix, orgContactMail, orgSlug), + Org (Org, orgBacklinkPrefix, orgContactMail, orgHowtoLink, orgSlug), RemoteRef (RemoteRef, reponame, reporef, repourl), prettySha, unState) import Types (Hint (Hint), Level (..)) @@ -61,7 +61,9 @@ instance ToHtml (Org True, RemoteRef, JobStatus, Maybe JobStatus) where "Linter Result" if pending then button_ [class_ "btn btn-primary btn-disabled", disabled_ "true"] "pending …" - else button_ [onclick_ "relint()", class_ "btn btn-primary", id_ "relint_button"] "relint now" + else button_ [onclick_ "relint()", class_ "btn btn-primary", id_ "relint_button"] "Relint" + whenJust orgHowtoLink $ \link -> + a_ [class_ "btn btn-primary", href_ link] "Howto" a_ [class_ "btn btn-primary" , href_ ("mailto:" <> orgContactMail <> "?subject=[Help-walint] " <> reponame <> " " <> rev)] "Help?" diff --git a/server/Server.hs b/server/Server.hs index 48a717050d54c86005d67a760cb1a476d954312a..0c093140da448fef7ec3e7fbee4794ceb6830dd2 100644 --- a/server/Server.hs +++ b/server/Server.hs @@ -101,6 +101,7 @@ data Org (loaded :: Bool) = Org , orgWebdir :: Text , orgBacklinkPrefix :: Text , orgContactMail :: Text + , orgHowtoLink :: Maybe Text } deriving (Generic) instance NFData (LintConfig Skeleton) => NFData (Org True) @@ -164,6 +165,7 @@ orgCodec = Org <*> T.text "webdir" .= orgWebdir <*> T.text "backlink_prefix" .= orgBacklinkPrefix <*> T.text "contact_mail" .= orgContactMail + <*> coerce (T.first T.text "howto_link") .= orgHowtoLink -- why exactly does everything in tomland need to be invertable urlBimap :: TomlBiMap BaseUrl String diff --git a/static/style.css b/static/style.css index c2846ce717cf465749dbee7b2e6a7b846eee0f58..b2e6db2cf7368d69413fa5f2b266f3b12f876e19 100644 --- a/static/style.css +++ b/static/style.css @@ -16,7 +16,7 @@ body { } .btn { - margin-left: 2em; + margin-left: 1em; font-family: Ubuntu; }