Skip to content
Snippets Groups Projects
Commit c4b4eb91 authored by stuebinm's avatar stuebinm
Browse files

server: add a howto link

parent 82082e8b
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ generation = 1 ...@@ -27,6 +27,7 @@ generation = 1
backlink_prefix = "world://lobby#start_" backlink_prefix = "world://lobby#start_"
contact_mail = "world@muc.hacc.space" contact_mail = "world@muc.hacc.space"
howto_link = "https://di.c3voc.de/howto:world"
# linter's config for this org # linter's config for this org
lintconfig = "./config.json" lintconfig = "./config.json"
......
...@@ -31,7 +31,7 @@ import Lucid.Html5 (a_, body_, button_, class_, code_, disabled_, ...@@ -31,7 +31,7 @@ import Lucid.Html5 (a_, body_, button_, class_, code_, disabled_,
onclick_, p_, rel_, script_, span_, src_, onclick_, p_, rel_, script_, span_, src_,
title_, type_, ul_) title_, type_, ul_)
import Server (JobStatus (..), import Server (JobStatus (..),
Org (Org, orgBacklinkPrefix, orgContactMail, orgSlug), Org (Org, orgBacklinkPrefix, orgContactMail, orgHowtoLink, orgSlug),
RemoteRef (RemoteRef, reponame, reporef, repourl), RemoteRef (RemoteRef, reponame, reporef, repourl),
prettySha, unState) prettySha, unState)
import Types (Hint (Hint), Level (..)) import Types (Hint (Hint), Level (..))
...@@ -61,7 +61,9 @@ instance ToHtml (Org True, RemoteRef, JobStatus, Maybe JobStatus) where ...@@ -61,7 +61,9 @@ instance ToHtml (Org True, RemoteRef, JobStatus, Maybe JobStatus) where
"Linter Result" "Linter Result"
if pending if pending
then button_ [class_ "btn btn-primary btn-disabled", disabled_ "true"] "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" a_ [class_ "btn btn-primary"
, href_ ("mailto:" <> orgContactMail <> "?subject=[Help-walint] " <> reponame <> " " <> rev)] , href_ ("mailto:" <> orgContactMail <> "?subject=[Help-walint] " <> reponame <> " " <> rev)]
"Help?" "Help?"
......
...@@ -101,6 +101,7 @@ data Org (loaded :: Bool) = Org ...@@ -101,6 +101,7 @@ data Org (loaded :: Bool) = Org
, orgWebdir :: Text , orgWebdir :: Text
, orgBacklinkPrefix :: Text , orgBacklinkPrefix :: Text
, orgContactMail :: Text , orgContactMail :: Text
, orgHowtoLink :: Maybe Text
} deriving (Generic) } deriving (Generic)
instance NFData (LintConfig Skeleton) => NFData (Org True) instance NFData (LintConfig Skeleton) => NFData (Org True)
...@@ -164,6 +165,7 @@ orgCodec = Org ...@@ -164,6 +165,7 @@ orgCodec = Org
<*> T.text "webdir" .= orgWebdir <*> T.text "webdir" .= orgWebdir
<*> T.text "backlink_prefix" .= orgBacklinkPrefix <*> T.text "backlink_prefix" .= orgBacklinkPrefix
<*> T.text "contact_mail" .= orgContactMail <*> T.text "contact_mail" .= orgContactMail
<*> coerce (T.first T.text "howto_link") .= orgHowtoLink
-- why exactly does everything in tomland need to be invertable -- why exactly does everything in tomland need to be invertable
urlBimap :: TomlBiMap BaseUrl String urlBimap :: TomlBiMap BaseUrl String
......
...@@ -16,7 +16,7 @@ body { ...@@ -16,7 +16,7 @@ body {
} }
.btn { .btn {
margin-left: 2em; margin-left: 1em;
font-family: Ubuntu; font-family: Ubuntu;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment