Use light theme when javascript is disabled

mdBook is setting theme (by adding a class attribute to body tag) with javascript.
Page is not using any theme by default and page is not using any styling unless
javascript is enabled.

This patch is adding class attribute to body tag and making mdBook to use `light`
theme when javascript is disabled.

Fixes: #144
This commit is contained in:
Onur Aslan 2016-06-15 17:25:28 +03:00
parent ab29e92071
commit b9e22bb8f2

View file

@ -31,7 +31,7 @@
}
</script>
</head>
<body>
<body class="light">
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme = localStorage.getItem('theme');