diff --git a/tools/odin-html-docs/odin_html_docs_main.odin b/tools/odin-html-docs/odin_html_docs_main.odin index 10d5ebe37..7f2e7b59f 100644 --- a/tools/odin-html-docs/odin_html_docs_main.odin +++ b/tools/odin-html-docs/odin_html_docs_main.odin @@ -209,6 +209,15 @@ main :: proc() { b := strings.make_builder() defer strings.destroy_builder(&b) w := strings.to_writer(&b) + + { + strings.reset_builder(&b) + write_html_header(w, "Packages - pkg.odin-lang.org") + write_home_page(w) + write_html_footer(w, true) + os.write_entire_file("index.html", b.buf[:]) + } + { strings.reset_builder(&b) write_html_header(w, "core library - pkg.odin-lang.org") @@ -228,6 +237,49 @@ main :: proc() { } } +write_home_page :: proc(w: io.Writer) { + fmt.wprintln(w, `
`) + defer fmt.wprintln(w, `
`) + + { + fmt.wprintln(w, ``) + fmt.wprintln(w, `
`) + defer fmt.wprintln(w, `
`) + + fmt.wprintln(w, ``) + + } + + + fmt.wprintln(w, `
`) + defer fmt.wprintln(w, `
`) + + fmt.wprintln(w, "
") + fmt.wprintln(w, "

Odin Packages

") + fmt.wprintln(w, "
") + fmt.wprintln(w, "
") + defer fmt.wprintln(w, "
") + + fmt.wprintln(w, `
`) + fmt.wprintln(w, `

Core Library Collection

`) + fmt.wprintln(w, `

Documentation for all the packages part of the core library collection.

`) + fmt.wprintln(w, `
`) + + fmt.wprintln(w, `
`) + fmt.wprintln(w, `

Vendor Library Collection

`) + fmt.wprintln(w, `

Documentation for all the packages part of the vendor library collection.

`) + fmt.wprintln(w, `

Coming Soon.

`) + fmt.wprintln(w, `
`) + + + +} + + Dir_Node :: struct { dir: string, @@ -297,7 +349,7 @@ write_core_directory :: proc(w: io.Writer) { defer fmt.wprintln(w, ``) { fmt.wprintln(w, `
`) - fmt.wprintln(w, "
") + fmt.wprintln(w, `
`) fmt.wprintln(w, "

Core Library Collection

") fmt.wprintln(w, "
    ") fmt.wprintf(w, "
  • License: BSD-3-Clause
  • \n", GITHUB_LICENSE_URL) @@ -305,7 +357,7 @@ write_core_directory :: proc(w: io.Writer) { fmt.wprintln(w, "
") fmt.wprintln(w, "
") fmt.wprintln(w, "
") - fmt.wprintln(w, "
") + fmt.wprintln(w, `
`) } fmt.wprintln(w, `
`) defer fmt.wprintln(w, `
`) diff --git a/tools/odin-html-docs/style.css b/tools/odin-html-docs/style.css index 86b43323d..cb06a8603 100644 --- a/tools/odin-html-docs/style.css +++ b/tools/odin-html-docs/style.css @@ -1,11 +1,24 @@ /* doc directories */ -table.`directory { +table.directory { /*border: 1px solid #ccc!important;*/ table-layout: fixed; border-collapse: collapse; } +header.collection-header ul { + margin-top: 1em; + margin-bottom: 0; + padding-left: 0.5em; + list-style-type: none; +} + +hr.collection-hr { + margin: 0; + padding: 0; +} + + .doc-directory tr { padding-left: 1em!important; border-top: 1px solid #ccc!important; @@ -124,4 +137,4 @@ details.odin-doc-toggle[open] > summary.hideme { details.code-example > summary { font-weight: 700; -} \ No newline at end of file +}