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
1 changed files with 1 additions and 1 deletions

View File

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