-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b082d99
commit fe7636e
Showing
3 changed files
with
47 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
body {font-family: sans; font-size: 14px; background: #111; color: #fff; line-height: 24px;} | ||
h3 {margin-top: 50px; background-color: #234; padding: 5px;} | ||
h4 {background-color: #345; padding: 5px;} | ||
a {color: #0af; text-decoration: none;} | ||
a:hover {color: #0af; text-decoration: underline;} | ||
table {border-collapse: collapse;} | ||
table, th, td {border: 1px solid white; padding: 8px;} | ||
span.highlight {color: #fb0; font-weight: bold;} | ||
img.screenshot {width: 800px; padding: 2px; border: 1px solid #ccc; margin-left: auto; margin-right: auto; display: block;} | ||
div.annotation {font-size: 12px; position: absolute; background-color: #08f; color: #fff; padding: 5px; font-weight: bold; border: 1px #fff solid; text-align: center} | ||
div.annotationContainer {position: relative; width: 800px; display: block; margin-left: auto; margin-right: auto;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$(document).ready(function() { | ||
var toc = $('#toc'); | ||
var i = 1; | ||
|
||
$('h3,h4').each(function(i, e) { | ||
|
||
var link = 'link' + i; | ||
var a = $('<a>').attr('href', '#' + link).append(e.innerText); | ||
|
||
$(e).before($('<a>').attr('name', link)); | ||
|
||
if (e.tagName == 'H3') | ||
{ | ||
toc.append("▪ <a href='#" + link + "'>" + e.innerText + "</a><br />"); | ||
} | ||
|
||
if (e.tagName == 'H4') | ||
{ | ||
toc.append("<span style='text-indent: 2em; display: inline-block'>▫ <a href='#" + link + "'>" + e.innerText + "</a></span><br />"); | ||
} | ||
}); | ||
}); |