Files
wiki/template.html
2023-09-26 22:27:35 +02:00

369 lines
6.9 KiB
HTML

<!DOCTYPE html>
<title>SourceBox Wiki</title>
<link rel="shortcut icon" href="/wiki/favicon.ico">
<script>
documentlist = @DOCUMENTLIST;
namelist = @NAMELIST;
function toggleTree(element)
{
nested = element.parentNode.childNodes[3];
if(nested.className.indexOf("active",0) != -1)
{
nested.className = "sidebar nested";
element.parentNode.childNodes[0].innerHTML = "+";
}
else
{
nested.className = "sidebar nested active";
element.parentNode.childNodes[0].innerHTML = "-";
}
if(element.className.indexOf("active",0) != -1)
{
element.className = "spanactive"
}
else
{
element.className = "spanactive active"
}
}
function Press(element)
{
if(element.className.indexOf("active",0) != -1)
{
element.className = "spanactive active"
}
else
{
element.className = "spanactive"
}
}
function unPress(element)
{
if(element.className.indexOf("active",0) != -1)
{
element.className = "active"
}
else
{
element.className = ""
}
}
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().indexOf(searchtext) == -1) continue;
var searchelement = document.createElement("li");
searchelement.className = "sidebar"
var link = document.createElement("a");
searchelement.appendChild(link);
link.setAttribute("href", documentlist[i]);
link.innerHTML = namelist[i];
searchresults.appendChild(searchelement);
}
}
</script>
<link rel="stylesheet" href="/wiki/default.css">
<style>
hr
{
color: #463c2a;
}
code {
background-color: #383022;
border-color: #322b1e;
border-style:solid;
border-width:1px;
}
pre
{
margin-left:16px;
background-color: #383022;
border-color: #322b1e;
border-style:solid;
border-width:1px;
padding: 4px;
display:flex;
}
pre code
{
border: none !important;
}
td code {
background-color: #312A1D;
border-color: #2b2519;
}
.nested
{
display: none;
}
ul.sidebar.active
{
display: block !important;
}
ul.sidebar
{
padding-left: 0px;
}
li.sidebar ::marker
{
color:#00000000;
display:none;
}
li.sidebar
{
list-style-type: none !important;
background-color:#4A3F2C;
border-bottom: #312A1D 1px solid;
border-right: #312A1D 1px solid;
border-left: 1px solid #8d8881;
border-top: 1px solid #8d8881;
padding-left: 2px;
padding-bottom:2px;
padding-top:2px;
}
li ul li
{
margin-right:-1px;
}
li.sidebar span
{
-moz-user-select: none;
user-select: none;
-webkit-user-select: none;
z-index: 1;
cursor: pointer;
display: inline-block;
border: black 1px solid;
border-left-color: white;
border-top-color: white;
margin: 2px;
}
li.sidebar span span
{
-moz-user-select: none;
user-select: none;
-webkit-user-select: none;
z-index: 0;
border: #463c2a 1px solid;
background-color: #63553b;
color: white;
border-left-color: #8d8881;
border-top-color: #8d8881;
margin: 0px;
padding-left: 4px;
padding-right: 4px;
}
li.sidebar .spanactive
{
border-left-color: black;
border-top-color: black;
border-right-color: white;
border-bottom-color: white;
}
li.sidebar span .spanactive
{
border: #463c2a 1px solid;
border-right-color: #8d8881;
border-bottom-color: #8d8881;
}
.liicon
{
display:inline-block;
width:12px;
height:100%;
font-family: monospace;
font-size: 16px;
color: white;
}
nav
{
height: 100%;
}
a
{
color: #f79b08;
}
a:visited
{
color: #f79b08;
}
body
{
background-color: #4b402d;
color:white;
font-family:"Tahoma", sans-serif;
font-size:9pt;
}
.searchbox
{
border:none;
background-color: #3a3122;
color: white;
padding: 0px;
width:190px;
height:22px;
position: relative;
padding-left:4px;
padding-right:4px;
}
input:focus {
outline: none;
}
.searchboxcontainer
{
border: #2b2519 1px solid;
border-top-color: #837f7a;
border-left-color: #837f7a;
background-color: #3a3122;
position:relative;
margin-left:auto;
margin-right:0px;
height:24px;
width:198px;
position: absolute;
right: 9px;
}
.sidebarcontainer
{
float:right;
display:block;
top: -16px;
right: -8px;
margin-left: 8px;
margin-top: 8px;
margin-right: 8px;
width:200px;
border-color: black;
border-width: 1px;
border-style:solid;
position:relative;
overflow:auto;
padding:0px;
}
table
{
border: #312a1d 1px solid;
border-top-color: #837f7a;
border-left-color: #837f7a;
background-color: #423827;
}
th, td
{
border: #2b2519 1px solid;
border-right-color: #837f7a;
border-bottom-color: #837f7a;
background-color: #3a3122;
}
.sidebarroot
{
padding-left:0px !important;
margin:0px;
overflow:hidden;
}
.framed
{
border: #312a1d 1px solid;
border-top-color: #837f7a;
border-left-color: #837f7a;
background-color: #423827;
display: flow-root;
}
.framed .framed
{
border: #2b2519 1px solid;
border-right-color: #837f7a;
border-bottom-color: #837f7a;
background-color: #3a3122;
margin:4px;
padding:2px;
text-align: center;
}
.topbar
{
width:100%;
height:24px;
border: #312a1d 1px solid;
border-top-color: #837f7a;
border-left-color: #837f7a;
background-color: #423827;
margin-left:-2px;
}
.topbarelement
{
border: #2b2519 1px solid;
border-top-color: #837f7a;
border-left-color: #837f7a;
background-color: #3a3122;
}
</style>
<div class="topbar">
<img class="topbarelement" src="/wiki/sourceboxicon.png">
<span class="searchboxcontainer" onkeyup="updateSearch();"><input class="searchbox" type="text" placeholder="search..." autocomplete="off" id="searchbox" oninput="updateSearch();" class="searchbox"></span>
</div>
<div>
<div class="sidebarcontainer">
<nav>
<ul class="sidebar sidebarroot" id="searchresults">
</ul>
<ul class="sidebar sidebarroot" id="filetree">
@FILETREE
</ul>
</nav>
</div>
@CONTENT
</div>