diff --git a/Asset sources/Showcase.afdesign b/Asset sources/Showcase.afdesign new file mode 100755 index 0000000..c1233aa Binary files /dev/null and b/Asset sources/Showcase.afdesign differ diff --git a/assets/css/prism.css b/assets/css/prism.css new file mode 100755 index 0000000..a89f76a --- /dev/null +++ b/assets/css/prism.css @@ -0,0 +1,3 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */ +code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green} diff --git a/assets/css/simpledoc.css b/assets/css/simpledoc.css new file mode 100755 index 0000000..bf39671 --- /dev/null +++ b/assets/css/simpledoc.css @@ -0,0 +1,244 @@ +/* Light Theme (Default) */ +:root { + --bg-primary: #ffffff; + --bg-secondary: #f5f5f5; + --text-primary: #212121; + --text-secondary: #757575; + --text-white: #ffffff; + --card-bg: #424242; + --card-border: #ffffff; + --inline-code-bg: #444444; + --inline-code-text: #EFEFEF; + --nav-gradient-start: #9c27b0; + --nav-gradient-end: #ff5722; +} + +/* Dark Theme */ +[theme="dark"] { + --bg-primary: #121212; + --bg-secondary: #1e1e1e; + --text-primary: #e0e0e0; + --text-secondary: #b0b0b0; + --text-white: #ffffff; + --card-bg: #2d2d2d; + --card-border: #444444; + --inline-code-bg: #2d2d2d; + --inline-code-text: #e0e0e0; + --nav-gradient-start: #7b1fa2; + --nav-gradient-end: #d84315; +} + +body { + background-color: var(--bg-primary); + color: var(--text-primary); + display: flex; + min-height: 100vh; + flex-direction: column; + transition: background-color 0.3s ease, color 0.3s ease; +} + +main { + flex: 1 0 auto; +} + +/* Cards */ +[theme="dark"] .card { + background-color: var(--card-bg); + color: var(--text-primary); +} + +[theme="dark"] .card .card-content { + color: var(--text-primary); +} + +[theme="dark"] .card .card-action { + border-top: 1px solid var(--card-border); +} + +/* Tables */ +[theme="dark"] table { + color: var(--text-primary); +} + +[theme="dark"] table.striped tbody tr:nth-child(odd) { + background-color: var(--bg-secondary); +} + +/* Code blocks */ +[theme="dark"] .inline-code { + background-color: var(--inline-code-bg); + color: var(--inline-code-text); +} + +/* Links */ +[theme="dark"] a { + color: #64b5f6; +} + +[theme="dark"] a:hover { + color: #90caf9; +} + +/* Keep navbar links white in dark mode */ +[theme="dark"] nav a, +[theme="dark"] nav .brand-logo, +[theme="dark"] nav ul li a { + color: #ffffff; +} + +[theme="dark"] nav a:hover, +[theme="dark"] nav ul li a:hover { + color: #ffffff; +} + +/* Table of contents */ +[theme="dark"] .table-of-contents a { + color: var(--text-secondary); + border-left: 2px solid #444444; +} + +[theme="dark"] .table-of-contents a:hover { + color: var(--text-primary); + border-left-color: #64b5f6; +} + +[theme="dark"] .table-of-contents a.active { + color: #64b5f6; + border-left-color: #64b5f6; +} + +/* Force navbar to always be 64px high, even on small screens */ +nav { + line-height: 64px !important; + height: 64px !important; +} + +nav .nav-wrapper { + height: 64px !important; +} + +nav .brand-logo { + line-height: 64px !important; + height: 64px !important; +} + +nav ul a { + line-height: 64px !important; + height: 64px !important; +} + +.navbar-fixed { + height: 64px !important; +} + +/* Override Materialize's small screen media query */ +@media only screen and (max-width: 600px) { + nav { + line-height: 64px !important; + height: 64px !important; + } + + nav .nav-wrapper { + height: 64px !important; + } + + nav .brand-logo { + line-height: 64px !important; + height: 64px !important; + } + + nav ul a { + line-height: 64px !important; + height: 64px !important; + } + + .navbar-fixed { + height: 64px !important; + } +} + +/* Style the theme toggle button */ +.theme-toggle-btn { + display: flex !important; + align-items: center; + justify-content: center; + height: 64px; + padding: 0 15px; + cursor: pointer; + transition: background-color 0.2s ease; +} + +.theme-toggle-btn:hover { + background-color: rgba(255, 255, 255, 0.1); +} + +.theme-toggle-btn i { + font-size: 24px; + color: #ffffff; + line-height: 64px; +} + +/* Style the mobile hamburger menu button */ +.dropdown-trigger { + display: flex !important; + align-items: center; + justify-content: center; + height: 64px; + padding: 0 15px; + cursor: pointer; + transition: background-color 0.2s ease; +} + +.dropdown-trigger:hover { + background-color: rgba(255, 255, 255, 0.1); +} + +.dropdown-trigger i { + font-size: 24px; + color: #ffffff; + line-height: 64px; +} + +.navfeature { + background: linear-gradient(45deg, var(--nav-gradient-start), var(--nav-gradient-end)); +} + +.calltoaction { + margin-top: 20px; +} + +.page-footer { + padding-top: 0px; + margin-top: 3rem; +} + +.card .card-action { + border-top: 1px solid var(--card-border); +} + +.footer-link { + margin-bottom: 4px; +} + +.section-title { + margin: 1rem; +} + +.header-offset { + margin-top: 40px; +} + +.inline-code { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + padding-right: 3px; + background-color: var(--inline-code-bg); + color: var(--inline-code-text); + border-radius: 5px; +} + +.doc-li { + list-style-type: none; + margin-bottom: 4px; +} diff --git a/assets/images/1.png b/assets/images/1.png new file mode 100755 index 0000000..c97bef6 Binary files /dev/null and b/assets/images/1.png differ diff --git a/assets/images/2.png b/assets/images/2.png new file mode 100755 index 0000000..46abc90 Binary files /dev/null and b/assets/images/2.png differ diff --git a/assets/images/3.png b/assets/images/3.png new file mode 100755 index 0000000..13d17fe Binary files /dev/null and b/assets/images/3.png differ diff --git a/assets/images/4.png b/assets/images/4.png new file mode 100755 index 0000000..e5d4bcd Binary files /dev/null and b/assets/images/4.png differ diff --git a/assets/images/License.png b/assets/images/License.png new file mode 100755 index 0000000..6a3d518 Binary files /dev/null and b/assets/images/License.png differ diff --git a/assets/images/community.png b/assets/images/community.png new file mode 100755 index 0000000..bd51cdf Binary files /dev/null and b/assets/images/community.png differ diff --git a/assets/images/lastlife.png b/assets/images/lastlife.png new file mode 100755 index 0000000..ad94c84 Binary files /dev/null and b/assets/images/lastlife.png differ diff --git a/assets/images/showcase/materialize-sb.png b/assets/images/showcase/materialize-sb.png new file mode 100755 index 0000000..15f6197 Binary files /dev/null and b/assets/images/showcase/materialize-sb.png differ diff --git a/assets/js/config.js b/assets/js/config.js new file mode 100755 index 0000000..9f0914b --- /dev/null +++ b/assets/js/config.js @@ -0,0 +1,28 @@ +/** + * SimpleDoc Configuration + * + * Set the BASE_PATH to match where your documentation is hosted: + * - Root of domain: BASE_PATH = '' + * - In subdirectory: BASE_PATH = '/subdirectory' + * + * Examples: + * - https://example.com/ → BASE_PATH = '' + * - https://example.com/docs/ → BASE_PATH = '/docs' + * - https://lastlife.net/doc/ → BASE_PATH = '/doc' + */ + +const SIMPLEDOC_CONFIG = { + // Set this to your subdirectory path (no trailing slash) + // Leave empty ('') if at domain root + BASE_PATH: 'testSDD', + + // Site name (used in header) + SITE_NAME: 'SimpleDoc', + + // Optional: Add more config here as needed +}; + +// Helper function to get full path +function getPath(relativePath) { + return SIMPLEDOC_CONFIG.BASE_PATH + relativePath; +} diff --git a/assets/js/prism.js b/assets/js/prism.js new file mode 100755 index 0000000..9b0cb8d --- /dev/null +++ b/assets/js/prism.js @@ -0,0 +1,7 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; diff --git a/assets/js/simpledoc.js b/assets/js/simpledoc.js new file mode 100755 index 0000000..cd8353c --- /dev/null +++ b/assets/js/simpledoc.js @@ -0,0 +1,146 @@ +function includeHTML() +{ + var z, i, elmnt, file, xhttp; + z = document.getElementsByTagName("*"); + for (i = 0; i < z.length; i++) + { + elmnt = z[i]; + file = elmnt.getAttribute("include-html"); + if (file) + { + xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() + { + if (this.readyState == 4) + { + if (this.status == 200) {elmnt.innerHTML = this.responseText;} + if (this.status == 404) {elmnt.innerHTML = "Page not found.";} + elmnt.removeAttribute("include-html"); + includeHTML(); + } + } + xhttp.open("GET", file, true); + xhttp.send(); + return; + } + } + + // Process navigation links with BASE_PATH + processNavigationLinks(); + + // Initialize dark mode after content is loaded + initDarkMode(); + + M.AutoInit(); +} + +function processNavigationLinks() { + // Get BASE_PATH from config (default to empty if not set) + var basePath = (typeof SIMPLEDOC_CONFIG !== 'undefined' && SIMPLEDOC_CONFIG.BASE_PATH) + ? SIMPLEDOC_CONFIG.BASE_PATH + : ''; + + // Find all links with data-nav-link attribute + var navLinks = document.querySelectorAll('[data-nav-link]'); + + for (var i = 0; i < navLinks.length; i++) { + var link = navLinks[i]; + var targetPath = link.getAttribute('data-nav-link'); + + // Set the href with BASE_PATH prepended + link.href = "/" + basePath + targetPath; + } +} + +function initDarkMode() { + // Check for saved theme preference or default to 'light' + var savedTheme = localStorage.getItem('simpledoc-theme'); + + // If no saved preference, check system preference + if (!savedTheme) { + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + savedTheme = 'dark'; + } else { + savedTheme = 'light'; + } + } + + // Apply the theme + setTheme(savedTheme); + + // Update icons to match current theme + updateThemeIcons(savedTheme); + + // Add click listener to desktop toggle button + var themeToggle = document.getElementById('theme-toggle'); + if (themeToggle) { + themeToggle.addEventListener('click', function(e) { + e.preventDefault(); + toggleTheme(); + }); + } + + // Add click listener to mobile toggle button + var themeToggleMobile = document.getElementById('theme-toggle-mobile'); + if (themeToggleMobile) { + themeToggleMobile.addEventListener('click', function(e) { + e.preventDefault(); + toggleTheme(); + }); + } + + // Listen for system theme changes + if (window.matchMedia) { + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function(e) { + if (!localStorage.getItem('simpledoc-theme')) { + setTheme(e.matches ? 'dark' : 'light'); + } + }); + } +} + +function setTheme(theme) { + document.documentElement.setAttribute('theme', theme); + localStorage.setItem('simpledoc-theme', theme); + updateThemeIcons(theme); + updatePrismTheme(theme); +} + +function updateThemeIcons(theme) { + // Show the opposite icon (what clicking will switch to) + var iconName = theme === 'dark' ? 'light_mode' : 'dark_mode'; + + var themeIcon = document.getElementById('theme-icon'); + if (themeIcon) { + themeIcon.textContent = iconName; + } + + var themeIconMobile = document.getElementById('theme-icon-mobile'); + if (themeIconMobile) { + themeIconMobile.textContent = iconName; + } +} + +function toggleTheme() { + var currentTheme = document.documentElement.getAttribute('theme'); + var newTheme = currentTheme === 'dark' ? 'light' : 'dark'; + setTheme(newTheme); +} + +function updatePrismTheme(theme) { + // Prism Tomorrow theme works well for both light and dark modes + // You can customize this if you want different syntax highlighting themes +} + +// Initialize theme on page load (before includeHTML) +(function() { + var savedTheme = localStorage.getItem('simpledoc-theme'); + if (!savedTheme) { + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + savedTheme = 'dark'; + } else { + savedTheme = 'light'; + } + } + document.documentElement.setAttribute('theme', savedTheme); +})(); diff --git a/components/footer.html b/components/footer.html new file mode 100755 index 0000000..de78314 --- /dev/null +++ b/components/footer.html @@ -0,0 +1,18 @@ +
+
+
+
+
Footer Content
+

I created SimpleDoc to help me write documentation for my projects. While it's designed to suit my needs and may not be useful for everyone, it's available under the MIT License if you'd like to give it a try.

+
+
+
Links
+ +
+
+
+
diff --git a/components/header.html b/components/header.html new file mode 100755 index 0000000..ef527e4 --- /dev/null +++ b/components/header.html @@ -0,0 +1,35 @@ +
+ + + +
diff --git a/index.html b/index.html new file mode 100755 index 0000000..edb1375 --- /dev/null +++ b/index.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + SimpleDoc + + + +
+ +
+
+
+
+
+
+ Call to action! +

SimpleDoc is a simple documentation template used across my projects. It's based on Materialize and uses some FontAwesome icons.
Make it yours by forking it on Github, and give your users the gift of a documentation!

+
+ +
+
+ +
+
+
+ +
+
+
+ Get started now with a basic guide and simple examples. +
+ +
+
+
+ +
+
+
+ +
+
+
+ Take a look at the documentation format. +
+ +
+
+
+ +
+
+
+ +
+
+
+ Check out projects using SimpleDoc. +
+
+ Showcase +
+
+
+
+ +
+
+
+ +
+
+
+ Something something. +
+ +
+
+
+
+
+
+ +
+ + + diff --git a/pages/documentation.html b/pages/documentation.html new file mode 100755 index 0000000..c1a4ca5 --- /dev/null +++ b/pages/documentation.html @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + SimpleDoc - Documentation + + + +
+ +
+
+
+
+

Documentation

+

Detailed informations on your api endpoints, your software usage, or whatever else.

+
+
+
+ +
+ +
+
+
+

Introduction

+

+ This is the main documentation page. Start by writing a paragraph or two about the general operation of your software before delving into more specific details in the subsections. Below, provide a complete list of API endpoints, each accompanied by a brief description and an example. +
+
+ Since SimpleDoc is a static template, there would be a distinct lack of content for this section. Let's add a few imaginary functions to showcase this page. +

+
+
+

Earthbending

+

+ One of the four elemental bending arts, is the geokinetic ability to manipulate earth and rock in all their various forms, prevalent in the Earth Kingdom and the United Republic. +
+ Earth is the element of substance, while the people of the Earth Kingdom are diverse, strong, and enduring. Following the lion turtles' decision to relinquish their role as protectors of mankind, Oma and Shu were the first earthbenders to learn this art from the badgermoles. +

+ +
+
+

Firebending

+

+ One of the four elemental bending arts, is the pyrokinetic ability to control and produce fire. It is unique among the bending arts, as it is the only one in which the performer can generate the element. The first human firebenders lived in a city atop a lion turtle during the era of Raava and the art later spread to the Sun Warriors, the Fire Nation, and the United Republic of Nations. The Earth Kingdom also has a small firebending minority. +

+ +
+
+
+ +
+
+
+ +
+ + + diff --git a/pages/documentation/example.html b/pages/documentation/example.html new file mode 100755 index 0000000..1b72943 --- /dev/null +++ b/pages/documentation/example.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + SimpleDoc - Documentation + + + +
+ +
+
+
+
+

Earth launch

+
+
+
+ +
+ +
+

+ While earthbenders like being rooted to the ground, with some like Toph being unable to see in the air, they can quickly move rock beneath them and launch them several tens of feet into the air, whether to catch airborne opponents or to travel faster. Toph and Bumi did this during the battle at Wulong Forest and the liberation of Ba Sing Se, respectively. Bolin has shown to be able to launch himself into the air with Earthbending, as was seen when he escaped the Earth Queen's palace. +
+
+ Example: +

+
stomp the ground with your foot or something
+
+
+ +
+ + + diff --git a/pages/license.html b/pages/license.html new file mode 100755 index 0000000..8c6338c --- /dev/null +++ b/pages/license.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + SimpleDoc - Licence + + + +
+ +
+
+
+
+

Licence

+

Don't forget to credit contributors and third-party resources!

+
+
+
+ +
+

License terms

+
+
+
+

The MIT License (MIT)

Copyright (c) 2025 ❤x1

Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE.

+
+
+
+ +

Third-party libraries

+ + + + + + + + + + + + + + + + + + +
MaterializeMIT License https://materializeweb.com
FontAwesome FreeSIL OFL 1.1 Licensehttps://fontawesome.com/
Google Material IconApache-2.0 licensehttps://fonts.google.com/icons
+ +

Meet the team

+
+
+
+ +
The community
+ Anyone who contributes to an open-source project is a hero.
Let's celebrate those who work for the benefit of many!
+
+
+
+ +
+
+
+ +
Last Life
+ I am a hobbyist developer with a passion for writing code, but I often struggle when it comes to writing its accompanying documentation. +
+
+
+
+
+ +
+ + + diff --git a/pages/quickstart.html b/pages/quickstart.html new file mode 100755 index 0000000..8a807c1 --- /dev/null +++ b/pages/quickstart.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + SimpleDoc - Quick start + + + +
+ +
+
+
+
+

Quick start

+

Let's set up and begin using SimpleDoc in no time.

+
+
+
+ +
+ +
+
+
+

Download

+

+ You can download the latest version of SimpleDoc on its GitHub release page. +

+
+ +
+

Requirements

+

+ SimpleDoc needs to run from a web server and won't work when using the file:/// protocol scheme because of CORS security issues. +

+

+ +
+

Directory Structure

+

Once unpacked, your directory will look like:

+
simpledoc/
+├── assets/
+│   ├── css/
+│   │   ├── simpledoc.css
+│   │   └── prism.css
+│   ├── js/
+│   │   ├── config.js          <-- Configure this!
+│   │   ├── simpledoc.js
+│   │   └── prism.js
+│   └── images/
+│       └── showcase/
+├── components/
+│   ├── header.html
+│   └── footer.html
+├── pages/
+│   ├── documentation/
+│   ├── quickstart.html
+│   ├── documentation.html
+│   ├── showcase.html
+│   └── license.html
+├── templates/
+│   ├── page-template.html
+│   └── doc-detail-template.html
+└── index.html
+
+ +
+

Important: Configure BASE_PATH

+

+ Before you start, you must configure the BASE_PATH! +

+ If your documentation is in a subdirectory (not at the root of your domain), you need to set this in assets/js/config.js: +

+
const SIMPLEDOC_CONFIG = {
+	BASE_PATH: '',  // Change this to your subdirectory!
+	SITE_NAME: 'SimpleDoc',
+};
+ +
Examples:
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Your URLBASE_PATH Setting
https://example.com/BASE_PATH: ''
https://example.com/docs/BASE_PATH: '/docs'
https://lastlife.net/doc/BASE_PATH: '/doc'
https://example.com/projects/api-docs/BASE_PATH: '/projects/api-docs'
+ +

+ Important notes: +

+
    +
  • Always start with / (forward slash)
  • +
  • Never end with / (no trailing slash)
  • +
  • Use forward slashes even on Windows
  • +
+ +

+ For detailed information, see SUBDIRECTORY_SETUP.md in the root directory. +

+
+
+

Customization

+ +
Adding Your Images
+

Place your images in assets/images/:

+
    +
  • Card images: 1.png, 2.png, 3.png, 4.png (400x300px recommended)
  • +
  • Profile images: community.png, lastlife.png (200x200px recommended)
  • +
  • Showcase: Put screenshots in assets/images/showcase/
  • +
+ +
Creating New Pages
+

Use the templates in templates/ directory.

+ +
Customizing PrismJS
+

+ The included Prism supports HTML, CSS, and JavaScript. To add more languages: +

+
    +
  1. Visit PrismJS download page
  2. +
  3. Select your theme and languages
  4. +
  5. Replace assets/css/prism.css and assets/js/prism.js
  6. +
+ +
Updating Navigation
+

Edit components/header.html to add or modify menu items.

+ +
Customizing Colors
+

+ Edit assets/css/simpledoc.css to change site-wide styles. +
+ Available MaterializeCSS colors: red, blue, green, orange, cyan, purple, pink, teal, etc. +

+
+ +
+

TL;DR

+
    +
  1. Configure BASE_PATH in assets/js/config.js
  2. +
  3. Add your images to assets/images/
  4. +
  5. Test locally with a web server
  6. +
  7. Customize the content in pages/
  8. +
  9. Update navigation in components/header.html
  10. +
  11. Deploy to your server
  12. +
+
+
+ + +
+
+ +
+ + + diff --git a/pages/showcase.html b/pages/showcase.html new file mode 100755 index 0000000..c2512e4 --- /dev/null +++ b/pages/showcase.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + SimpleDoc - Showcase + + + +
+ +
+
+
+
+

Showcase

+

Highlights of projects that use SimpleDoc, demonstrating real-world applications.

+
+
+
+ +
+
+
+
+ +
+ + +
+
+
+ +
+ + + diff --git a/templates/doc-detail-template.html b/templates/doc-detail-template.html new file mode 100755 index 0000000..758c4b9 --- /dev/null +++ b/templates/doc-detail-template.html @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + SimpleDoc - [FUNCTION NAME] + + + +
+ +
+
+
+
+

[FUNCTION NAME]

+
+
+
+ +
+ +
+

+ [Description of the function or feature goes here. Explain what it does, when to use it, and any important considerations.] +
+
+ Example: +

+
// Your code example here
+function example() {
+    return "Hello World";
+}
+ +
Parameters
+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
param1stringDescription of parameter 1
param2numberDescription of parameter 2
+ +
Returns
+

Description of return value

+
+
+ +
+ + + diff --git a/templates/page-template.html b/templates/page-template.html new file mode 100755 index 0000000..eab9227 --- /dev/null +++ b/templates/page-template.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + SimpleDoc - [PAGE TITLE] + + + +
+ +
+
+
+
+

[PAGE TITLE]

+

[PAGE SUBTITLE]

+
+
+
+ +
+ +
+ +

This is a template page. Replace this content with your own.

+
+
+ +
+ + +