aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorNunoAlexandre <alexandre.nunomiguel@gmail.com>2017-12-26 17:53:44 +0100
committerAlec Theriault <alec.theriault@gmail.com>2018-10-18 08:14:32 -0700
commit3d52abbce02de506f6ca01a7b23bd5e2f7c9cc59 (patch)
treeb2a502ad6a5365298fd22a32ec861678f55aaea0 /haddock-api
parentcb6d84cb906eca820abb986899fb6c7ff0f7d69d (diff)
Include custom font in the html head
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 6da6a2e8..41c11361 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -124,14 +124,15 @@ headHtml docTitle themes mathjax_url =
meta ! [httpequiv "Content-Type", content "text/html; charset=UTF-8"],
thetitle << docTitle,
styleSheet themes,
+ thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml,
thelink ! [ rel "stylesheet", thetype "text/css", href quickJumpCssFile] << noHtml,
script ! [src haddockJsFile, emptyAttr "async", thetype "text/javascript"] << noHtml,
script ! [src mjUrl, thetype "text/javascript"] << noHtml
]
where
+ fontUrl = "https://fonts.googleapis.com/css?family=Merriweather+Sans:300,300i,400,700"
mjUrl = maybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" id mathjax_url
-
srcButton :: SourceURLs -> Maybe Interface -> Maybe Html
srcButton (Just src_base_url, _, _, _) Nothing =
Just (anchor ! [href src_base_url] << "Source")