2
2
<#import "includes/header.ftl" as header >
3
3
<#import "includes/footer.ftl" as footer >
4
4
<!DOCTYPE html>
5
- <html class =" no-js" >
6
- <head >
7
- <meta name =" viewport" content =" width=device-width, initial-scale=1" charset =" UTF-8" >
5
+ <html class =" no-js" lang =" en" >
6
+ <head >
8
7
<@page_metadata.display/ >
9
- <@template_cmd name="pathToRoot" ><script >var pathToRoot = " ${pathToRoot}" ; </script ></@template_cmd >
10
- <script >document .documentElement .classList .replace (" no-js" ," js" ); </script >
11
- <#-- This script doesn't need to be there but it is nice to have
12
- since app in dark mode doesn't 'blink' (class is added before it is rendered) -->
13
- <script >const storage = localStorage .getItem (" dokka-dark-mode" )
14
- if (storage == null ) {
8
+ <@template_cmd name="pathToRoot" >
9
+ <script >
10
+ var pathToRoot = " ${pathToRoot}" ;
11
+ </script >
12
+ </@template_cmd >
13
+ <script >
14
+ document .documentElement .classList .replace (" no-js" ," js" );
15
+
16
+ const storage = localStorage .getItem (" dokka-dark-mode" )
17
+ if (storage == null ) {
15
18
const osDarkSchemePreferred = window .matchMedia && window .matchMedia (' (prefers-color-scheme: dark)' ).matches
16
19
if (osDarkSchemePreferred === true ) {
17
- document .getElementsByTagName (" html" )[0 ].classList .add (" theme-dark" )
20
+ document .getElementsByTagName (" html" )[0 ].classList .add (" theme-dark" )
18
21
}
19
- } else {
22
+ } else {
20
23
const savedDarkMode = JSON .parse (storage)
21
- if (savedDarkMode === true ) {
22
- document .getElementsByTagName (" html" )[0 ].classList .add (" theme-dark" )
24
+ if (savedDarkMode === true ) {
25
+ document .getElementsByTagName (" html" )[0 ].classList .add (" theme-dark" )
23
26
}
24
- }
27
+ }
25
28
</script >
26
- <#-- Resources (scripts, stylesheets) are handled by Dokka.
27
- Use customStyleSheets and customAssets to change them. -->
29
+ <#-- Resources (scripts, stylesheets) are handled by Dokka. Use customStyleSheets and customAssets to change them. -->
28
30
<@resources/ >
29
- </head >
30
- <body >
31
+ </head >
32
+ <body >
31
33
<div class =" root" >
32
- <@header.display/ >
33
- <div id =" container" >
34
- <div class =" sidebar" id =" leftColumn" >
35
- <div class =" sidebar--inner" id =" sideMenu" ></div >
36
- </div >
37
- <div id =" main" >
38
- <@content/ >
39
- <@footer.display/ >
40
- </div >
34
+ <@header.display/ >
35
+ <div id =" container" >
36
+ <div class =" sidebar" id =" leftColumn" >
37
+ <div class =" sidebar--inner" id =" sideMenu" ></div >
38
+ </div >
39
+ <div id =" main" >
40
+ <@content/ >
41
+ <@footer.display/ >
41
42
</div >
43
+ </div >
42
44
</div >
43
- </body >
44
- </html >
45
+ </body >
46
+ </html >
0 commit comments