Generate indexes, fixup CSS for mobile
This commit is contained in:
parent
379e1846a9
commit
4235c74138
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,6 +9,8 @@
|
||||
# Doxygen output
|
||||
/docs/html/
|
||||
/docs/mod*.md
|
||||
/docs/classindex.md
|
||||
/docs/functionindex.md
|
||||
# Match library files anywhere.
|
||||
*.o
|
||||
*.so
|
||||
|
@ -13,6 +13,8 @@
|
||||
</tab>
|
||||
<tab type="usergroup" visible="yes" title="Modules">
|
||||
<tab type="user" url="@ref modulelist" title="Module List"/>
|
||||
<tab type="user" url="@ref classindex" title="Class Index"/>
|
||||
<tab type="user" url="@ref functionindex" title="Function Index"/>
|
||||
</tab>
|
||||
<!--
|
||||
<tab type="pages" visible="no" title="" intro=""/>
|
||||
|
@ -128,6 +128,7 @@ h2.memtitle, h3.memtitle, h4.memtitle {
|
||||
border-radius: 5px 5px 0px 0px;
|
||||
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
|
||||
font-size: 24px;
|
||||
word-break: break-all;
|
||||
scroll-margin-top: 4rem;
|
||||
}
|
||||
.memtitle.classDef {
|
||||
@ -353,3 +354,20 @@ div.memdoc {
|
||||
color: rgb(0,0,0,0.6);
|
||||
content: '/';
|
||||
}
|
||||
.krk-class-index {
|
||||
columns: 3;
|
||||
}
|
||||
@media (max-width: 991.98px) {
|
||||
#main-menu div#MSearchBox {
|
||||
display: none;
|
||||
}
|
||||
h4.memtitle {
|
||||
font-size: 16px;
|
||||
}
|
||||
h2.memtitle,h3.memtitle {
|
||||
font-size: 18px;
|
||||
}
|
||||
.krk-class-index {
|
||||
columns: 1;
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,6 @@
|
||||
<p class="mb-0">$generatedby <a href="http://www.doxygen.org/index.html"><img class="footer" style="height: 20px;" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion</p>
|
||||
</footer>
|
||||
</main>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,3 +1,7 @@
|
||||
# Kuroko Language Reference {#mainpage}
|
||||
|
||||
Hello, world.
|
||||
Take a look at the @ref modulelist or learn how to embed Kuroko with the @ref embedding.
|
||||
|
||||
You can also find a complete list of all classes provided by the standard library in the @ref classindex and all functions in the @ref functionindex.
|
||||
|
||||
@bsnote{This documentation is a work-in-progress.}
|
||||
|
@ -159,7 +159,6 @@
|
||||
.sm-dox ul ul ul ul ul a:active {
|
||||
border-left:40px solid transparent
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sm-dox ul {
|
||||
position:absolute;
|
||||
width:12em
|
||||
@ -350,5 +349,4 @@
|
||||
.sm-dox.sm-vertical ul a.disabled {
|
||||
background:#fff
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,10 @@ def functionDoc(func):
|
||||
return doc
|
||||
|
||||
def processModules(modules):
|
||||
|
||||
let globalClassList = []
|
||||
let globalFunctionList = []
|
||||
|
||||
for modulepath in modules:
|
||||
# Import the module.
|
||||
let module = kuroko.importmodule(modulepath)
|
||||
@ -241,14 +245,16 @@ def processModules(modules):
|
||||
if classes:
|
||||
print('\n### Classes\n')
|
||||
classes.sort()
|
||||
for name, cls in classes:
|
||||
outputClass(name, cls)
|
||||
for clsName, cls in classes:
|
||||
outputClass(clsName, cls)
|
||||
globalClassList.append((name.replace('.','_'), clsName))
|
||||
|
||||
if functions:
|
||||
print('\n### Functions\n')
|
||||
functions.sort()
|
||||
for name, func in functions:
|
||||
outputFunction(name, func)
|
||||
for funcName, func in functions:
|
||||
outputFunction(funcName, func)
|
||||
globalFunctionList.append((name.replace('.','_'), funcName))
|
||||
|
||||
if exceptions:
|
||||
print('\n### Exceptions\n')
|
||||
@ -288,5 +294,31 @@ def processModules(modules):
|
||||
|
||||
output.write('}\n')
|
||||
|
||||
with fileio.open('docs/classindex.md','w') as output:
|
||||
output.write(
|
||||
'# Class Index {#classindex}\n'
|
||||
'\n'
|
||||
'Here are all of the available classes:\n'
|
||||
'\n'
|
||||
'\htmlonly<div class="krk-class-index"><ul>\n')
|
||||
|
||||
for moduleName, className in globalClassList:
|
||||
output.write(f'<li><a class="el" href="mod_{moduleName}.html#{className}">{className}</a> <i>from <b>{moduleName}</b></i></li>\n')
|
||||
|
||||
output.write('</ul></div>\endhtmlonly\n')
|
||||
|
||||
with fileio.open('docs/functionindex.md','w') as output:
|
||||
output.write(
|
||||
'# Function Index {#functionindex}\n'
|
||||
'\n'
|
||||
'Here are all of the available functions:\n'
|
||||
'\n'
|
||||
'\htmlonly<div class="krk-class-index"><ul>\n')
|
||||
|
||||
for moduleName, funcName in globalFunctionList:
|
||||
output.write(f'<li><a class="el" href="mod_{moduleName}.html#{funcName}">{funcName}</a> <i>from <b>{moduleName}</b></i></li>\n')
|
||||
|
||||
output.write('</ul></div>\endhtmlonly\n')
|
||||
|
||||
if __name__ == '__main__':
|
||||
processModules(modules)
|
||||
|
Loading…
Reference in New Issue
Block a user