aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorNuno Alexandre <nuno@channable.com>2018-02-05 21:35:22 +0100
committerAlec Theriault <alec.theriault@gmail.com>2018-10-18 08:14:32 -0700
commit0cf790508a608ee9137a9b3e68e00a3157da760b (patch)
tree6d44a36db37298d7d77a5449187580ff3c12b2ea /haddock-api
parent3354c3cc34166dc263114694de314ed3ca99c664 (diff)
Add an initial-scale property to all haddock pages
This solves an issue reported about the content looking incredibly small on mobile devices.
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index e4a0137e..f589e4c9 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -32,7 +32,7 @@ import Haddock.Types
import Haddock.Version
import Haddock.Utils
import Haddock.Utils.Json
-import Text.XHtml hiding ( name, title, p, quote )
+import Text.XHtml hiding ( title, p, quote )
import Haddock.GhcUtils
import Control.Monad ( when, unless )
@@ -121,7 +121,8 @@ copyHtmlBits odir libdir themes withQuickjump = do
headHtml :: String -> Themes -> Maybe String -> Html
headHtml docTitle themes mathjax_url =
header << [
- meta ! [httpequiv "Content-Type", content "text/html; charset=UTF-8"],
+ meta ! [ httpequiv "Content-Type", content "text/html; charset=UTF-8"],
+ meta ! [ name "viewport", content "width=device-width, initial-scale=1"],
thetitle << docTitle,
styleSheet themes,
thelink ! [ rel "stylesheet", thetype "text/css", href quickJumpCssFile] << noHtml,