mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-28 09:11:18 +00:00
Debugging bar (this is super cool)
This commit is contained in:
@@ -76,7 +76,7 @@ def gentoc(titles, depth=0, chapter=0):
|
||||
return " "*(depth-2) + "- [{}](#{})\n".format(titles, anchor(titles))
|
||||
if isinstance(titles, list):
|
||||
if depth==0:
|
||||
sep = "\n\n<!-- auto-generated TOC -->\n---\n\n"
|
||||
sep = "\n\n.debug[auto-generated TOC]\n---\n\n"
|
||||
head = ""
|
||||
tail = ""
|
||||
elif depth==1:
|
||||
@@ -104,7 +104,7 @@ def processchapter(chapter, filename):
|
||||
if isinstance(chapter, str):
|
||||
if "\n" in chapter:
|
||||
titles = re.findall("^# (.*)", chapter, re.MULTILINE)
|
||||
slidefooter = "<!-- {} -->".format(filename)
|
||||
slidefooter = ".debug[{}]".format(filename)
|
||||
chapter = chapter.replace("\n---\n", "\n{}\n---\n".format(slidefooter))
|
||||
chapter += "\n" + slidefooter
|
||||
return (chapter, titles)
|
||||
|
||||
@@ -26,6 +26,18 @@ div.remark-slide-number {
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
.debug {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
font-family: monospace;
|
||||
color: white;
|
||||
}
|
||||
.debug:hover {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
body { font-family: 'Droid Serif'; }
|
||||
|
||||
h1, h2, h3 {
|
||||
|
||||
Reference in New Issue
Block a user