\ No newline at end of file
diff --git a/tools/odin-html-docs/odin_html_docs_main.odin b/tools/odin-html-docs/odin_html_docs_main.odin
index 317d95a5a..a6b5f428e 100644
--- a/tools/odin-html-docs/odin_html_docs_main.odin
+++ b/tools/odin-html-docs/odin_html_docs_main.odin
@@ -88,71 +88,62 @@ recursive_make_directory :: proc(path: string, prefix := "") {
write_html_header :: proc(w: io.Writer, title: string) {
- fmt.wprintf(w, `
-
-
-
-
- %s
-
-
-
-
-
-
-`, title)
- fmt.wprintln(w, "\n`)
+ defer fmt.wprintln(w, ` `)
- fmt.wprintln(w, "")
+ fmt.wprintln(w, "")
+ fmt.wprintln(w, " ")
+ fmt.wprintln(w, " ")
- fmt.wprintln(w, "\t")
+ fmt.wprintln(w, "
")
- fmt.wprintln(w, "\nCore Directory")
-
+ fmt.wprintf(w, string(#load("header.txt.html")), title)
}
-write_html_footer :: proc(w: io.Writer) {
- io.write_string(w, `
-
-`)
- fmt.wprintf(w, "
\n\n")
+ }
+ doc.addEventListener('click', toggle, false);
+}(this, this.document));
+`)
+ }
+
+ fmt.wprintf(w, "\n\n")
}
main :: proc() {
@@ -220,7 +211,7 @@ main :: proc() {
strings.reset_builder(&b)
write_html_header(w, "core library - pkg.odin-lang.org")
write_core_directory(w)
- write_html_footer(w)
+ write_html_footer(w, true)
os.make_directory("core", 0)
os.write_entire_file("core/index.html", b.buf[:])
}
@@ -229,7 +220,7 @@ main :: proc() {
strings.reset_builder(&b)
write_html_header(w, fmt.tprintf("package %s - pkg.odin-lang.org", path))
write_pkg(w, path, pkg)
- write_html_footer(w)
+ write_html_footer(w, false)
recursive_make_directory(path, "core")
os.write_entire_file(fmt.tprintf("core/%s/index.html", path), b.buf[:])
}
@@ -297,10 +288,19 @@ write_core_directory :: proc(w: io.Writer) {
}
}
+ fmt.wprintln(w, ``)
+ defer fmt.wprintln(w, `
`)
+ fmt.wprintln(w, `