Skip to content

Commit

Permalink
Fix the colour of code blocks in light mode (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchoutri authored Sep 10, 2022
1 parent 5c6a322 commit 24250a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
14 changes: 12 additions & 2 deletions assets/css/package-readme.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,25 @@
border-radius: 6px;
overflow: auto;
font-size: 90%;
background-color: #354561;
background-color: #dbdde3;
margin-bottom: 16px;
}

code {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
background-color: #354561;
background-color: #dbdde3;
border-radius: 6px;
}

.dark {
pre {
background-color: #354561;
}

code {
background-color: #354561;
}
}
}
3 changes: 2 additions & 1 deletion src/Flora/OddJobs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ checkIfIndexImportJobIsNotRunning = do
pure False

makeReadme :: ReadmePayload -> JobsRunner ()
makeReadme pay@MkReadmePayload{..} = localDomain ("for-package " <> display mpPackage) $ do
makeReadme pay@MkReadmePayload{..} = localDomain "fetch-readme" $ do
logInfo "Fetching README" pay
let payload = VersionedPackage mpPackage mpVersion
gewt <- Hackage.request $ Hackage.getPackageReadme payload
Expand Down Expand Up @@ -158,6 +158,7 @@ fetchNewIndex = localDomain "index-import" $ do
System.runProcess_ "cp ~/.cabal/packages/hackage.haskell.org/01-index.tar 01-index/"
System.runProcess_ "cd 01-index && tar -xf 01-index.tar"
System.runProcess_ "make import-from-hackage"
logInfo_ "New index processed"
pool <- getPool
liftIO $ void $ scheduleIndexImportJob pool

Expand Down
2 changes: 1 addition & 1 deletion src/Flora/ThirdParties/Hackage/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data PlainerText
deriving (Typeable)

instance Accept PlainerText where
contentTypes _ = "plain" // "text" :| ["plain" // "text" /: ("charset", "utf-8")]
contentTypes _ = "text" // "plain" /: ("charset", "utf-8") :| ["text" // "plain"]

instance MimeUnrender PlainerText Text where
mimeUnrender _ = Bifunctor.first show . Text.decodeUtf8' . ByteString.toStrict
Expand Down

0 comments on commit 24250a1

Please sign in to comment.