mirror of
https://github.com/celisej567/wiki.git
synced 2026-09-09 20:10:37 +03:00
Tree view
This commit is contained in:
37
__main__.py
37
__main__.py
@@ -6,25 +6,52 @@ import shutil
|
||||
|
||||
mark = markdown2.Markdown()
|
||||
|
||||
src = os.path.dirname(os.path.realpath(__file__))+"/src/"
|
||||
dst = os.path.dirname(os.path.realpath(__file__))+"/dst/"
|
||||
rootpath = os.path.dirname(os.path.realpath(__file__))
|
||||
src = rootpath+"/src/"
|
||||
lensrc = len(src)
|
||||
dst = rootpath+"/dst/"
|
||||
assets = rootpath+"/assets/"
|
||||
shutil.rmtree(dst)
|
||||
os.mkdir(dst)
|
||||
shutil.copytree(assets,dst)
|
||||
with open("template.html","r") as f:
|
||||
template = f.read()
|
||||
|
||||
documentlist = []
|
||||
namelist = []
|
||||
filetreedict = {}
|
||||
filetree = ""
|
||||
|
||||
for root, subdirs, files in os.walk(src):
|
||||
p = filetreedict
|
||||
if root[lensrc:]:
|
||||
for x in root[lensrc:].replace("\\","/").split("/"):
|
||||
p = p.setdefault(x, {})
|
||||
p[''] = []
|
||||
for file in files:
|
||||
fpath = os.path.join(root, file)
|
||||
with open(fpath,"r") as f:
|
||||
rawmarkdown = f.read()
|
||||
if(rawmarkdown[0:2] != "# "):
|
||||
raise SyntaxError(".md file must begin with a # marked title!")
|
||||
name = rawmarkdown[2:].split("\n",1)[0]
|
||||
p[''].append([os.path.join(root[lensrc:],file.replace(".md","")).replace("\\","/"),name])
|
||||
documentlist.append("/wiki/"+fpath[len(src):].replace(".md",".html").replace("\\","/"))
|
||||
namelist.append(rawmarkdown[2:].split("\n",1)[0])
|
||||
namelist.append(name)
|
||||
|
||||
def IterateFileTree(filedict):
|
||||
global filetree
|
||||
for key, value in filedict.items():
|
||||
if isinstance(value, dict):
|
||||
filetree += f"<li><b onclick=\"toggleTree(this);\">{key}</b>\n<ul class=\"nested\">\n"
|
||||
IterateFileTree(value)
|
||||
filetree += f"</ul>\n</li>\n"
|
||||
else:
|
||||
for file in value:
|
||||
filetree += f"<li><a href=\"/wiki/{file[0]}.html\">{file[1]}</a></li>\n"
|
||||
|
||||
IterateFileTree(filetreedict)
|
||||
print(filetree)
|
||||
|
||||
template = template.replace("@DOCUMENTLIST",str(documentlist)).replace("@NAMELIST",str(namelist))
|
||||
for root, subdirs, files in os.walk(src):
|
||||
if(not os.path.exists(dst+root[len(src):])):
|
||||
@@ -48,4 +75,4 @@ for root, subdirs, files in os.walk(src):
|
||||
name = link[1:].split("]",1)[0]
|
||||
href = link[1:].split("[",1)[1].split("]",1)[0]
|
||||
converted = converted.replace(link, "<a href=\"/wiki/"+href+".html\">"+name+"</a>")
|
||||
r.write(template.replace("@CONTENT",converted))
|
||||
r.write(template.replace("@CONTENT",converted).replace("@FILETREE",filetree))
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = ['/wiki/index.html', '/wiki/QScript/Introduction.html', '/wiki/QScript/Lua/Classes.html', '/wiki/QScript/Lua/Exports.html', '/wiki/QScript/Lua/Imports.html', '/wiki/QScript/Lua/Intro.html', '/wiki/QScript/Lua/Objects.html', '/wiki/QScript/Tutorial/Chapter1.html']
|
||||
const namelist = ['Wiki Intro', 'QScript Intro', 'Lua Classes', 'Lua Exports', 'Lua Imports', 'Lua Intro', 'Lua Objects', 'QScript Tutorial Chapter 1']
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,86 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
<li><a href="/wiki/index.html">Wiki Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">QScript</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Introduction.html">QScript Intro</a></li>
|
||||
<li><b onclick="toggleTree(this);">Lua</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Lua/Classes.html">Lua Classes</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Exports.html">Lua Exports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Imports.html">Lua Imports</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Intro.html">Lua Intro</a></li>
|
||||
<li><a href="/wiki/QScript/Lua/Objects.html">Lua Objects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Python</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Squirrel</b>
|
||||
<ul class="nested">
|
||||
</ul>
|
||||
</li>
|
||||
<li><b onclick="toggleTree(this);">Tutorial</b>
|
||||
<ul class="nested">
|
||||
<li><a href="/wiki/QScript/Tutorial/Chapter1.html">QScript Tutorial Chapter 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<title>SourceBox Wiki</title>
|
||||
<script>
|
||||
const documentlist = @DOCUMENTLIST
|
||||
const namelist = @NAMELIST
|
||||
|
||||
function toggleTree(element)
|
||||
{
|
||||
element.parentElement.querySelector(".nested").classList.toggle("active");
|
||||
element.classList.toggle("active");
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
searchtext = document.getElementById("searchbox").value.toLowerCase();
|
||||
var res = [];
|
||||
var searchresults = document.getElementById("searchresults")
|
||||
searchresults.innerHTML = ""
|
||||
if(searchtext === "")
|
||||
{
|
||||
document.getElementById("filetree").style.display = "block"
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("filetree").style.display = "none"
|
||||
}
|
||||
for (var i = 0; i < namelist.length; i++)
|
||||
{
|
||||
if(!namelist[i].toLowerCase().includes(searchtext)) continue;
|
||||
@@ -33,12 +47,58 @@ pre {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
.nested {
|
||||
display: none;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
li ::marker {
|
||||
color:#00000000
|
||||
}
|
||||
|
||||
li b::before{
|
||||
content:'+';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b.active
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
li b.active::before
|
||||
{
|
||||
content: '-';
|
||||
width:12px;
|
||||
height:8px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
li b {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div style="position:fixed; display:block; top: 0px; left: 0px; height:100%; width:200px;border-color: black; border-width: 1px; border-style:solid;">
|
||||
<input type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" style="width:192px;">
|
||||
<nav>
|
||||
<ul id="searchresults">
|
||||
</ul>
|
||||
<ul id="filetree">
|
||||
@FILETREE
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
|
||||
Reference in New Issue
Block a user