From 8021e94d02e243118aa59ac91b7b5765ddb9ce64 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 22 Dec 2025 07:51:55 +0000 Subject: [PATCH] docs: init docs site Change-Id: sqxrvvmzmmuykstzrwntsoyuvwwplrrn Signed-off-by: oppiliappan --- docs/highlight.theme | 93 ++++++++++++++++++++++++++++++++++ docs/styles.css | 101 +++++++++++++++++++++++++++++++++++++ docs/template.html | 117 +++++++++++++++++++++++++++++++++++++++++++ docs/toc.html | 4 ++ tailwind.config.js | 2 +- 5 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 docs/highlight.theme create mode 100644 docs/styles.css create mode 100644 docs/template.html create mode 100644 docs/toc.html diff --git a/docs/highlight.theme b/docs/highlight.theme new file mode 100644 index 00000000..d700e158 --- /dev/null +++ b/docs/highlight.theme @@ -0,0 +1,93 @@ +{ + "text-color": null, + "background-color": null, + "line-number-color": null, + "line-number-background-color": null, + "text-styles": { + "Annotation": { + "text-color": null, + "background-color": null, + "bold": false, + "italic": true, + "underline": false + }, + "ControlFlow": { + "text-color": null, + "background-color": null, + "bold": true, + "italic": false, + "underline": false + }, + "Error": { + "text-color": null, + "background-color": null, + "bold": true, + "italic": false, + "underline": false + }, + "Alert": { + "text-color": null, + "background-color": null, + "bold": true, + "italic": false, + "underline": false + }, + "Preprocessor": { + "text-color": null, + "background-color": null, + "bold": true, + "italic": false, + "underline": false + }, + "Information": { + "text-color": null, + "background-color": null, + "bold": false, + "italic": true, + "underline": false + }, + "Warning": { + "text-color": null, + "background-color": null, + "bold": false, + "italic": true, + "underline": false + }, + "Documentation": { + "text-color": null, + "background-color": null, + "bold": false, + "italic": true, + "underline": false + }, + "DataType": { + "text-color": "#8f4e8b", + "background-color": null, + "bold": false, + "italic": false, + "underline": false + }, + "Comment": { + "text-color": null, + "background-color": null, + "bold": false, + "italic": true, + "underline": false + }, + "CommentVar": { + "text-color": null, + "background-color": null, + "bold": false, + "italic": true, + "underline": false + }, + "Keyword": { + "text-color": null, + "background-color": null, + "bold": true, + "italic": false, + "underline": false + } + } +} + diff --git a/docs/styles.css b/docs/styles.css new file mode 100644 index 00000000..89cad789 --- /dev/null +++ b/docs/styles.css @@ -0,0 +1,101 @@ +svg { + width: 16px; + height: 16px; +} + +:root { + --syntax-alert: #d20f39; + --syntax-annotation: #fe640b; + --syntax-attribute: #df8e1d; + --syntax-basen: #40a02b; + --syntax-builtin: #1e66f5; + --syntax-controlflow: #8839ef; + --syntax-char: #04a5e5; + --syntax-constant: #fe640b; + --syntax-comment: #9ca0b0; + --syntax-commentvar: #7c7f93; + --syntax-documentation: #9ca0b0; + --syntax-datatype: #df8e1d; + --syntax-decval: #40a02b; + --syntax-error: #d20f39; + --syntax-extension: #4c4f69; + --syntax-float: #40a02b; + --syntax-function: #1e66f5; + --syntax-import: #40a02b; + --syntax-information: #04a5e5; + --syntax-keyword: #8839ef; + --syntax-operator: #179299; + --syntax-other: #8839ef; + --syntax-preprocessor: #ea76cb; + --syntax-specialchar: #04a5e5; + --syntax-specialstring: #ea76cb; + --syntax-string: #40a02b; + --syntax-variable: #8839ef; + --syntax-verbatimstring: #40a02b; + --syntax-warning: #df8e1d; +} + +@media (prefers-color-scheme: dark) { + :root { + --syntax-alert: #f38ba8; + --syntax-annotation: #fab387; + --syntax-attribute: #f9e2af; + --syntax-basen: #a6e3a1; + --syntax-builtin: #89b4fa; + --syntax-controlflow: #cba6f7; + --syntax-char: #89dceb; + --syntax-constant: #fab387; + --syntax-comment: #6c7086; + --syntax-commentvar: #585b70; + --syntax-documentation: #6c7086; + --syntax-datatype: #f9e2af; + --syntax-decval: #a6e3a1; + --syntax-error: #f38ba8; + --syntax-extension: #cdd6f4; + --syntax-float: #a6e3a1; + --syntax-function: #89b4fa; + --syntax-import: #a6e3a1; + --syntax-information: #89dceb; + --syntax-keyword: #cba6f7; + --syntax-operator: #94e2d5; + --syntax-other: #cba6f7; + --syntax-preprocessor: #f5c2e7; + --syntax-specialchar: #89dceb; + --syntax-specialstring: #f5c2e7; + --syntax-string: #a6e3a1; + --syntax-variable: #cba6f7; + --syntax-verbatimstring: #a6e3a1; + --syntax-warning: #f9e2af; + } +} + +/* pandoc syntax highlighting classes */ +code span.al { color: var(--syntax-alert); font-weight: bold; } /* alert */ +code span.an { color: var(--syntax-annotation); font-weight: bold; font-style: italic; } /* annotation */ +code span.at { color: var(--syntax-attribute); } /* attribute */ +code span.bn { color: var(--syntax-basen); } /* basen */ +code span.bu { color: var(--syntax-builtin); } /* builtin */ +code span.cf { color: var(--syntax-controlflow); font-weight: bold; } /* controlflow */ +code span.ch { color: var(--syntax-char); } /* char */ +code span.cn { color: var(--syntax-constant); } /* constant */ +code span.co { color: var(--syntax-comment); font-style: italic; } /* comment */ +code span.cv { color: var(--syntax-commentvar); font-weight: bold; font-style: italic; } /* commentvar */ +code span.do { color: var(--syntax-documentation); font-style: italic; } /* documentation */ +code span.dt { color: var(--syntax-datatype); } /* datatype */ +code span.dv { color: var(--syntax-decval); } /* decval */ +code span.er { color: var(--syntax-error); font-weight: bold; } /* error */ +code span.ex { color: var(--syntax-extension); } /* extension */ +code span.fl { color: var(--syntax-float); } /* float */ +code span.fu { color: var(--syntax-function); } /* function */ +code span.im { color: var(--syntax-import); font-weight: bold; } /* import */ +code span.in { color: var(--syntax-information); font-weight: bold; font-style: italic; } /* information */ +code span.kw { color: var(--syntax-keyword); font-weight: bold; } /* keyword */ +code span.op { color: var(--syntax-operator); } /* operator */ +code span.ot { color: var(--syntax-other); } /* other */ +code span.pp { color: var(--syntax-preprocessor); } /* preprocessor */ +code span.sc { color: var(--syntax-specialchar); } /* specialchar */ +code span.ss { color: var(--syntax-specialstring); } /* specialstring */ +code span.st { color: var(--syntax-string); } /* string */ +code span.va { color: var(--syntax-variable); } /* variable */ +code span.vs { color: var(--syntax-verbatimstring); } /* verbatimstring */ +code span.wa { color: var(--syntax-warning); font-weight: bold; font-style: italic; } /* warning */ diff --git a/docs/template.html b/docs/template.html new file mode 100644 index 00000000..9fbae026 --- /dev/null +++ b/docs/template.html @@ -0,0 +1,117 @@ + + + + + + + $for(author-meta)$ + + $endfor$ + + $if(date-meta)$ + + $endif$ + + $if(keywords)$ + + $endif$ + + $if(description-meta)$ + + $endif$ + + $pagetitle$ - Tangled docs + + + + $for(css)$ + + $endfor$ + + $for(header-includes)$ + $header-includes$ + $endfor$ + + + + + + $for(include-before)$ + $include-before$ + $endfor$ + $if(toc)$ + +
+ + $if(toc-title)$$toc-title$$else$Table of Contents$endif$ + ${ menu.svg() } + + + ${ table-of-contents:toc.html() } +
+ + + + $endif$ + +
+
+ $if(top)$ + $-- only print title block if this is NOT the top page + $else$ + $if(title)$ +
+

$title$

+ $if(subtitle)$ +

$subtitle$

+ $endif$ + $for(author)$ +

$author$

+ $endfor$ + $if(date)$ +

$date$

+ $endif$ + $if(abstract)$ +
+
$abstract-title$
+
$abstract$
+
+ $endif$ + $endif$ +
+ $endif$ +
+ $body$ +
+
+ +
+ $for(include-after)$ + $include-after$ + $endfor$ + + diff --git a/docs/toc.html b/docs/toc.html new file mode 100644 index 00000000..86edc981 --- /dev/null +++ b/docs/toc.html @@ -0,0 +1,4 @@ +
+ $table-of-contents$ +
+ diff --git a/tailwind.config.js b/tailwind.config.js index efb76fa1..8f01bcc5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,7 @@ const colors = require("tailwindcss/colors"); module.exports = { - content: ["./appview/pages/templates/**/*.html", "./appview/pages/chroma.go"], + content: ["./appview/pages/templates/**/*.html", "./appview/pages/chroma.go", "./docs/*.html"], darkMode: "media", theme: { container: { -- 2.43.0