diff --git a/lib/showdown.js b/lib/showdown.js deleted file mode 100644 index dd87d69..0000000 --- a/lib/showdown.js +++ /dev/null @@ -1,1360 +0,0 @@ -// -// showdown.js -- A javascript port of Markdown. -// -// Copyright (c) 2007 John Fraser. -// -// Original Markdown Copyright (c) 2004-2005 John Gruber -// -// -// Redistributable under a BSD-style open source license. -// See license.txt for more information. -// -// The full source distribution is at: -// -// A A L -// T C A -// T K B -// -// -// - -// -// Wherever possible, Showdown is a straight, line-by-line port -// of the Perl version of Markdown. -// -// This is not a normal parser design; it's basically just a -// series of string substitutions. It's hard to read and -// maintain this way, but keeping Showdown close to the original -// design makes it easier to port new features. -// -// More importantly, Showdown behaves like markdown.pl in most -// edge cases. So web applications can do client-side preview -// in Javascript, and then build identical HTML on the server. -// -// This port needs the new RegExp functionality of ECMA 262, -// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers -// should do fine. Even with the new regular expression features, -// We do a lot of work to emulate Perl's regex functionality. -// The tricky changes in this file mostly have the "attacklab:" -// label. Major or self-explanatory changes don't. -// -// Smart diff tools like Araxis Merge will be able to match up -// this file with markdown.pl in a useful way. A little tweaking -// helps: in a copy of markdown.pl, replace "#" with "//" and -// replace "$text" with "text". Be sure to ignore whitespace -// and line endings. -// - - -// -// Showdown usage: -// -// var text = "Markdown *rocks*."; -// -// var converter = new Showdown.converter(); -// var html = converter.makeHtml(text); -// -// alert(html); -// -// Note: move the sample code to the bottom of this -// file before uncommenting it. -// - -// ***************************************************** -// GitHub Flavored Markdown - esque modifications by JT -// -// Modifications are tagged with "JT" -// ***************************************************** - -// -// Showdown namespace -// -var Showdown = {}; - -// -// converter -// -// Wraps all "globals" so that the only thing -// exposed is makeHtml(). -// -Showdown.converter = function() { - -// -// Globals: -// - -// Global hashes, used by various utility routines -var g_urls; -var g_titles; -var g_html_blocks; - -// Used to track when we're inside an ordered or unordered list -// (see _ProcessListItems() for details): -var g_list_level = 0; - - -this.makeHtml = function(text) { -// -// Main function. The order in which other subs are called here is -// essential. Link and image substitutions need to happen before -// _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the -// and tags get encoded. -// - - // Clear the global hashes. If we don't clear these, you get conflicts - // from other articles when generating a page which contains more than - // one article (e.g. an index page that shows the N most recent - // articles): - g_urls = {}; - g_titles = {}; - g_html_blocks = []; - - // attacklab: Replace ~ with ~T - // This lets us use tilde as an escape char to avoid md5 hashes - // The choice of character is arbitray; anything that isn't - // magic in Markdown will work. - text = text.replace(/~/g,"~T"); - - // attacklab: Replace $ with ~D - // RegExp interprets $ as a special character - // when it's in a replacement string - text = text.replace(/\$/g,"~D"); - - // Standardize line endings - text = text.replace(/\r\n/g,"\n"); // DOS to Unix - text = text.replace(/\r/g,"\n"); // Mac to Unix - - // Make sure text begins and ends with a couple of newlines: - text = "\n\n" + text + "\n\n"; - - // Convert all tabs to spaces. - text = _Detab(text); - - // Strip any lines consisting only of spaces and tabs. - // This makes subsequent regexen easier to write, because we can - // match consecutive blank lines with /\n+/ instead of something - // contorted like /[ \t]*\n+/ . - text = text.replace(/^[ \t]+$/mg,""); - - text = _DoFencedCodeBlocks(text); - - // Turn block-level HTML blocks into hash entries - text = _HashHTMLBlocks(text); - - // Strip link definitions, store in hashes. - text = _StripLinkDefinitions(text); - - text = _RunBlockGamut(text); - - text = _UnescapeSpecialChars(text); - - // attacklab: Restore dollar signs - text = text.replace(/~D/g,"$$"); - - // attacklab: Restore tildes - text = text.replace(/~T/g,"~"); - - // ** JT ** Auto-link URLs and emails - text = text.replace(/https?\:\/\/[^"\s<>]*[^.,;'">\:\s<>\)\]\!]/g, function(wholeMatch,matchIndex){ - var left = text.slice(0, matchIndex), right = text.slice(matchIndex); - // Don't match anything inside a tag, or anything already wrapped in a or an - if ((left.match(/<[^>]+$/) && right.match(/^[^>]*>/)) || - (left.match(/<(code|a)[^>]*>[^<]*$/) && right.match(/^[^<]*<\/(a|code)>/))) {return wholeMatch;} - return "" + wholeMatch + ""; - }); - text = text.replace(/[a-z0-9_\-+=.]+@[a-z0-9\-]+(\.[a-z0-9-]+)+/ig, function(wholeMatch){return "" + wholeMatch + "";}); - - - return text; -} - - -var _StripLinkDefinitions = function(text) { -// -// Strips link definitions from text, stores the URLs and titles in -// hash references. -// - - // Link defs are in the form: ^[id]: url "optional title" - - /* - var text = text.replace(/ - ^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1 - [ \t]* - \n? // maybe *one* newline - [ \t]* - ? // url = $2 - [ \t]* - \n? // maybe one newline - [ \t]* - (?: - (\n*) // any lines skipped = $3 attacklab: lookbehind removed - ["(] - (.+?) // title = $4 - [")] - [ \t]* - )? // title is optional - (?:\n+|$) - /gm, - function(){...}); - */ - var text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm, - function (wholeMatch,m1,m2,m3,m4) { - m1 = m1.toLowerCase(); - g_urls[m1] = _EncodeAmpsAndAngles(m2); // Link IDs are case-insensitive - if (m3) { - // Oops, found blank lines, so it's not a title. - // Put back the parenthetical statement we stole. - return m3+m4; - } else if (m4) { - g_titles[m1] = m4.replace(/"/g,"""); - } - - // Completely remove the definition from the text - return ""; - } - ); - - return text; -} - - -var _HashHTMLBlocks = function(text) { - // attacklab: Double up blank lines to reduce lookaround - text = text.replace(/\n/g,"\n\n"); - - // Hashify HTML blocks: - // We only want to do this for block-level HTML tags, such as headers, - // lists, and tables. That's because we still want to wrap

s around - // "paragraphs" that are wrapped in non-block-level tags, such as anchors, - // phrase emphasis, and spans. The list of tags we're looking for is - // hard-coded: - var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del" - var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math" - - // First, look for nested blocks, e.g.: - //

- //
- // tags for inner block must be indented. - //
- //
- // - // The outermost tags must start at the left margin for this to match, and - // the inner nested divs must be indented. - // We need to do this before the next, more liberal match, because the next - // match will start at the first `
` and stop at the first `
`. - - // attacklab: This regex can be expensive when it fails. - /* - var text = text.replace(/ - ( // save in $1 - ^ // start of line (with /m) - <($block_tags_a) // start tag = $2 - \b // word break - // attacklab: hack around khtml/pcre bug... - [^\r]*?\n // any number of lines, minimally matching - // the matching end tag - [ \t]* // trailing spaces/tabs - (?=\n+) // followed by a newline - ) // attacklab: there are sentinel newlines at end of document - /gm,function(){...}}; - */ - text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,hashElement); - - // - // Now match more liberally, simply from `\n` to `\n` - // - - /* - var text = text.replace(/ - ( // save in $1 - ^ // start of line (with /m) - <($block_tags_b) // start tag = $2 - \b // word break - // attacklab: hack around khtml/pcre bug... - [^\r]*? // any number of lines, minimally matching - .* // the matching end tag - [ \t]* // trailing spaces/tabs - (?=\n+) // followed by a newline - ) // attacklab: there are sentinel newlines at end of document - /gm,function(){...}}; - */ - text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement); - - // Special case just for
. It was easier to make a special case than - // to make the other regex more complicated. - - /* - text = text.replace(/ - ( // save in $1 - \n\n // Starting after a blank line - [ ]{0,3} - (<(hr) // start tag = $2 - \b // word break - ([^<>])*? // - \/?>) // the matching end tag - [ \t]* - (?=\n{2,}) // followed by a blank line - ) - /g,hashElement); - */ - text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,hashElement); - - // Special case for standalone HTML comments: - - /* - text = text.replace(/ - ( // save in $1 - \n\n // Starting after a blank line - [ ]{0,3} // attacklab: g_tab_width - 1 - - [ \t]* - (?=\n{2,}) // followed by a blank line - ) - /g,hashElement); - */ - text = text.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,hashElement); - - // PHP and ASP-style processor instructions ( and <%...%>) - - /* - text = text.replace(/ - (?: - \n\n // Starting after a blank line - ) - ( // save in $1 - [ ]{0,3} // attacklab: g_tab_width - 1 - (?: - <([?%]) // $2 - [^\r]*? - \2> - ) - [ \t]* - (?=\n{2,}) // followed by a blank line - ) - /g,hashElement); - */ - text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,hashElement); - - // attacklab: Undo double lines (see comment at top of this function) - text = text.replace(/\n\n/g,"\n"); - return text; -} - -var hashElement = function(wholeMatch,m1) { - var blockText = m1; - - // Undo double lines - blockText = blockText.replace(/\n\n/g,"\n"); - blockText = blockText.replace(/^\n/,""); - - // strip trailing blank lines - blockText = blockText.replace(/\n+$/g,""); - - // Replace the element text with a marker ("~KxK" where x is its key) - blockText = "\n\n~K" + (g_html_blocks.push(blockText)-1) + "K\n\n"; - - return blockText; -}; - -var _RunBlockGamut = function(text) { -// -// These are all the transformations that form block-level -// tags like paragraphs, headers, and list items. -// - text = _DoCodeBlocks(text); - - text = _DoHeaders(text); - - // Do Horizontal Rules: - var key = hashBlock("
"); - text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key); - text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key); - text = text.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key); - - text = _DoLists(text); - text = _DoBlockQuotes(text); - - // We already ran _HashHTMLBlocks() before, in Markdown(), but that - // was to escape raw HTML in the original Markdown source. This time, - // we're escaping the markup we've just created, so that we don't wrap - //

tags around block-level tags. - text = _HashHTMLBlocks(text); - text = _FormParagraphs(text); - - return text; -} - - -var _RunSpanGamut = function(text) { -// -// These are all the transformations that occur *within* block-level -// tags like paragraphs, headers, and list items. -// - - text = _DoCodeSpans(text); - text = _EscapeSpecialCharsWithinTagAttributes(text); - text = _EncodeBackslashEscapes(text); - - // Process anchor and image tags. Images must come first, - // because ![foo][f] looks like an anchor. - text = _DoImages(text); - text = _DoAnchors(text); - - // Make links out of things like `` - // Must come after _DoAnchors(), because you can use < and > - // delimiters in inline links like [this](). - text = _DoAutoLinks(text); - text = _EncodeAmpsAndAngles(text); - text = _DoItalicsAndBold(text); - - // Do hard breaks: - text = text.replace(/ +\n/g,"
\n"); - - return text; -} - -var _EscapeSpecialCharsWithinTagAttributes = function(text) { -// -// Within tags -- meaning between < and > -- encode [\ ` * _] so they -// don't conflict with their use in Markdown for code, italics and strong. -// - - // Build a regex to find HTML tags and comments. See Friedl's - // "Mastering Regular Expressions", 2nd Ed., pp. 200-201. - var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi; - - text = text.replace(regex, function(wholeMatch) { - var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g,"$1`"); - tag = escapeCharacters(tag,"\\`*_"); - return tag; - }); - - return text; -} - -var _DoAnchors = function(text) { -// -// Turn Markdown link shortcuts into XHTML tags. -// - // - // First, handle reference-style links: [link text] [id] - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - \[ - ( - (?: - \[[^\]]*\] // allow brackets nested one level - | - [^\[] // or anything else - )* - ) - \] - - [ ]? // one optional space - (?:\n[ ]*)? // one optional newline followed by spaces - - \[ - (.*?) // id = $3 - \] - )()()()() // pad remaining backreferences - /g,_DoAnchors_callback); - */ - text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeAnchorTag); - - // - // Next, inline-style links: [link text](url "optional title") - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - \[ - ( - (?: - \[[^\]]*\] // allow brackets nested one level - | - [^\[\]] // or anything else - ) - ) - \] - \( // literal paren - [ \t]* - () // no id, so leave $3 empty - ? // href = $4 - [ \t]* - ( // $5 - (['"]) // quote char = $6 - (.*?) // Title = $7 - \6 // matching quote - [ \t]* // ignore any spaces/tabs between closing quote and ) - )? // title is optional - \) - ) - /g,writeAnchorTag); - */ - text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag); - - // - // Last, handle reference-style shortcuts: [link text] - // These must come last in case you've also got [link test][1] - // or [link test](/foo) - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - \[ - ([^\[\]]+) // link text = $2; can't contain '[' or ']' - \] - )()()()()() // pad rest of backreferences - /g, writeAnchorTag); - */ - text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag); - - return text; -} - -var writeAnchorTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) { - if (m7 == undefined) m7 = ""; - var whole_match = m1; - var link_text = m2; - var link_id = m3.toLowerCase(); - var url = m4; - var title = m7; - - if (url == "") { - if (link_id == "") { - // lower-case and turn embedded newlines into spaces - link_id = link_text.toLowerCase().replace(/ ?\n/g," "); - } - url = "#"+link_id; - - if (g_urls.hasOwnProperty(link_id)) { - url = g_urls[link_id]; - if (g_titles.hasOwnProperty(link_id)) { - title = g_titles[link_id]; - } - } - else { - if (whole_match.search(/\(\s*\)$/m)>-1) { - // Special case for explicit empty url - url = ""; - } else { - return whole_match; - } - } - } - - url = escapeCharacters(url,"*_"); - var result = ""; - - return result; -} - - -var _DoImages = function(text) { -// -// Turn Markdown image shortcuts into tags. -// - - // - // First, handle reference-style labeled images: ![alt text][id] - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - !\[ - (.*?) // alt text = $2 - \] - - [ ]? // one optional space - (?:\n[ ]*)? // one optional newline followed by spaces - - \[ - (.*?) // id = $3 - \] - )()()()() // pad rest of backreferences - /g,writeImageTag); - */ - text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeImageTag); - - // - // Next, handle inline images: ![alt text](url "optional title") - // Don't forget: encode * and _ - - /* - text = text.replace(/ - ( // wrap whole match in $1 - !\[ - (.*?) // alt text = $2 - \] - \s? // One optional whitespace character - \( // literal paren - [ \t]* - () // no id, so leave $3 empty - ? // src url = $4 - [ \t]* - ( // $5 - (['"]) // quote char = $6 - (.*?) // title = $7 - \6 // matching quote - [ \t]* - )? // title is optional - \) - ) - /g,writeImageTag); - */ - text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeImageTag); - - return text; -} - -var writeImageTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) { - var whole_match = m1; - var alt_text = m2; - var link_id = m3.toLowerCase(); - var url = m4; - var title = m7; - - if (!title) title = ""; - - if (url == "") { - if (link_id == "") { - // lower-case and turn embedded newlines into spaces - link_id = alt_text.toLowerCase().replace(/ ?\n/g," "); - } - url = "#"+link_id; - - if (g_urls.hasOwnProperty(link_id)) { - url = g_urls[link_id]; - if (g_titles.hasOwnProperty(link_id)) { - title = g_titles[link_id]; - } - } - else { - return whole_match; - } - } - - alt_text = alt_text.replace(/"/g,"""); - url = escapeCharacters(url,"*_"); - var result = "\""" + _RunSpanGamut(m1) + "");}); - - text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, - function(matchFound,m1){return hashBlock("

" + _RunSpanGamut(m1) + "

");}); - - // atx-style headers: - // # Header 1 - // ## Header 2 - // ## Header 2 with closing hashes ## - // ... - // ###### Header 6 - // - - /* - text = text.replace(/ - ^(\#{1,6}) // $1 = string of #'s - [ \t]* - (.+?) // $2 = Header text - [ \t]* - \#* // optional closing #'s (not counted) - \n+ - /gm, function() {...}); - */ - - text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, - function(wholeMatch,m1,m2) { - var h_level = m1.length; - return hashBlock("" + _RunSpanGamut(m2) + ""); - }); - - return text; -} - -// This declaration keeps Dojo compressor from outputting garbage: -var _ProcessListItems; - -var _DoLists = function(text) { -// -// Form HTML ordered (numbered) and unordered (bulleted) lists. -// - - // attacklab: add sentinel to hack around khtml/safari bug: - // http://bugs.webkit.org/show_bug.cgi?id=11231 - text += "~0"; - - // Re-usable pattern to match any entirel ul or ol list: - - /* - var whole_list = / - ( // $1 = whole list - ( // $2 - [ ]{0,3} // attacklab: g_tab_width - 1 - ([*+-]|\d+[.]) // $3 = first list item marker - [ \t]+ - ) - [^\r]+? - ( // $4 - ~0 // sentinel for workaround; should be $ - | - \n{2,} - (?=\S) - (?! // Negative lookahead for another list item marker - [ \t]* - (?:[*+-]|\d+[.])[ \t]+ - ) - ) - )/g - */ - var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm; - - if (g_list_level) { - text = text.replace(whole_list,function(wholeMatch,m1,m2) { - var list = m1; - var list_type = (m2.search(/[*+-]/g)>-1) ? "ul" : "ol"; - - // Turn double returns into triple returns, so that we can make a - // paragraph for the last item in a list, if necessary: - list = list.replace(/\n{2,}/g,"\n\n\n");; - var result = _ProcessListItems(list); - - // Trim any trailing whitespace, to put the closing `` - // up on the preceding line, to get it past the current stupid - // HTML block parser. This is a hack to work around the terrible - // hack that is the HTML block parser. - result = result.replace(/\s+$/,""); - result = "<"+list_type+">" + result + "\n"; - return result; - }); - } else { - whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g; - text = text.replace(whole_list,function(wholeMatch,m1,m2,m3) { - var runup = m1; - var list = m2; - - var list_type = (m3.search(/[*+-]/g)>-1) ? "ul" : "ol"; - // Turn double returns into triple returns, so that we can make a - // paragraph for the last item in a list, if necessary: - var list = list.replace(/\n{2,}/g,"\n\n\n");; - var result = _ProcessListItems(list); - result = runup + "<"+list_type+">\n" + result + "\n"; - return result; - }); - } - - // attacklab: strip sentinel - text = text.replace(/~0/,""); - - return text; -} - -_ProcessListItems = function(list_str) { -// -// Process the contents of a single ordered or unordered list, splitting it -// into individual list items. -// - // The $g_list_level global keeps track of when we're inside a list. - // Each time we enter a list, we increment it; when we leave a list, - // we decrement. If it's zero, we're not in a list anymore. - // - // We do this because when we're not inside a list, we want to treat - // something like this: - // - // I recommend upgrading to version - // 8. Oops, now this line is treated - // as a sub-list. - // - // As a single paragraph, despite the fact that the second line starts - // with a digit-period-space sequence. - // - // Whereas when we're inside a list (or sub-list), that line will be - // treated as the start of a sub-list. What a kludge, huh? This is - // an aspect of Markdown's syntax that's hard to parse perfectly - // without resorting to mind-reading. Perhaps the solution is to - // change the syntax rules such that sub-lists must start with a - // starting cardinal number; e.g. "1." or "a.". - - g_list_level++; - - // trim trailing blank lines: - list_str = list_str.replace(/\n{2,}$/,"\n"); - - // attacklab: add sentinel to emulate \z - list_str += "~0"; - - /* - list_str = list_str.replace(/ - (\n)? // leading line = $1 - (^[ \t]*) // leading whitespace = $2 - ([*+-]|\d+[.]) [ \t]+ // list marker = $3 - ([^\r]+? // list item text = $4 - (\n{1,2})) - (?= \n* (~0 | \2 ([*+-]|\d+[.]) [ \t]+)) - /gm, function(){...}); - */ - list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, - function(wholeMatch,m1,m2,m3,m4){ - var item = m4; - var leading_line = m1; - var leading_space = m2; - - if (leading_line || (item.search(/\n{2,}/)>-1)) { - item = _RunBlockGamut(_Outdent(item)); - } - else { - // Recursion for sub-lists: - item = _DoLists(_Outdent(item)); - item = item.replace(/\n$/,""); // chomp(item) - item = _RunSpanGamut(item); - } - - return "
  • " + item + "
  • \n"; - } - ); - - // attacklab: strip sentinel - list_str = list_str.replace(/~0/g,""); - - g_list_level--; - return list_str; -} - - -var _DoFencedCodeBlocks = function(text){ -// -// Process Markdown `
    ` blocks.
    -//
    -
    -  // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
    -  text += "~0";
    -
    -  /* ** JT ** GFM-esque fenced code blocks
    -    text = text.replace(text,
    -      /(?:\n|^)
    -      (?`{3,}[ a-z]*\n?)        // Code fence with optional language
    -      (                         // $1 = the code block -- one or more lines, and no occurrences of three or more backticks
    -        [^`]*(?:`{1,2}[^`]+)*
    -      )
    -      (?:\n*`{3,})              // Closing fence
    -      (?:\n|$)                  // And make sure we get all of the closing fence. Just in case someone used the wrong number of backticks
    -    /g,function(){...});
    -  */
    -
    -  text = text.replace(/(?:\n|^)(?:`{3,}[ \t]*([a-z]*)\n)([^`]*(?:`{1,2}[^`]+)*)(?:\n*`{3,})(?:\n|^)/g,
    -    function(wholeMatch,lang,m1) {
    -      var codeblock = m1;
    -
    -      codeblock = _EncodeCode(codeblock);
    -      codeblock = _Detab(codeblock);
    -      codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
    -      codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
    -
    -      codeblock = "
    " + codeblock + "\n
    "; - - return hashBlock(codeblock); - } - ); - - // attacklab: strip sentinel - text = text.replace(/~0/,""); - - return text; -} - -var _DoCodeBlocks = function(text) { -// -// Process Markdown `
    ` blocks.
    -//
    -
    -  /*
    -    text = text.replace(text,
    -      /(?:\n\n|^)
    -      (               // $1 = the code block -- one or more lines, starting with a space/tab
    -        (?:
    -          (?:[ ]{4}|\t)     // Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
    -          .*\n+
    -        )+
    -      )
    -      (\n*[ ]{0,3}[^ \t\n]|(?=~0))  // attacklab: g_tab_width
    -    /g,function(){...});
    -  */
    -
    -  // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
    -  text += "~0";
    -
    -  text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
    -    function(wholeMatch,m1,m2) {
    -      var codeblock = m1;
    -      var nextChar = m2;
    -
    -      codeblock = _EncodeCode( _Outdent(codeblock));
    -      codeblock = _Detab(codeblock);
    -      codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
    -      codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
    -
    -      codeblock = "
    " + codeblock + "\n
    "; - - return hashBlock(codeblock) + nextChar; - } - ); - - // attacklab: strip sentinel - text = text.replace(/~0/,""); - - return text; -} - -var hashBlock = function(text) { - text = text.replace(/(^\n+|\n+$)/g,""); - return "\n\n~K" + (g_html_blocks.push(text)-1) + "K\n\n"; -} - - -var _DoCodeSpans = function(text) { -// -// * Backtick quotes are used for spans. -// -// * You can use multiple backticks as the delimiters if you want to -// include literal backticks in the code span. So, this input: -// -// Just type ``foo `bar` baz`` at the prompt. -// -// Will translate to: -// -//

    Just type foo `bar` baz at the prompt.

    -// -// There's no arbitrary limit to the number of backticks you -// can use as delimters. If you need three consecutive backticks -// in your code, use four for delimiters, etc. -// -// * You can use spaces to get literal backticks at the edges: -// -// ... type `` `bar` `` ... -// -// Turns to: -// -// ... type `bar` ... -// - - /* - text = text.replace(/ - (^|[^\\]) // Character before opening ` can't be a backslash - (`+) // $2 = Opening run of ` - ( // $3 = The code block - [^\r]*? - [^`] // attacklab: work around lack of lookbehind - ) - \2 // Matching closer - (?!`) - /gm, function(){...}); - */ - - text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, - function(wholeMatch,m1,m2,m3,m4) { - var c = m3; - c = c.replace(/^([ \t]*)/g,""); // leading whitespace - c = c.replace(/[ \t]*$/g,""); // trailing whitespace - c = _EncodeCode(c); - return m1+""+c+""; - }); - - return text; -} - - -var _EncodeCode = function(text) { -// -// Encode/escape certain characters inside Markdown code runs. -// The point is that in code, these characters are literals, -// and lose their special Markdown meanings. -// - // Encode all ampersands; HTML entities are not - // entities within a Markdown code span. - text = text.replace(/&/g,"&"); - - // Do the angle bracket song and dance: - text = text.replace(//g,">"); - - // Now, escape characters that are magic in Markdown: - text = escapeCharacters(text,"\*_{}[]\\",false); - -// jj the line above breaks this: -//--- - -//* Item - -// 1. Subitem - -// special char: * -//--- - - return text; -} - - -var _DoItalicsAndBold = function(text) { - - // must go first: - text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, - "$2"); - - text = text.replace(/(\w)_(\w)/g, "$1~E95E$2") // ** JT ** "~E95E" == escaped "_" - - text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, - "$2"); - - return text; -} - - -var _DoBlockQuotes = function(text) { - - /* - text = text.replace(/ - ( // Wrap whole match in $1 - ( - ^[ \t]*>[ \t]? // '>' at the start of a line - .+\n // rest of the first line - (.+\n)* // subsequent consecutive lines - \n* // blanks - )+ - ) - /gm, function(){...}); - */ - - text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, - function(wholeMatch,m1) { - var bq = m1; - - // attacklab: hack around Konqueror 3.5.4 bug: - // "----------bug".replace(/^-/g,"") == "bug" - - bq = bq.replace(/^[ \t]*>[ \t]?/gm,"~0"); // trim one level of quoting - - // attacklab: clean up hack - bq = bq.replace(/~0/g,""); - - bq = bq.replace(/^[ \t]+$/gm,""); // trim whitespace-only lines - bq = _RunBlockGamut(bq); // recurse - - bq = bq.replace(/(^|\n)/g,"$1 "); - // These leading spaces screw with
     content, so we need to fix that:
    -      bq = bq.replace(
    -          /(\s*
    [^\r]+?<\/pre>)/gm,
    -        function(wholeMatch,m1) {
    -          var pre = m1;
    -          // attacklab: hack around Konqueror 3.5.4 bug:
    -          pre = pre.replace(/^  /mg,"~0");
    -          pre = pre.replace(/~0/g,"");
    -          return pre;
    -        });
    -
    -      return hashBlock("
    \n" + bq + "\n
    "); - }); - return text; -} - - -var _FormParagraphs = function(text) { -// -// Params: -// $text - string to process with html

    tags -// - - // Strip leading and trailing lines: - text = text.replace(/^\n+/g,""); - text = text.replace(/\n+$/g,""); - - var grafs = text.split(/\n{2,}/g); - var grafsOut = []; - - // - // Wrap

    tags. - // - var end = grafs.length; - for (var i=0; i= 0) { - grafsOut.push(str); - } - else if (str.search(/\S/) >= 0) { - str = _RunSpanGamut(str); - str = str.replace(/^([ \t]*)/g,"

    "); - str += "

    " - grafsOut.push(str); - } - - } - - // - // Unhashify HTML blocks - // - end = grafsOut.length; - for (var i=0; i= 0) { - var blockText = g_html_blocks[RegExp.$1]; - blockText = blockText.replace(/\$/g,"$$$$"); // Escape any dollar signs - grafsOut[i] = grafsOut[i].replace(/~K\d+K/,blockText); - } - } - - return grafsOut.join("\n\n"); -} - - -var _EncodeAmpsAndAngles = function(text) { -// Smart processing for ampersands and angle brackets that need to be encoded. - - // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: - // http://bumppo.net/projects/amputator/ - text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"); - - // Encode naked <'s - text = text.replace(/<(?![a-z\/?\$!])/gi,"<"); - - return text; -} - - -var _EncodeBackslashEscapes = function(text) { -// -// Parameter: String. -// Returns: The string, with after processing the following backslash -// escape sequences. -// - - // attacklab: The polite way to do this is with the new - // escapeCharacters() function: - // - // text = escapeCharacters(text,"\\",true); - // text = escapeCharacters(text,"`*_{}[]()>#+-.!",true); - // - // ...but we're sidestepping its use of the (slow) RegExp constructor - // as an optimization for Firefox. This function gets called a LOT. - - text = text.replace(/\\(\\)/g,escapeCharacters_callback); - text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g,escapeCharacters_callback); - return text; -} - - -var _DoAutoLinks = function(text) { - - text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"
    $1"); - - // Email addresses: - - /* - text = text.replace(/ - < - (?:mailto:)? - ( - [-.\w]+ - \@ - [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+ - ) - > - /gi, _DoAutoLinks_callback()); - */ - text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, - function(wholeMatch,m1) { - return _EncodeEmailAddress( _UnescapeSpecialChars(m1) ); - } - ); - - return text; -} - - -var _EncodeEmailAddress = function(addr) { -// -// Input: an email address, e.g. "foo@example.com" -// -// Output: the email address as a mailto link, with each character -// of the address encoded as either a decimal or hex entity, in -// the hopes of foiling most address harvesting spam bots. E.g.: -// -// foo -// @example.com -// -// Based on a filter by Matthew Wickline, posted to the BBEdit-Talk -// mailing list: -// - - // attacklab: why can't javascript speak hex? - function char2hex(ch) { - var hexDigits = '0123456789ABCDEF'; - var dec = ch.charCodeAt(0); - return(hexDigits.charAt(dec>>4) + hexDigits.charAt(dec&15)); - } - - var encode = [ - function(ch){return "&#"+ch.charCodeAt(0)+";";}, - function(ch){return "&#x"+char2hex(ch)+";";}, - function(ch){return ch;} - ]; - - addr = "mailto:" + addr; - - addr = addr.replace(/./g, function(ch) { - if (ch == "@") { - // this *must* be encoded. I insist. - ch = encode[Math.floor(Math.random()*2)](ch); - } else if (ch !=":") { - // leave ':' alone (to spot mailto: later) - var r = Math.random(); - // roughly 10% raw, 45% hex, 45% dec - ch = ( - r > .9 ? encode[2](ch) : - r > .45 ? encode[1](ch) : - encode[0](ch) - ); - } - return ch; - }); - - addr = "" + addr + ""; - addr = addr.replace(/">.+:/g,"\">"); // strip the mailto: from the visible part - - return addr; -} - - -var _UnescapeSpecialChars = function(text) { -// -// Swap back in all the special characters we've hidden. -// - text = text.replace(/~E(\d+)E/g, - function(wholeMatch,m1) { - var charCodeToReplace = parseInt(m1); - return String.fromCharCode(charCodeToReplace); - } - ); - return text; -} - - -var _Outdent = function(text) { -// -// Remove one level of line-leading tabs or spaces -// - - // attacklab: hack around Konqueror 3.5.4 bug: - // "----------bug".replace(/^-/g,"") == "bug" - - text = text.replace(/^(\t|[ ]{1,4})/gm,"~0"); // attacklab: g_tab_width - - // attacklab: clean up hack - text = text.replace(/~0/g,"") - - return text; -} - -var _Detab = function(text) { -// attacklab: Detab's completely rewritten for speed. -// In perl we could fix it by anchoring the regexp with \G. -// In javascript we're less fortunate. - - // expand first n-1 tabs - text = text.replace(/\t(?=\t)/g," "); // attacklab: g_tab_width - - // replace the nth with two sentinels - text = text.replace(/\t/g,"~A~B"); - - // use the sentinel to anchor our regex so it doesn't explode - text = text.replace(/~B(.+?)~A/g, - function(wholeMatch,m1,m2) { - var leadingText = m1; - var numSpaces = 4 - leadingText.length % 4; // attacklab: g_tab_width - - // there *must* be a better way to do this: - for (var i=0; i=0.4.0" + "node": ">=0.10.0" }, "description": "Static documentation generator based on docco", "homepage": "http://jbt.github.com/docker", diff --git a/res/code.jst b/res/code.ejs similarity index 70% rename from res/code.jst rename to res/code.ejs index c8aca4a..b2b6dd0 100644 --- a/res/code.jst +++ b/res/code.ejs @@ -9,16 +9,15 @@ <% } %> - <% for (var i=0, l=sections.length; i - <% var section = sections[i]; %> + <% sections.forEach(function(section){ %> - <%= section.docHtml %> + <%- section.docHtml %> - <%= section.codeHtml %> +
    <%- section.codeHtml %>
    - <% } %> + <% }); %> - \ No newline at end of file + diff --git a/res/css/autumn.css b/res/css/autumn.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/autumn.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/borland.css b/res/css/borland.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/borland.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/bw.css b/res/css/bw.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/bw.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/colorful.css b/res/css/colorful.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/colorful.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/default.css b/res/css/default.css deleted file mode 100644 index 84f0045..0000000 --- a/res/css/default.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: white; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #f4f4f3; } - -#sidebar_switch { - background: #ededec; - border-bottom-color: #dededc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #f4f4f3; } - #sidebar_switch .selected { - background: #fafafa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e9e9e8; } - #sidebar-toggle:hover { - background: #dededc; } - -.docs.markdown { - background: white; } -.docs pre { - border-color: #dededc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #dededc; - background: #f4f4f3; } - -.highlight { - background: #f4f4f3; - color: auto; } - -.dox { - border-top-color: #e6e6e4; } - .dox .details { - background: #f4f4f3; - border-color: #dededc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #dededc; } diff --git a/res/css/emacs.css b/res/css/emacs.css deleted file mode 100644 index 84f0045..0000000 --- a/res/css/emacs.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: white; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #f4f4f3; } - -#sidebar_switch { - background: #ededec; - border-bottom-color: #dededc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #f4f4f3; } - #sidebar_switch .selected { - background: #fafafa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e9e9e8; } - #sidebar-toggle:hover { - background: #dededc; } - -.docs.markdown { - background: white; } -.docs pre { - border-color: #dededc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #dededc; - background: #f4f4f3; } - -.highlight { - background: #f4f4f3; - color: auto; } - -.dox { - border-top-color: #e6e6e4; } - .dox .details { - background: #f4f4f3; - border-color: #dededc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #dededc; } diff --git a/res/css/friendly.css b/res/css/friendly.css deleted file mode 100644 index 84f0045..0000000 --- a/res/css/friendly.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: white; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #f4f4f3; } - -#sidebar_switch { - background: #ededec; - border-bottom-color: #dededc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #f4f4f3; } - #sidebar_switch .selected { - background: #fafafa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e9e9e8; } - #sidebar-toggle:hover { - background: #dededc; } - -.docs.markdown { - background: white; } -.docs pre { - border-color: #dededc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #dededc; - background: #f4f4f3; } - -.highlight { - background: #f4f4f3; - color: auto; } - -.dox { - border-top-color: #e6e6e4; } - .dox .details { - background: #f4f4f3; - border-color: #dededc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #dededc; } diff --git a/res/css/fruity.css b/res/css/fruity.css deleted file mode 100644 index 86e23dc..0000000 --- a/res/css/fruity.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: black; - color: #f2f2f2; } - -a { - color: #eeeeee; } - a:visited { - color: #eeeeee; } - -#sidebar_wrapper { - background: #0c0c0c; } - -#sidebar_switch { - background: #141414; - border-bottom-color: #262626; } - #sidebar_switch span { - color: #f4f4f4; } - #sidebar_switch span:hover { - background: #0c0c0c; } - #sidebar_switch .selected { - background: #050505; - color: white; } - -#tree .file { - color: white; } - -#headings .heading a { - color: white; } - -#sidebar-toggle { - background: #191919; } - #sidebar-toggle:hover { - background: #262626; } - -.docs.markdown { - background: black; } -.docs pre { - border-color: #262626; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #262626; - background: #0c0c0c; } - -.highlight { - background: #0c0c0c; - color: auto; } - -.dox { - border-top-color: #1c1c1c; } - .dox .details { - background: #0c0c0c; - border-color: #262626; } - -.pilwrap .pilcrow { - color: #e5e5e5; } - -td.code, .background { - border-left-color: #262626; } diff --git a/res/css/manni.css b/res/css/manni.css deleted file mode 100644 index 62137db..0000000 --- a/res/css/manni.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: #fbffff; - color: #2f2b2b; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #f0f3f3; } - -#sidebar_switch { - background: #e9eded; - border-bottom-color: #dadddd; } - #sidebar_switch span { - color: #2d2828; } - #sidebar_switch span:hover { - background: #f0f3f3; } - #sidebar_switch .selected { - background: #f6fafa; - color: #252020; } - -#tree .file { - color: #252020; } - -#headings .heading a { - color: #252020; } - -#sidebar-toggle { - background: #e5e8e8; } - #sidebar-toggle:hover { - background: #dadddd; } - -.docs.markdown { - background: #fbffff; } -.docs pre { - border-color: #dadddd; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #dadddd; - background: #f0f3f3; } - -.highlight { - background: #f0f3f3; - color: auto; } - -.dox { - border-top-color: #e2e5e5; } - .dox .details { - background: #f0f3f3; - border-color: #dadddd; } - -.pilwrap .pilcrow { - color: #3a3636; } - -td.code, .background { - border-left-color: #dadddd; } diff --git a/res/css/monokai.css b/res/css/monokai.css deleted file mode 100644 index 80db351..0000000 --- a/res/css/monokai.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: #1a1a16; - color: #e3e3e3; } - -a { - color: #bbbbbb; } - a:visited { - color: #bbbbbb; } - -#sidebar_wrapper { - background: #242420; } - -#sidebar_switch { - background: #2a2a27; - border-bottom-color: #393936; } - #sidebar_switch span { - color: #e5e5e5; } - #sidebar_switch span:hover { - background: #242420; } - #sidebar_switch .selected { - background: #1e1e1a; - color: #eeeeee; } - -#tree .file { - color: #eeeeee; } - -#headings .heading a { - color: #eeeeee; } - -#sidebar-toggle { - background: #2f2f2b; } - #sidebar-toggle:hover { - background: #393936; } - -.docs.markdown { - background: #1a1a16; } -.docs pre { - border-color: #393936; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #393936; - background: #242420; } - -.highlight { - background: #242420; - color: auto; } - -.dox { - border-top-color: #31312e; } - .dox .details { - background: #242420; - border-color: #393936; } - -.pilwrap .pilcrow { - color: #d8d8d8; } - -td.code, .background { - border-left-color: #393936; } diff --git a/res/css/murphy.css b/res/css/murphy.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/murphy.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/native.css b/res/css/native.css deleted file mode 100644 index 1d17b8d..0000000 --- a/res/css/native.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: #151515; - color: #f3f3f3; } - -a { - color: #eeeeee; } - a:visited { - color: #eeeeee; } - -#sidebar_wrapper { - background: #202020; } - -#sidebar_switch { - background: #272727; - border-bottom-color: #383838; } - #sidebar_switch span { - color: whitesmoke; } - #sidebar_switch span:hover { - background: #202020; } - #sidebar_switch .selected { - background: #191919; - color: white; } - -#tree .file { - color: white; } - -#headings .heading a { - color: white; } - -#sidebar-toggle { - background: #2c2c2c; } - #sidebar-toggle:hover { - background: #383838; } - -.docs.markdown { - background: #151515; } -.docs pre { - border-color: #383838; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #383838; - background: #202020; } - -.highlight { - background: #202020; - color: auto; } - -.dox { - border-top-color: #2f2f2f; } - .dox .details { - background: #202020; - border-color: #383838; } - -.pilwrap .pilcrow { - color: #e7e7e7; } - -td.code, .background { - border-left-color: #383838; } diff --git a/res/css/pastie.css b/res/css/pastie.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/pastie.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/perldoc.css b/res/css/perldoc.css deleted file mode 100644 index 8633127..0000000 --- a/res/css/perldoc.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: #f6f6ee; - color: #2f2f23; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ebebe3; } - -#sidebar_switch { - background: #e5e5dc; - border-bottom-color: #d6d6ce; } - #sidebar_switch span { - color: #2d2d21; } - #sidebar_switch span:hover { - background: #ebebe3; } - #sidebar_switch .selected { - background: #f1f1e9; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e1e1d8; } - #sidebar-toggle:hover { - background: #d6d6ce; } - -.docs.markdown { - background: #f6f6ee; } -.docs pre { - border-color: #d6d6ce; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d6d6ce; - background: #ebebe3; } - -.highlight { - background: #ebebe3; - color: auto; } - -.dox { - border-top-color: #deded6; } - .dox .details { - background: #ebebe3; - border-color: #d6d6ce; } - -.pilwrap .pilcrow { - color: #39392e; } - -td.code, .background { - border-left-color: #d6d6ce; } diff --git a/res/css/rrt.css b/res/css/rrt.css deleted file mode 100644 index 86e23dc..0000000 --- a/res/css/rrt.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: black; - color: #f2f2f2; } - -a { - color: #eeeeee; } - a:visited { - color: #eeeeee; } - -#sidebar_wrapper { - background: #0c0c0c; } - -#sidebar_switch { - background: #141414; - border-bottom-color: #262626; } - #sidebar_switch span { - color: #f4f4f4; } - #sidebar_switch span:hover { - background: #0c0c0c; } - #sidebar_switch .selected { - background: #050505; - color: white; } - -#tree .file { - color: white; } - -#headings .heading a { - color: white; } - -#sidebar-toggle { - background: #191919; } - #sidebar-toggle:hover { - background: #262626; } - -.docs.markdown { - background: black; } -.docs pre { - border-color: #262626; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #262626; - background: #0c0c0c; } - -.highlight { - background: #0c0c0c; - color: auto; } - -.dox { - border-top-color: #1c1c1c; } - .dox .details { - background: #0c0c0c; - border-color: #262626; } - -.pilwrap .pilcrow { - color: #e5e5e5; } - -td.code, .background { - border-left-color: #262626; } diff --git a/res/css/tango.css b/res/css/tango.css deleted file mode 100644 index 84f0045..0000000 --- a/res/css/tango.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: white; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #f4f4f3; } - -#sidebar_switch { - background: #ededec; - border-bottom-color: #dededc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #f4f4f3; } - #sidebar_switch .selected { - background: #fafafa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e9e9e8; } - #sidebar-toggle:hover { - background: #dededc; } - -.docs.markdown { - background: white; } -.docs pre { - border-color: #dededc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #dededc; - background: #f4f4f3; } - -.highlight { - background: #f4f4f3; - color: auto; } - -.dox { - border-top-color: #e6e6e4; } - .dox .details { - background: #f4f4f3; - border-color: #dededc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #dededc; } diff --git a/res/css/trac.css b/res/css/trac.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/trac.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/css/vim.css b/res/css/vim.css deleted file mode 100644 index 1f223f6..0000000 --- a/res/css/vim.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: #070707; - color: #f2f2f2; } - -a { - color: #eeeeee; } - a:visited { - color: #eeeeee; } - -#sidebar_wrapper { - background: #131313; } - -#sidebar_switch { - background: #1a1a1a; - border-bottom-color: #2c2c2c; } - #sidebar_switch span { - color: whitesmoke; } - #sidebar_switch span:hover { - background: #131313; } - #sidebar_switch .selected { - background: #0b0b0b; - color: white; } - -#tree .file { - color: white; } - -#headings .heading a { - color: white; } - -#sidebar-toggle { - background: #1f1f1f; } - #sidebar-toggle:hover { - background: #2c2c2c; } - -.docs.markdown { - background: #070707; } -.docs pre { - border-color: #2c2c2c; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #2c2c2c; - background: #131313; } - -.highlight { - background: #131313; - color: auto; } - -.dox { - border-top-color: #222222; } - .dox .details { - background: #131313; - border-color: #2c2c2c; } - -.pilwrap .pilcrow { - color: #e6e6e6; } - -td.code, .background { - border-left-color: #2c2c2c; } diff --git a/res/css/vs.css b/res/css/vs.css deleted file mode 100644 index bf911a5..0000000 --- a/res/css/vs.css +++ /dev/null @@ -1,308 +0,0 @@ -body { - font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - margin: 0; - padding: 0; } - -p, h1, h2, h3, h4, h5, h6 { - margin: 0 0 15px 0; } - -h1 { - margin-top: 40px; } - -#tree, #headings { - position: absolute; - top: 30px; - left: 0; - bottom: 0; - width: 290px; - padding: 10px 0; - overflow: auto; } - -#sidebar_wrapper { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 0; - overflow: hidden; } - -#sidebar_switch { - position: absolute; - top: 0; - left: 0; - width: 290px; - height: 29px; - border-bottom: 1px solid; } - #sidebar_switch span { - display: block; - float: left; - width: 50%; - text-align: center; - line-height: 29px; - cursor: pointer; } - #sidebar_switch .selected { - font-weight: bold; } - -.slidey #sidebar_wrapper { - -webkit-transition: width 250ms linear; - -moz-transition: width 250ms linear; - -ms-transition: width 250ms linear; - -o-transition: width 250ms linear; - transition: width 250ms linear; } - -.sidebar #sidebar_wrapper { - width: 290px; } - -#tree .nodename { - text-indent: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=); - background-repeat: no-repeat; - background-position: left center; - cursor: pointer; } -#tree .open > .nodename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==); - background-position: left 7px; } -#tree .dir, #tree .file { - position: relative; - min-height: 20px; - line-height: 20px; - padding-left: 12px; } - #tree .dir > .children, #tree .file > .children { - display: none; } - #tree .dir.open > .children, #tree .file.open > .children { - display: block; } -#tree .file { - padding-left: 24px; - display: block; - text-decoration: none; } -#tree > .dir { - padding-left: 0; } - -#headings .heading a { - text-decoration: none; - padding-left: 10px; - display: block; } -#headings .h1 { - padding-left: 0; - margin-top: 10px; - font-size: 1.3em; } -#headings .h2 { - padding-left: 10px; - margin-top: 8px; - font-size: 1.1em; } -#headings .h3 { - padding-left: 20px; - margin-top: 5px; - font-size: 1em; } -#headings .h4 { - padding-left: 30px; - margin-top: 3px; - font-size: 0.9em; } -#headings .h5 { - padding-left: 40px; - margin-top: 1px; - font-size: 0.8em; } -#headings .h6 { - padding-left: 50px; - font-size: 0.75em; } - -#sidebar-toggle { - position: fixed; - top: 0; - left: 0; - width: 5px; - bottom: 0; - z-index: 2; - cursor: pointer; } - #sidebar-toggle:hover { - width: 10px; } - -.slidey #sidebar-toggle, .slidey #container { - -webkit-transition: all 250ms linear; - -moz-transition: all 250ms linear; - -ms-transition: all 250ms linear; - -o-transition: all 250ms linear; - transition: all 250ms linear; } - -.sidebar #sidebar-toggle { - left: 290px; } - -#container { - position: fixed; - left: 5px; - right: 0; - top: 0; - bottom: 0; - overflow: auto; } - -.sidebar #container { - left: 295px; } - -.no-sidebar #sidebar_wrapper, .no-sidebar #sidebar-toggle { - display: none; } -.no-sidebar #container { - left: 0; } - -#page { - padding-top: 40px; } - -table td { - border: 0; - outline: 0; } - -.docs.markdown { - padding: 10px 50px; } - -td.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; } - -.docs pre { - margin: 15px 0 15px; - padding: 5px; - padding-left: 10px; - border: 1px solid; - font-size: 12px; - overflow: auto; } - .docs pre.code_stats { - font-size: 60%; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border: 1px solid; - font-size: 12px; - padding: 0 0.2em; } - -.dox { - border-top: 1px solid; - padding-top: 10px; - padding-bottom: 10px; } - .dox .details { - padding: 10px; - border: 1px solid; - margin-bottom: 10px; } - .dox .dox_tag_title { - font-weight: bold; } - .dox .dox_tag_detail { - margin-left: 10px; } - .dox .dox_tag_detail span { - margin-right: 5px; } - .dox .dox_type { - font-style: italic; } - .dox .dox_tag_name { - font-weight: bold; } - -.pilwrap { - position: relative; - padding-top: 1px; } - .pilwrap .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; - left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .pilwrap:hover .pilcrow { - opacity: 1; } - -td.code { - padding: 8px 15px 8px 25px; - width: 100%; - vertical-align: top; - border-left: 1px solid; } - -.background { - border-left: 1px solid; - position: absolute; - z-index: -1; - top: 0; - right: 0; - bottom: 0; - left: 525px; } - -pre, tt, code { - font-size: 12px; - line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; - padding: 0; - white-space: pre-wrap; } - -.line-num { - display: inline-block; - width: 50px; - text-align: right; - opacity: 0.3; - margin-left: -20px; - text-decoration: none; } - -/* All the stuff that can depend on colour scheme goes below here: */ -body { - background: ghostwhite; - color: #2f2f24; } - -a { - color: #261a3b; } - a:visited { - color: #261a3b; } - -#sidebar_wrapper { - background: #ededf3; } - -#sidebar_switch { - background: #e7e7ec; - border-bottom-color: #d8d8dc; } - #sidebar_switch span { - color: #2d2d22; } - #sidebar_switch span:hover { - background: #ededf3; } - #sidebar_switch .selected { - background: #f3f3fa; - color: #252519; } - -#tree .file { - color: #252519; } - -#headings .heading a { - color: #252519; } - -#sidebar-toggle { - background: #e2e2e8; } - #sidebar-toggle:hover { - background: #d8d8dc; } - -.docs.markdown { - background: ghostwhite; } -.docs pre { - border-color: #d8d8dc; } -.docs p tt, .docs p code, .docs li tt, .docs li code { - border-color: #d8d8dc; - background: #ededf3; } - -.highlight { - background: #ededf3; - color: auto; } - -.dox { - border-top-color: #e0e0e4; } - .dox .details { - background: #ededf3; - border-color: #d8d8dc; } - -.pilwrap .pilcrow { - color: #3a3a2f; } - -td.code, .background { - border-left-color: #d8d8dc; } diff --git a/res/jsDoc.ejs b/res/jsDoc.ejs new file mode 100644 index 0000000..68c71c2 --- /dev/null +++ b/res/jsDoc.ejs @@ -0,0 +1,97 @@ +
    +
    +<%- md(description.summary) %> +
    +
    +<%- md(description.body) %> +
    + +<% + +if(tags.length){ + var hasParams = false, hasReturn = false, hasType = false; -%> +
    +<% + tags.forEach(function(tag){ + if(tag.type == 'param'){ + if(!hasParams){ + hasParams = true; -%> +
    Params
    +<% } -%> +
    +<%= tag.name %> +<% (tag.types || []).forEach(function(type){ -%> +<%= type %> +<% }); + + if(tag.description){ -%> +<%- md(tag.description, true) %> +<% } -%> +
    +<% } + + if(tag.type == 'return'){ + if(!hasReturn){ + hasReturn = true; -%> +
    Returns
    +<% } -%> +
    +<%= tag.name %> +<% (tag.types || []).forEach(function(type){ -%> +<%= type %> +<% }); + + if(tag.description){ -%> +<%- md(tag.description, true) %> +<% } -%> +
    +<% } + + if(tag.type == 'type'){ + if(!hasType){ + hasType = true; -%> +
    Type
    +<% } -%> +
    +<% (tag.types || []).forEach(function(type){ -%> +<%= type %> +<% }); -%> +
    +<% } + + if(tag.type == 'api'){ -%> +
    API
    +
    +<%= tag.visibility %> +
    +<% } + + if(tag.type == 'unknown'){ -%> +
    <%= tag.name %>
    +
    +<% (tag.types || []).forEach(function(type){ -%> +<%= type %> +<% }); + + if(tag.description){ -%> +<%- md(tag.description, true) %> +<% } -%> +
    +<% } + + if(tag.type == 'see'){ -%> +
    See
    +
    +<% if(tag.url){ -%> +<%= tag.title || tag.url %> +<% } + if(tag.local){ -%> +<%= tag.local %> +<% } -%> +
    +<% } + }); -%> +
    +<% +} -%> +
    diff --git a/res/jsDoc.jst b/res/jsDoc.jst deleted file mode 100644 index 9de8b5e..0000000 --- a/res/jsDoc.jst +++ /dev/null @@ -1,104 +0,0 @@ -
    -
    - <%= md(description.summary) %> -
    -
    - <%= md(description.body) %> -
    - -<% - -if(tags.length){ - var hasParams = false, hasReturn = false, hasType = false; %> -
    -<% - for(var i = 0; i < tags.length; i += 1){ - var tag = tags[i]; - if(tag.type == 'param'){ - if(!hasParams){ - hasParams = true; %> -
    Params
    -<% } %> -
    - <%= tag.name %> -<% if(tag.types){ - for(var j = 0; j < tag.types.length; j += 1){ %> - <%= tag.types[j] %> -<% } - } - - if(tag.description){ %> - <%= md(tag.description, true) %> -<% } %> -
    -<% } - - if(tag.type == 'return'){ - if(!hasReturn){ - hasReturn = true; %> -
    Returns
    -<% } %> -
    - <%= tag.name %> -<% if(tag.types){ - for(var j = 0; j < tag.types.length; j += 1){ %> - <%= tag.types[j] %> -<% } - } - - if(tag.description){ %> - <%= md(tag.description, true) %> -<% } %> -
    -<% } - - if(tag.type == 'type'){ - if(!hasType){ - hasType = true; %> -
    Type
    -<% } %> -
    -<% for(var j = 0; j < tag.types.length; j += 1){ %> - <%= tag.types[j] %> -<% } %> -
    -<% } - - if(tag.type == 'api'){ %> -
    API
    -
    - <%= tag.visibility %> -
    -<% } - - if(tag.type == 'unknown'){ %> -
    <%= tag.name %>
    -
    -<% if(tag.types){ - for(var j = 0; j < tag.types.length; j += 1){ %> - <%= tag.types[j] %> -<% } - } - - if(tag.description){ %> - <%= md(tag.description, true) %> -<% } %> -
    -<% } - - if(tag.type == 'see'){ %> -
    See
    -
    -<% if(tag.url){ %> - <%= tag.title || tag.url %> -<% } - if(tag.local){ %> - <%= tag.local %> -<% } %> -
    -<% } - } %> -
    -<% -} %> -
    diff --git a/res/sass/_base.sass b/res/sass/_base.sass deleted file mode 100644 index c321240..0000000 --- a/res/sass/_base.sass +++ /dev/null @@ -1,311 +0,0 @@ -body - font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif - font-size: 15px - line-height: 22px - margin: 0 - padding: 0 - -p, h1, h2, h3, h4, h5, h6 - margin: 0 0 15px 0 - -h1 - margin-top: 40px - -#tree, #headings - position: absolute - top: 30px - left: 0 - bottom: 0 - width: 290px - padding: 10px 0 - overflow: auto - -#sidebar_wrapper - position: fixed - top: 0 - left: 0 - bottom: 0 - width: 0 - overflow: hidden - -#sidebar_switch - position: absolute - top: 0 - left: 0 - width: 290px - height: 29px - border-bottom: 1px solid - span - display: block - float: left - width: 50% - text-align: center - line-height: 29px - cursor: pointer - .selected - font-weight: bold - -.slidey #sidebar_wrapper - -webkit-transition: width 250ms linear - -moz-transition: width 250ms linear - -ms-transition: width 250ms linear - -o-transition: width 250ms linear - transition: width 250ms linear - -.sidebar #sidebar_wrapper - width: 290px - -#tree - .nodename - text-indent: 12px - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII=) - background-repeat: no-repeat - background-position: left center - cursor: pointer - .open>.nodename - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg==) - background-position: left 7px - .dir, .file - position: relative - min-height: 20px - line-height: 20px - padding-left: 12px - &>.children - display: none - &.open>.children - display: block - .file - padding-left: 24px - display: block - text-decoration: none - &>.dir - padding-left: 0 - -#headings - .heading a - text-decoration: none - padding-left: 10px - display: block - .h1 - padding-left: 0 - margin-top: 10px - font-size: 1.3em - .h2 - padding-left: 10px - margin-top: 8px - font-size: 1.1em - .h3 - padding-left: 20px - margin-top: 5px - font-size: 1em - .h4 - padding-left: 30px - margin-top: 3px - font-size: 0.9em - .h5 - padding-left: 40px - margin-top: 1px - font-size: 0.8em - .h6 - padding-left: 50px - font-size: 0.75em - -#sidebar-toggle - position: fixed - top: 0 - left: 0 - width: 5px - bottom: 0 - z-index: 2 - cursor: pointer - &:hover - width: 10px - -.slidey - #sidebar-toggle, #container - -webkit-transition: all 250ms linear - -moz-transition: all 250ms linear - -ms-transition: all 250ms linear - -o-transition: all 250ms linear - transition: all 250ms linear - -.sidebar #sidebar-toggle - left: 290px - -#container - position: fixed - left: 5px - right: 0 - top: 0 - bottom: 0 - overflow: auto - -.sidebar #container - left: 295px - - -.no-sidebar - #sidebar_wrapper, #sidebar-toggle - display: none - #container - left: 0 - -#page - padding-top: 40px - -table td - border: 0 - outline: 0 - -.docs.markdown - padding: 10px 50px - -td.docs - max-width: 450px - min-width: 450px - min-height: 5px - padding: 10px 25px 1px 50px - overflow-x: hidden - vertical-align: top - text-align: left - -.docs - pre - margin: 15px 0 15px - padding: 5px - padding-left: 10px - border: 1px solid - font-size: 12px - overflow: auto - &.code_stats - font-size: 60% - p, li - tt, code - border: 1px solid - font-size: 12px - padding: 0 0.2em - -.dox - border-top: 1px solid - padding-top: 10px - padding-bottom: 10px - .details - padding: 10px - border: 1px solid - margin-bottom: 10px - .dox_tag_title - font-weight: bold - .dox_tag_detail - margin-left: 10px - span - margin-right: 5px - .dox_type - font-style: italic - .dox_tag_name - font-weight: bold - -.pilwrap - position: relative - padding-top: 1px - - .pilcrow - font: 12px Arial - text-decoration: none - color: #454545 - position: absolute - top: 3px - left: -20px - padding: 1px 2px - opacity: 0 - -webkit-transition: opacity 0.2s linear - -moz-transition: opacity 0.2s linear - -ms-transition: opacity 0.2s linear - -o-transition: opacity 0.2s linear - transition: opacity 0.2s linear - - &:hover .pilcrow - opacity: 1 - -td.code - padding: 8px 15px 8px 25px - width: 100% - vertical-align: top - border-left: 1px solid - -.background - border-left: 1px solid - position: absolute - z-index: -1 - top: 0 - right: 0 - bottom: 0 - left: 525px - -pre, tt, code - font-size: 12px - line-height: 18px - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace - margin: 0 - padding: 0 - white-space: pre-wrap - -.line-num - display: inline-block - width: 50px - text-align: right - opacity: 0.3 - margin-left: -20px - text-decoration: none - -/* All the stuff that can depend on colour scheme goes below here: - -=colorscheme($bg_color, $fg_color, $link_color) - $borders: mix($fg_color, $bg_color, 15) - body - background: $bg_color - color: mix($bg_color, $fg_color, 5) - a - color: $link_color - &:visited - color: $link_color - #sidebar_wrapper - background: mix($fg_color, $bg_color, 5) - #sidebar_switch - background: mix($fg_color, $bg_color, 8) - border-bottom-color: $borders - span - color: mix($bg_color, $fg_color, 4) - span:hover - background: mix($fg_color, $bg_color, 5) - .selected - background: mix($fg_color, $bg_color, 2) - color: $fg_color - #tree .file - color: $fg_color - #headings .heading a - color: $fg_color - #sidebar-toggle - background: mix($fg_color, $bg_color, 10) - &:hover - background: mix($fg_color, $bg_color, 15) - .docs - &.markdown - background: $bg_color - pre - border-color: $borders - p, li - tt, code - border-color: $borders - background: mix($fg_color, $bg_color, 5) - .highlight - background: mix($fg_color, $bg_color, 5) - color: auto - .dox - border-top-color: mix($bg_color, $borders, 25) - .details - background: mix($fg_color, $bg_color, 5) - border-color: $borders - .pilwrap .pilcrow - color: mix($bg_color, $fg_color, 10) - td.code, .background - border-left-color: $borders diff --git a/res/sass/autumn.sass b/res/sass/autumn.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/autumn.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/borland.sass b/res/sass/borland.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/borland.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/bw.sass b/res/sass/bw.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/bw.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/colorful.sass b/res/sass/colorful.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/colorful.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/default.sass b/res/sass/default.sass deleted file mode 100644 index 5123cbf..0000000 --- a/res/sass/default.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#fff, #252519, #261a3b) \ No newline at end of file diff --git a/res/sass/emacs.sass b/res/sass/emacs.sass deleted file mode 100644 index 5123cbf..0000000 --- a/res/sass/emacs.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#fff, #252519, #261a3b) \ No newline at end of file diff --git a/res/sass/friendly.sass b/res/sass/friendly.sass deleted file mode 100644 index 5123cbf..0000000 --- a/res/sass/friendly.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#fff, #252519, #261a3b) \ No newline at end of file diff --git a/res/sass/fruity.sass b/res/sass/fruity.sass deleted file mode 100644 index 45db95f..0000000 --- a/res/sass/fruity.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#000, #fff, #eee) \ No newline at end of file diff --git a/res/sass/manni.sass b/res/sass/manni.sass deleted file mode 100644 index 2f66908..0000000 --- a/res/sass/manni.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#fbffff, #252020, #261a3b) \ No newline at end of file diff --git a/res/sass/monokai.sass b/res/sass/monokai.sass deleted file mode 100644 index 84a74f4..0000000 --- a/res/sass/monokai.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(darken(#272822,5%), #eee, #bbb) \ No newline at end of file diff --git a/res/sass/murphy.sass b/res/sass/murphy.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/murphy.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/native.sass b/res/sass/native.sass deleted file mode 100644 index c8260ac..0000000 --- a/res/sass/native.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#151515, #fff, #eee) diff --git a/res/sass/pastie.sass b/res/sass/pastie.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/pastie.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/perldoc.sass b/res/sass/perldoc.sass deleted file mode 100644 index 1317945..0000000 --- a/res/sass/perldoc.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(lighten(#EED,5%), #252519, #261a3b) \ No newline at end of file diff --git a/res/sass/rrt.sass b/res/sass/rrt.sass deleted file mode 100644 index 45db95f..0000000 --- a/res/sass/rrt.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#000, #fff, #eee) \ No newline at end of file diff --git a/res/sass/tango.sass b/res/sass/tango.sass deleted file mode 100644 index 5123cbf..0000000 --- a/res/sass/tango.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#fff, #252519, #261a3b) \ No newline at end of file diff --git a/res/sass/trac.sass b/res/sass/trac.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/trac.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/sass/vim.sass b/res/sass/vim.sass deleted file mode 100644 index dad9825..0000000 --- a/res/sass/vim.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#070707, #fff, #eee) diff --git a/res/sass/vs.sass b/res/sass/vs.sass deleted file mode 100644 index ab7e6a8..0000000 --- a/res/sass/vs.sass +++ /dev/null @@ -1,3 +0,0 @@ -@import "base" - -+colorscheme(#f8f8ff, #252519, #261a3b) diff --git a/res/style.less b/res/style.less new file mode 100644 index 0000000..8801b0c --- /dev/null +++ b/res/style.less @@ -0,0 +1,367 @@ +@import (less) "COLOURSCHEME.css"; + +@borders: mix(@fg, @bg, 15%); + + +body { + font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; + font-size: 15px; + line-height: 22px; + margin: 0; + padding: 0; + background: mix(@fg, @bg, -10%); + color: mix(@bg, @fg, 5%); +} + +p, h1, h2, h3, h4, h5, h6 { + margin: 0 0 15px 0; +} + +h1 { + margin-top: 40px; +} + +a { + color: @link; + + &:visited { + color: @link; + } +} + +#tree, #headings { + position: absolute; + top: 30px; + left: 0; + bottom: 0; + width: 290px; + padding: 10px 0; + overflow: auto; +} + +#sidebar_wrapper { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 0; + overflow: hidden; + background: mix(@fg, @bg, 5%); +} + +#sidebar_switch { + position: absolute; + top: 0; + left: 0; + width: 290px; + height: 29px; + border-bottom: 1px solid; + background: mix(@fg, @bg, 8%); + border-bottom-color: @borders; + + span { + display: block; + float: left; + width: 50%; + text-align: center; + line-height: 29px; + cursor: pointer; + color: mix(@bg, @fg, 4%); + + &:hover { + background: mix(@fg, @bg, 5%); + } + } + + .selected { + font-weight: bold; + background: mix(@fg, @bg, 2%); + color: @fg; + } +} + +.slidey #sidebar_wrapper { + -webkit-transition: width 250ms linear; + -moz-transition: width 250ms linear; + -ms-transition: width 250ms linear; + -o-transition: width 250ms linear; + transition: width 250ms linear; +} + +.sidebar #sidebar_wrapper { + width: 290px; +} + +#tree { + .nodename { + text-indent: 12px; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: left center; + cursor: pointer; + } + .open > .nodename { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg=="); + background-position: left 7px; + } + .dir, .file { + position: relative; + min-height: 20px; + line-height: 20px; + padding-left: 12px; + + &>.children { + display: none; + } + &.open>.children { + display: block; + } + } + .file { + padding-left: 24px; + display: block; + text-decoration: none; + color: @fg; + } + &>.dir { + padding-left: 0; + } +} + +#headings { + .heading a { + text-decoration: none; + padding-left: 10px; + display: block; + color: @fg; + } + .h1 { + padding-left: 0; + margin-top: 10px; + font-size: 1.3em; + } + .h2 { + padding-left: 10px; + margin-top: 8px; + font-size: 1.1em; + } + .h3 { + padding-left: 20px; + margin-top: 5px; + font-size: 1em; + } + .h4 { + padding-left: 30px; + margin-top: 3px; + font-size: 0.9em; + } + .h5 { + padding-left: 40px; + margin-top: 1px; + font-size: 0.8em; + } + .h6 { + padding-left: 50px; + font-size: 0.75em; + } +} + +#sidebar-toggle { + position: fixed; + top: 0; + left: 0; + width: 5px; + bottom: 0; + z-index: 2; + cursor: pointer; + background: mix(@fg, @bg, 10%); + + &:hover { + width: 10px; + background: mix(@fg, @bg, 15%); + } +} + +.slidey { + #sidebar-toggle, #container { + -webkit-transition: all 250ms linear; + -moz-transition: all 250ms linear; + -ms-transition: all 250ms linear; + -o-transition: all 250ms linear; + transition: all 250ms linear; + } +} + +.sidebar #sidebar-toggle { + left: 290px; +} + +#container { + position: fixed; + left: 5px; + right: 0; + top: 0; + bottom: 0; + overflow: auto; +} + +.sidebar #container { + left: 295px; +} + + +.no-sidebar { + #sidebar_wrapper, #sidebar-toggle { + display: none; + } + #container { + left: 0; + } +} + +#page { + padding-top: 40px; +} + +table td { + border: 0; + outline: 0; +} + +.docs.markdown { + padding: 10px 50px; +} + +td.docs { + max-width: 450px; + min-width: 450px; + min-height: 5px; + padding: 10px 25px 1px 50px; + overflow-x: hidden; + vertical-align: top; + text-align: left; +} + +.docs { + pre { + margin: 15px 0 15px; + padding: 5px; + padding-left: 10px; + border: 1px solid @borders; + background: @bg; + font-size: 12px; + overflow: auto; + &.code_stats { + font-size: 60%; + } + } + p, li { + tt, code { + border: 1px solid @borders; + font-size: 12px; + padding: 0 0.2em; + background: mix(@fg, @bg, 5%); + } + } +} + +.dox { + border-top: 1px solid mix(@bg, @borders, 25%); + padding-top: 10px; + padding-bottom: 10px; + + .details { + padding: 10px; + background: @bg; + border: 1px solid @borders; + margin-bottom: 10px; + } + .dox_tag_title { + font-weight: bold; + } + .dox_tag_detail { + margin-left: 10px; + + span { + margin-right: 5px; + } + } + .dox_type { + font-style: italic; + } + .dox_tag_name { + font-weight: bold; + } +} + +.pilwrap { + position: relative; + padding-top: 1px; + + .pilcrow { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -ms-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + color: mix(@bg, @fg, 10%); + + &:before { + content: '\b6'; + } + } + + &:hover .pilcrow { + opacity: 1; + } +} + +td.code { + padding: 8px 15px 8px 25px; + width: 100%; + vertical-align: top; + border-left: 1px solid @borders; + background: @bg; +} + +.background { + border-left: 1px solid @borders; + position: absolute; + z-index: -1; + top: 0; + right: 0; + bottom: 0; + left: 525px; + background: @bg; +} + +pre, tt, code { + font-size: 12px; + line-height: 18px; + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; + margin: 0; + padding: 0; + white-space: pre-wrap; + background: @bg; +} + +.line-num { + display: inline-block; + width: 50px; + text-align: right; + opacity: 0.3; + margin-left: -20px; + text-decoration: none; + color: @comment; + + &:before { + content: attr(data-line); + } +} diff --git a/res/tmpl.jst b/res/tmpl.ejs similarity index 88% rename from res/tmpl.jst rename to res/tmpl.ejs index 9a04312..bdabc09 100644 --- a/res/tmpl.jst +++ b/res/tmpl.ejs @@ -6,7 +6,7 @@ <% for(var i = 0; i < js.length; i += 1){ %> @@ -33,7 +33,7 @@
    - <%= content %> + <%- content %>
    diff --git a/src/docker.js b/src/docker.js index 4b3d819..8b5d168 100644 --- a/src/docker.js +++ b/src/docker.js @@ -1,99 +1,35 @@ -// # docker.js -// ### _A simple documentation generator based on [docco](http://jashkenas.github.com/docco/)_ -// **Docker** is a really simple documentation generator, which originally started out as a -// pure-javascript port of **docco**, but which eventually gained many extra little features -// which somewhat break docco's philosophy of being a quick-and-dirty thing. -// -// Docker source-code can be found on [GitHub](https://github.com/jbt/docker) -// -// Take a look at the [original docco project](http://jashkenas.github.com/docco/) to get a feel -// for the sort of functionality this provides. In short: **Markdown**-based displaying of code comments -// next to syntax-highlighted code. This page is the result of running docker against itself. -// -// The command-line usage of docker is somewhat more useful than that of docco. To use, simply run -// -// ```sh -// ./docker -i path/to/code -o path/to/docs [a_file.js a_dir] -// ``` -// -// Docker will then recurse into the code root directory (or alternatively just the files -// and directories you specify) and document-ize all the files it can. -// The folder structure will be preserved in the document root. -// -// More detailed usage instructions and examples can be found in the [README](../README.md.html) -// -// ## Differences from docco -// The main differences from docco are: -// -// - **jsDoc support**: support for **jsDoc**-style code comments, which -// is provided in a style similar to [Dox](https://github.com/visionmedia/dox). You can see some examples of -// the sort of output you get below. -// -// - **Folder Tree** and **Heading Navigation**: collapsible sidebar with folder tree and jump-to -// heading links for easy navigation between many files and within long files. -// -// - **Markdown File Support**: support for plain markdown files, like the [README](../README.md.html) for this project. -// -// - **Colour Schemes**: support for multiple output colour schemes -// -// -// So let's get started! - - -// ## Node Modules -// Include all the necessay node modules. -var mkdirp = require('mkdirp'), - fs = require('fs'), - os = require('os'), - path = require('path'), - exec = require('child_process').exec, - spawn = require('child_process').spawn, - watchr = require('watchr'), - pygmentize = require('pygmentize-bundled'), - showdown = require('../lib/showdown').Showdown; - - -// Polyfill `fs.exists` for node <= 0.6 -if(typeof fs.exists != 'function') fs.exists = path.exists; - -/** - * ## Docker Constructor - * - * Creates a new docker instance. All methods are called on one instance of this object. - * - * Input arguments are either - * - * * Object containing any of the keys `inDir`, `outDir`, `onlyUpdated`, `colourScheme`, `ignoreHidden`, `sidebarState`, `exclude` - * * Or `indir`, `outDir`, `onlyUpdated`, `colourScheme` and `ignoreHidden` in order - */ -var Docker = module.exports = function( /* inDir, outDir, onlyUpdated, colourScheme, ignoreHidden */ ){ +var stripIndent = require('strip-indent'); +var MarkdownIt = require('markdown-it'); +var highlight = require('highlight.js'); +var repeating = require('repeating'); +var mkdirp = require('mkdirp'); +var extend = require('extend'); +var watchr = require('watchr'); +var async = require('async'); +var path = require('path'); +var less = require('less'); +var ejs = require('ejs'); +var fs = require('fs'); + +var languages = require('./languages'); +var parseMultiline = require('./parseMultiLine'); + +var md = new MarkdownIt({ + html: true, + langPrefix: '', + highlight: function (str, lang) { + if (lang && highlight.getLanguage(lang)) { + try { + return highlight.highlight(lang, str).value; + } catch (__) {} + } - if(typeof arguments[0] === 'object'){ - this.parseOpts(arguments[0]); - }else{ - this.parseOpts({ - inDir: arguments[0], - outDir: arguments[1], - onlyUpdated: arguments[2], - colourScheme: arguments[3], - ignoreHidden: arguments[4] - }); + return ''; // use external default escaping } - this.running = false; - this.scanQueue = []; - this.files = []; - this.tree = {}; -}; +}); -/** - * ## Docker.prototype.parseOpts - * - * Parses options for this docker instance - * - * @param {object} opts Object containing all options fo rthis instance - */ -Docker.prototype.parseOpts = function(opts){ - var defaults = { +var Docker = module.exports = function(opts){ + opts = this.options = extend({ inDir: path.resolve('.'), outDir: path.resolve('doc'), onlyUpdated: false, @@ -106,30 +42,11 @@ Docker.prototype.parseOpts = function(opts){ js: [], css: [], extras: [] - }; + }, opts); - // Loop through and fix up any unspecified options with the defaults. - for(var i in defaults){ - if(defaults.hasOwnProperty(i) && typeof opts[i] === 'undefined'){ - opts[i] = defaults[i]; - } - } - - this.inDir = opts.inDir.replace(/\/$/,''); - this.outDir = opts.outDir; - this.onlyUpdated = !!opts.onlyUpdated; - this.colourScheme = opts.colourScheme; - this.ignoreHidden = !!opts.ignoreHidden; - this.sidebarState = opts.sidebarState; - this.lineNums = !!opts.lineNums; - this.extraJS = opts.js || []; - this.extraCSS = opts.css || []; - this.multiLineOnly = !!opts.multiLineOnly; - - // Generate an exclude regex for the given pattern if(typeof opts.exclude === 'string'){ this.excludePattern = new RegExp('^(' + - opts.exclude.replace(/\./g,'\\.') + opts.exclude.replace(/\./g, '\\.') .replace(/\*/g, '.*') .replace(/,/g, '|') + ')(/|$)'); @@ -137,45 +54,20 @@ Docker.prototype.parseOpts = function(opts){ this.excludePattern = false; } - // Oh go on then. Allow American-Enligsh spelling of colour if used programmatically - if(opts.colorScheme) opts.colourScheme = opts.colorScheme; + this.tree = {}; - // Load bundled extras var extrasRoot = path.resolve(__dirname, '..', 'extras'); for(var i = 0; i < opts.extras.length; i += 1){ var extraName = opts.extras[i]; - this.extraJS.push(path.join(extrasRoot, extraName, extraName + '.js')); - this.extraCSS.push(path.join(extrasRoot, extraName, extraName + '.css')); + opts.js.push(path.join(extrasRoot, extraName, extraName + '.js')); + opts.css.push(path.join(extrasRoot, extraName, extraName + '.css')); } }; -/** - * ## Docker.prototype.doc - * - * Generate documentation for a bunch of files - * - * @this Docker - * @param {Array} files Array of file paths relative to the `inDir` to generate documentation for. - */ Docker.prototype.doc = function(files){ - this.running = true; - [].push.apply(this.scanQueue, files); - - var self = this; - if(this.onlyUpdated){ - // Attempt to grab the existing tree if possible. - fs.readFile(path.join(self.outDir, 'doc-filelist.js'), function(err, file){ - if(err) return self.addNextFile(); - - file = file.toString().replace(/(^var tree=|;$)/g,''); - self.tree = JSON.parse(file); - - self.addNextFile(); - }); - }else{ - this.addNextFile(); - } + this.files = files.concat(); + if(!this.running) this.run(); }; /** @@ -194,15 +86,12 @@ Docker.prototype.watch = function(files){ var uto = false, self = this; function update(){ if(self.running) return (uto = setTimeout(update, 250)); - self.clean(); self.doc(self.watchFiles); uto = false; } - // Install watchr. The `null` here is a watchr bug - looks like he forgot to allow for exactly - // two arguments (like in his example) watchr.watch({ - path: this.inDir, + path: this.options.inDir, listener: function(){ if(!uto) uto = setTimeout(update, 250); } @@ -212,200 +101,89 @@ Docker.prototype.watch = function(files){ this.doc(files); }; -/** - * ## Docker.prototype.finished - * - * Callback function fired when processing is finished. - */ -Docker.prototype.finished = function(){ - this.running = false; - if(this.watching){ - // If we're in watch mode, switch "only updated files" mode on if it isn't already - this.onlyUpdated = true; - console.log('Done. Waiting for changes...'); - }else{ - console.log('Done.'); - } -}; - -/** - * ## Docker.prototype.clean - * - * Clears out any instance variables so this docker can be rerun - */ -Docker.prototype.clean = function(){ - this.scanQueue = []; - this.files = []; +Docker.prototype.run = function(){ + var self = this; + this.running = true; + async.whilst( + function(){ return self.files.length > 0; }, + function(cb){ + self.process(self.files.shift(), cb); + }, + function(){ + self.running = false; + self.copySharedResources(); + } + ); }; -/** - * ## Docker.prototype.addNextFile - * - * Process the next file on the scan queue. If it's a directory, list all the children and queue those. - * If it's a file, add it to the queue. - */ -Docker.prototype.addNextFile = function(){ - if(this.scanQueue.length > 0){ - var self = this, filename = this.scanQueue.shift(); - if(this.excludePattern && this.excludePattern.test(filename)){ - this.addNextFile(); - return; - } - var currFile = path.resolve(this.inDir, filename); - fs.lstat(currFile, function cb(err, stat){ - if(err){ - // Something unexpected happened on the filesystem. - // Nothing really that we can do about it, so throw it and be done with it - throw err; - } +Docker.prototype.process = function(file, cb){ - if(stat && stat.isSymbolicLink()){ - fs.readlink(currFile, function(err, link){ - if(err){ - // Something unexpected happened on the filesystem. - // Nothing really that we can do about it, so throw it and be done with it - throw err; - } - currFile = path.resolve(path.dirname(currFile), link); - fs.exists(currFile, function(exists){ - if(!exists){ - console.error("Unable to follow symlink to " + currFile + ': file does not exist'); - self.addNextFile(); - }else{ - fs.lstat(currFile, cb); - } - }); - }); - }else if(stat && stat.isDirectory()){ - // Find all children of the directory and queue those - fs.readdir(path.resolve(self.inDir, filename), function(err, list){ - if(err){ - // Something unexpected happened on the filesystem. - // Nothing really that we can do about it, so throw it and be done with it - throw err; - } - for(var i = 0; i < list.length; i += 1){ - if(self.ignoreHidden && list[i].charAt(0).match(/[\._]/)) continue; - self.scanQueue.push(path.join(filename, list[i])); - } - self.addNextFile(); - }); - }else{ - self.queueFile(filename); - self.addNextFile(); - } - }); - }else{ - // Once we're done scanning all the files, start processing them in order. - this.files = this.files.sort(); - this.processNextFile(); + if(this.excludePattern && this.excludePattern.test(file)){ + cb(); + return; } -}; -/** - * ## Docker.prototype.queueFile - * - * Queues a file for processing, and additionally stores it in the folder tree - * - * @param {string} filename Name of the file to queue - */ -Docker.prototype.queueFile = function(filename){ - this.files.push(filename); -}; + var self = this; -/** - * ## Docker.prototype.addFileToFree - * - * Adds a file to the file tree to show in the sidebar. This used to be in `queueFile` but - * since we're now only deciding whether or not the file can be included at the point of - * reading it, this has to happen later. - * - * @param {string} filename Name of file to add to the tree - */ -Docker.prototype.addFileToTree = function(filename){ - var pathSeparator = path.join('a', 'b').replace(/(^.*a|b.*$)/g, ''); + var resolved = path.resolve(this.options.inDir, file); + fs.lstat(resolved, function lstatCb(err, stat){ + if(err) return cb(err); - // Split the file's path into the individual directories - filename = filename.replace(new RegExp('^' + pathSeparator.replace(/([\/\\])/g, '\\$1')),''); - var bits = filename.split(pathSeparator); + if(stat && stat.isSymbolicLink()){ + fs.readlink(resolved, function(err, link){ + if(err) return cb(err); - // Loop through all the directories and process the folder structure into `this.tree`. - // - // `this.tree` takes the format: - // ```js - // { - // dirs: { - // 'child_dir_name': { /* same format as tree */ }, - // 'other_child_name': // etc... - // }, - // files: [ - // 'filename.js', - // 'filename2.js', - // // etc... - // ] - // } - // ``` - var currDir = this.tree; - for(var i = 0; i < bits.length - 1; i += 1){ - if(!currDir.dirs) currDir.dirs = {}; - if(!currDir.dirs[bits[i]])currDir.dirs[bits[i]] = {}; - currDir = currDir.dirs[bits[i]]; - } - if(!currDir.files) currDir.files = []; + resolved = path.resolve(path.dirname(resolved), link); - var lastBit = bits[bits.length-1]; + fs.exists(resolved, function(exists){ + if(!exists){ + // TODO nice error + cb(null); + }else{ + fs.lstat(resolved, lstatCb); + } + }); + }); + }else if(stat && stat.isDirectory()){ + fs.readdir(resolved, function(err, list){ + if(err) return cb(err); - if(currDir.files.indexOf(lastBit) === -1) currDir.files.push(bits[bits.length-1]); + list.forEach(function(f){ + if(self.options.ignoreHidden && f.charAt(0).match(/[\._]/)) return; + self.files.push(path.join(file, f)); + }); + cb(); + }); + }else{ + self.processFile(file, cb); + } + }); }; -/** - * ## Docker.prototype.processNextFile - * - * Take the next file off the queue and process it - */ -Docker.prototype.processNextFile = function(){ +Docker.prototype.processFile = function(file, cb){ + var resolved = path.resolve(this.options.inDir, file); var self = this; - // If we still have files on the queue, process the first one - if(this.files.length > 0){ - this.generateDoc(this.files.shift(), function(){ - self.processNextFile(); - }); - }else{ - this.copySharedResources(); - } -}; - -/** - * ## Docker.prototype.generateDoc - * ### _This is where the magic happens_ - * - * Generate the documentation for a file - * - * @param {string} filename File name to generate documentation for - * @param {function} cb Callback function to execute when we're done - */ -Docker.prototype.generateDoc = function(infilename, cb){ - var self = this; - this.running = true; - filename = path.resolve(this.inDir, infilename); - this.decideWhetherToProcess(filename, function(shouldProcess){ + this.decideWhetherToProcess(resolved, function(shouldProcess){ if(!shouldProcess) return cb(); - fs.readFile(filename, 'utf-8', function(err, data){ - if(err) throw err; - var lang = self.languageParams(filename, data); + + fs.readFile(resolved, 'utf-8', function(err, data){ + if(err) return cb(err); + + var lang = self.detectLanguage(resolved, data); if(lang === false) return cb(); - self.addFileToTree(infilename); - switch(self.languages[lang].type){ + + self.addFileToTree(file); + + switch(lang.type){ case 'markdown': - self.renderMarkdownHtml(data, filename, cb); + self.renderMarkdownFile(data, resolved, cb); break; default: case 'code': var sections = self.parseSections(data, lang); - self.highlight(sections, lang, function(){ - self.renderCodeHtml(sections, filename, cb); - }); + self.highlight(sections, lang); + self.renderCodeFile(sections, lang, resolved, cb); break; } }); @@ -428,7 +206,7 @@ Docker.prototype.generateDoc = function(infilename, cb){ Docker.prototype.decideWhetherToProcess = function(filename, callback){ // If we should be processing all files, then yes, we should process this one - if(!this.onlyUpdated) return callback(true); + if(!this.options.onlyUpdated) return callback(true); // Find the doc this file would be compiled to var outFile = this.outFile(filename); @@ -459,63 +237,159 @@ Docker.prototype.fileIsNewer = function(file, otherFile, callback){ }); }; -/** - * ## Docker.prototype.parseSections - * - * Parse the content of a file into individual sections. - * A section is defined to be one block of code with an accompanying comment - * - * Returns an array of section objects, which take the form - * ```js - * { - * doc_text: 'foo', // String containing comment content - * code_text: 'bar' // Accompanying code - * } - * ``` - * @param {string} data The contents of the script file - * @param {string} language The language of the script file - - * @return {Array} array of section objects - */ -Docker.prototype.parseSections = function(data, language){ - var codeLines = data.split('\n'); - var sections = []; - // Fetch language-specific parameters for this code file - var params = this.languages[language]; +Docker.prototype.addFileToTree = function(filename){ + // Split the file's path into the individual directories + filename = filename.replace(new RegExp('^' + path.sep.replace(/([\/\\])/g, '\\$1')), ''); + var bits = filename.split(path.sep); + + // Loop through all the directories and process the folder structure into `this.tree`. + // + // `this.tree` takes the format: + // ```js + // { + // dirs: { + // 'child_dir_name': { /* same format as tree */ }, + // 'other_child_name': // etc... + // }, + // files: [ + // 'filename.js', + // 'filename2.js', + // // etc... + // ] + // } + // ``` + var currDir = this.tree; + for(var i = 0; i < bits.length - 1; i += 1){ + if(!currDir.dirs) currDir.dirs = {}; + if(!currDir.dirs[bits[i]]) currDir.dirs[bits[i]] = {}; + currDir = currDir.dirs[bits[i]]; + } + if(!currDir.files) currDir.files = []; + + var lastBit = bits[bits.length - 1]; + + if(currDir.files.indexOf(lastBit) === -1) currDir.files.push(lastBit); +}; + + +Docker.prototype.detectLanguage = function(filename, contents){ + + // First try to detect the language from the file extension + var ext = path.extname(filename); + ext = ext.replace(/^\./, ''); + + // Bit of a hacky way of incorporating .C for C++ + if(ext === '.C') return languages.cpp; + ext = ext.toLowerCase(); + + var base = path.basename(filename); + base = base.toLowerCase(); + + for(var i in languages){ + if(!languages.hasOwnProperty(i)) continue; + if(languages[i].extensions && + languages[i].extensions.indexOf(ext) !== -1) return languages[i]; + if(languages[i].names && + languages[i].names.indexOf(base) !== -1) return languages[i]; + } + + // If that doesn't work, see if we can grab a shebang + + var shebangRegex = /^\n*#!\s*(?:\/usr\/bin\/env)?\s*(?:[^\n]*\/)*([^\/\n]+)(?:\n|$)/; + var match = shebangRegex.exec(contents); + if(match){ + for(var j in languages){ + if(!languages.hasOwnProperty(j)) continue; + if(languages[j].executables && languages[j].executables.indexOf(match[1]) !== -1) return languages[j]; + } + } + + // If we still can't figure it out, give up and return false. + return false; +}; + +Docker.prototype.renderMarkdownFile = function(data, filename, cb){ + var content = md.render(data); + + var headings = []; + + // Add anchors to all headings + content = this.addAnchors(content,0, headings); + + // Wrap up with necessary classes + content = '
    ' + content + '
    '; + + // Decide which path to store the output on. + var outFile = this.outFile(filename); + + // Calculate the location of the input root relative to the output file. + // This is necessary so we can link to the stylesheet in the output HTML using + // a relative href rather than an absolute one + var outDir = path.dirname(outFile); + var relativeOut = path.resolve(outDir) + .replace(path.resolve(this.options.outDir),'') + .replace(/^[\/\\]/,''); + var levels = relativeOut == '' ? 0 : relativeOut.split(path.sep).length; + var relDir = Array(levels + 1).join('../'); + + // Render the html file using our template + var html = this.renderTemplate('tmpl', { + title: path.basename(filename), + relativeDir: relDir, + content: content, + headings: headings, + sidebar: this.options.sidebarState, + filename: filename.replace(this.options.inDir,'').replace(/^[\\\/]/,''), + js: this.options.js.map(path.basename), + css: this.options.css.map(path.basename) + }); + + // Recursively create the output directory, clean out any old version of the + // output file, then save our new file. + this.writeFile(outFile, html, 'Generated: ' + outFile.replace(this.options.outDir, ''), cb); +}; + +Docker.prototype.parseSections = function(data, lang){ + var lines = data.split('\n'); + var section = { docs: '', code: '' }; + + var sections = []; + var inMultiLineComment = false; var multiLine = ''; var jsDocData; - function md(a, stripParas){ - var h = showdown.makeHtml(a.replace(/(^\s*|\s*$)/,'')); + var commentRegex = new RegExp('^\\s*' + lang.comment + '\\s?'); + + var self = this; + + + function mark(a, stripParas){ + var h = md.render(a.replace(/(^\s*|\s*$)/,'')); return stripParas ? h.replace(/<\/?p>/g,'') : h; } - var commentRegex = new RegExp('^\\s*' + params.comment + '\\s?'); - - // Loop through all the lines, and parse into sections - for(var i = 0; i < codeLines.length; i += 1){ - var line = codeLines[i]; + lines.forEach(function(line, i){ // Only match against parts of the line that don't appear in strings var matchable = line.replace(/(["'])((?:[^\\\1]|(?:\\\\)*?\\[^\\])*?)\1/g,'$1$1'); - if(params.literals) { - params.literals.forEach(function(replace){ + if(lang.literals) { + lang.literals.forEach(function(replace){ matchable = matchable.replace(replace[0], replace[1]); }); } - if(params.multiLine){ + if(lang.multiLine){ // If we are currently in a multiline comment, behave differently if(inMultiLineComment){ // End-multiline comments should match regardless of whether they're 'quoted' - if(line.match(params.multiLine[1])){ + if(line.match(lang.multiLine[1])){ // Once we have reached the end of the multiline, take the whole content // of the multiline comment, and parse it as jsDoc. inMultiLineComment = false; @@ -533,21 +407,21 @@ Docker.prototype.parseSections = function(data, language){ // outdented properly */ // ``` multiLine = multiLine - .replace(params.multiLine[0], function(a){ return Array(a.length + 1).join(' '); }) - .replace(params.multiLine[1], function(a){ return Array(a.length + 1).join(' '); }); + .replace(lang.multiLine[0], function(a){ return repeating(' ', a.length); }) + .replace(lang.multiLine[1], function(a){ return repeating(' ', a.length); }); - multiLine = this.outdent(multiLine); + multiLine = stripIndent(multiLine); - if(params.jsDoc){ + if(lang.jsDoc){ // Strip off leading * characters. multiLine = multiLine.replace(/^[ \t]*\*? ?/gm, ""); - jsDocData = this.parseMultiline(multiLine); + jsDocData = parseMultiline(multiLine); // Put markdown parser on the data so it can be accessed in the template - jsDocData.md = md; - section.docs += this.jsDocTemplate(jsDocData); + jsDocData.md = mark; + section.docs += self.renderTemplate('jsDoc', jsDocData); }else{ section.docs += '\n' + multiLine + '\n'; } @@ -555,7 +429,7 @@ Docker.prototype.parseSections = function(data, language){ }else{ multiLine += line + '\n'; } - continue; + return; }else if( // We want to match the start of a multiline comment only if the line doesn't also match the // end of the same comment, or if a single-line comment is started before the multiline @@ -563,9 +437,9 @@ Docker.prototype.parseSections = function(data, language){ // ```js // alert('foo'); // Alert some foo /* Random open comment thing // ``` - matchable.match(params.multiLine[0]) && - !matchable.replace(params.multiLine[0],'').match(params.multiLine[1]) && - (!params.comment || !matchable.split(params.multiLine[0])[0].match(commentRegex)) + matchable.match(lang.multiLine[0]) && + !matchable.replace(lang.multiLine[0],'').match(lang.multiLine[1]) && + (!lang.comment || !matchable.split(lang.multiLine[0])[0].match(commentRegex)) ){ // Here we start parsing a multiline comment. Store away the current section and start a new one if(section.code){ @@ -574,14 +448,14 @@ Docker.prototype.parseSections = function(data, language){ } inMultiLineComment = true; multiLine = line + "\n"; - continue; + return; } } if( - !this.multiLineOnly && - params.comment && + !self.options.multiLineOnly && + lang.comment && matchable.match(commentRegex) && - (!params.commentsIgnore || !matchable.match(params.commentsIgnore)) && + (!lang.commentsIgnore || !matchable.match(lang.commentsIgnore)) && !matchable.match(/#!/) ){ // This is for single-line comments. Again, store away the last section and start a new one @@ -590,7 +464,7 @@ Docker.prototype.parseSections = function(data, language){ section = { docs: '', code: '' }; } section.docs += line.replace(commentRegex, '') + '\n'; - }else if(!params.commentsIgnore || !line.match(params.commentsIgnore)){ + }else if(!lang.commentsIgnore || !line.match(lang.commentsIgnore)){ // If this is the first line of active code, store it in the section // so we can grab it for line numbers later @@ -599,586 +473,135 @@ Docker.prototype.parseSections = function(data, language){ } section.code += line + '\n'; } - } + }); + sections.push(section); return sections; }; -/** - * ## Docker.prototype.parseMultline - * - * Parse a multiline comment for jsDoc à la [dox](https://github.com/visionmedia/dox) - * - * @param {string} comment The comment to parse - * @return {object} Object containing parsed comment data - */ -Docker.prototype.parseMultiline = function(comment){ - var commentData = { tags: [], description: {} }; - - if(!/^\s*@/.test(comment)){ - - // Split out a summary and body from the comment - var full = comment.split('\n@')[0]; +Docker.prototype.highlight = function(sections, lang){ + sections.forEach(function(section){ + section.codeHtml = highlight.highlight(lang.language, section.code).value; + section.docHtml = md.render(section.docs); + }); +}; - commentData.description.summary = full.split(/\n\s*\n\s*/)[0]; - commentData.description.body = full.split(/\n\s*\n\s*/).slice(1).join('\n\n'); +Docker.prototype.renderCodeFile = function(sections, language, filename, cb){ + // Decide which path to store the output on. + var outFile = this.outFile(filename); - }else{ + // Calculate the location of the input root relative to the output file. + // This is necessary so we can link to the stylesheet in the output HTML using + // a relative href rather than an absolute one + var outDir = path.dirname(outFile); + var relativeOut = path.resolve(outDir) + .replace(path.resolve(this.options.outDir),'') + .replace(/^[\/\\]/,''); + var levels = relativeOut === '' ? 0 : relativeOut.split(path.sep).length; + var relDir = repeating('../', levels); - // If the comment starts with a tag, do nothing - commentData.description.summary = ''; - commentData.description.body = ''; - } + var self = this; + var headings = []; - // grabType function grabs the type out of an array of space-separated - // bits, so for example we can pick up {string, optional} from the beginning - // of a tag. `bits` is passed in as an array so we can shift and unshift - // to remove the type from it. - function grabType(bits){ - var type = bits.shift(); - var badChars = /[&<>"'`]/g; - var escape = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" - }; - - // Carry on adding bits until we reach a closing brace - while(bits.length && type.indexOf('}') === -1) type += bits.shift(); - - // If for whatever reason the tag was of the format {type}blah without - // the trailing space after the }, extract whatever was left over and - // put it back onto the bits array. - if(!/\}$/.test(type)){ - bits.unshift(type.replace(/^.*\}(.*)$/, '$1')); - type = type.replace(/\}.*$/,'}'); - } + sections.forEach(function(section, i){ + section.docHtml = self.addAnchors(section.docHtml, i, headings); - function escapeChar(chr) { - return escape[chr] || "&"; + if(self.options.lineNums){ + section.codeHtml = self.addLineNumbers(section.codeHtml, section.firstCodeLine); } + }); - type = type.replace(badChars, escapeChar); + var content = this.renderTemplate('code', { + title: path.basename(filename), + sections: sections, + language: language.language + }); - return type.replace(/[{}]/g,''); - } + var html = this.renderTemplate('tmpl', { + title: path.basename(filename), + relativeDir: relDir, + content: content, + headings: headings, + sidebar: this.options.sidebarState, + filename: filename.replace(this.options.inDir, '').replace(/^[\/\\]/, ''), + js: this.options.js.map(path.basename), + css: this.options.css.map(path.basename) + }); - // Prepend a newline here in case the comment starts with a tag - comment = '\n' + comment; - - // If we have jsDoc-style parameters, parse them - if(comment.indexOf('\n@') !== -1){ - var tags = comment.split('\n@').slice(1); - - // Loop through all of the tags and process the ones we support - commentData.tags = tags.map(function(line){ - var bits = line.split(' '), tag = {}; - var tagType = tag.type = bits.shift(); - - switch(tagType){ - case 'arg': - case 'argument': - case 'param': - // `@param {typename} paramname Parameter description` - if(bits[0].charAt(0) == '{') tag.types = grabType(bits).split(/ *[|,\/] */); - tag.name = bits.shift() || ''; - tag.description = bits.join(' '); - tag.type = 'param'; - break; - case 'returns': - case 'return': - // `@return {typename} Return description` - if(bits[0].charAt(0) == '{') tag.types = grabType(bits).split(/ *[|,\/] */); - tag.description = bits.join(' '); - tag.type = 'return'; - break; + this.writeFile(outFile, html, 'Generated: ' + outFile.replace(this.options.outDir, ''), cb); +}; - case 'type': - // `@type {typename}` - tag.types = grabType(bits).split(/ *[|,\/] */); - break; +Docker.prototype.renderTemplate = function(templateName, obj){ + if(!this._templates) this._templates = {}; + if(!this._templates[templateName]){ + var tmplFile = path.join(__dirname, '..', 'res', templateName + '.ejs'); + this._templates[templateName] = ejs.compile(fs.readFileSync(tmplFile).toString()); + } + return this._templates[templateName](obj); +}; - case 'access': - case 'api': - // `@api public` or `@api private` etc. - tag.visibility = bits.shift(); - tag.type = 'api'; - break; - - case 'private': - case 'protected': - case 'public': - // `@public` or `@private` etc. - tag.visibility = tagType; - tag.type = 'api'; - break; - - case 'see': - // `@see Title http://url` or `@see local place` - if(/http/.test(line)){ - tag.title = bits.length > 1 ? bits.shift() : ''; - tag.url = bits.join(' '); - }else{ - tag.local = bits.join(' '); - } - break; - default: - if(bits.length > 0 && bits[0].charAt(0) == '{') tag.types = grabType(bits).split(/ *[|,\/] */); - tag.description = bits.join(' '); - tag.name = tagType; - tag.type = 'unknown'; - } - - return tag; - }); - } - - return commentData; -}; - -/** - * ## Docker.prototype.outdent - * - * Attempts to automatically detect indented lines in multiline comments - * and bring them back to normal indentation level. This is to avoid markdown - * picking up indented lines and thinking they're code - * - * @param {string} code The code to attempt to outdent - * @return {string} Outdented code - */ -Docker.prototype.outdent = function(code){ - var lines = code.split('\n'); - var tabWidth = 2; - var smallestIndent = Infinity; - - // Loop through all the lines, finding the least-indented of all of them - for(var i = 0; i < lines.length; i += 1){ - var line = lines[i].replace(/\t/g, Array(tabWidth+1).join(' ')); - if(/^\s$/.test(line)) continue; - var lineIndent = 0; - while(line.length && line.charAt(0) == ' '){ - line = line.slice(1); - lineIndent += 1; - } - - // If the line consists entirely of whitespace, don't factor it into - // the calculation (editors that trim trailing whitespace may make the - // line shorter) - if(line.length) smallestIndent = Math.min(lineIndent, smallestIndent); - } - - // This should only happen if the input code was entirely - // whitespace, which should never be the case - if(!isFinite(smallestIndent)) smallestIndent = 0; - - // Now loop over lines again and outdent them by the largest possible amount - var outLines = []; - - for(var j = 0; j < lines.length; j += 1){ - var line = lines[j].replace(/\t/g, Array(tabWidth+1).join(' ')); - - // If the line was smaller than the smallestIndent it's because - // it was entirely whitespace anyway, so we're safe to do this. - outLines.push(line.substr(smallestIndent)); - } - - return outLines.join('\n'); -}; - -/** - * ## Docker.prototype.languageParams - * - * Provides language-specific params for a given file name. - * - * @param {string} filename The name of the file to test - * @param {string} filedata The contents of the file (to check for shebang) - * @return {object} Object containing all of the language-specific params - */ -Docker.prototype.languageParams = function(filename, filedata){ - - // First try to detect the language from the file extension - var ext = path.extname(filename); - ext = ext.replace(/^\./, ''); - - // Bit of a hacky way of incorporating .C for C++ - if(ext === '.C') return 'cpp'; - ext = ext.toLowerCase(); - - var base = path.basename(filename); - base = base.toLowerCase(); - - for(var i in this.languages){ - if(!this.languages.hasOwnProperty(i)) continue; - if(this.languages[i].extensions && - this.languages[i].extensions.indexOf(ext) !== -1) return i; - if(this.languages[i].names && - this.languages[i].names.indexOf(base) !== -1) return i; - } - - // If that doesn't work, see if we can grab a shebang - - var shebangRegex = /^\n*#!\s*(?:\/usr\/bin\/env)?\s*(?:[^\n]*\/)*([^\/\n]+)(?:\n|$)/; - var match = shebangRegex.exec(filedata); - if(match){ - for(var j in this.languages){ - if(!this.languages.hasOwnProperty(j)) continue; - if(this.languages[j].executables && this.languages[j].executables.indexOf(match[1]) !== -1) return j; - } - } - - // If we still can't figure it out, give up and return false. - return false; -}; - - -// The language params can have the following keys: -// -// * `name`: Name of Pygments lexer to use -// * `comment`: String flag for single-line comments -// * `multiline`: Two-element array of start and end flags for block comments -// * `commentsIgnore`: Regex of comments to strip completely (don't even doc) -// * `jsDoc`: Whether to parse multiline comments as jsDoc -// * `type`: Either `'code'` (default) or `'markdown'` - format of page to render -// * `literals`: Array of match/replace pairs for literals to ignore for comment matching -// -// I'm not even going to pretend that this is an exhaustive list of -// languages that Pygments can understand. This is just a list of the most -// common ones I think are necessary. If you can think of another that -// might be useful, and can find it on the [Pygments lexer page](http://pygments.org/docs/lexers/), -// then let me know and I'll add it in -Docker.prototype.languages = { - javascript: { - extensions: [ 'js' ], - executables: [ 'node' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], commentsIgnore: /^\s*\/\/=/, jsDoc: true, - literals: [ - [ /\/(?![\*\/])((?:[^\\\/]|(?:\\\\)*?\\[^\\])*?)\//g, '/./' ] - ] - }, - coffeescript: { - extensions: [ 'coffee' ], - names: [ 'cakefile' ], - executables: [ 'coffee' ], - comment: '#', multiLine: [ /^\s*#{3}\s*$/m, /^\s*#{3}\s*$/m ], jsDoc: true, - literals: [ - [ /\/(?![\*\/])((?:[^\\\/]|(?:\\\\)*?\\[^\\])*?)\//g, '/./' ] - ] - }, - livescript: { - extensions: [ 'ls' ], - executables: [ 'lsc' ], - comment: '#', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - ruby: { - extensions: [ 'rb', 'rbw', 'rake', 'gemspec' ], - executables: [ 'ruby' ], - names: [ 'rakefile' ], - comment: '#', multiLine: [ /\=begin/, /\=end/ ] - }, - python: { - extensions: [ 'py' ], - executables: [ 'python' ], - comment: '#' // Python has no block commments :-( - }, - perl: { - extensions: [ 'pl', 'pm' ], - executables: [ 'perl' ], - comment: '#' // Nor (really) does perl. - }, - c: { - extensions: [ 'c', 'h' ], - executables: [ 'gcc' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - cpp: { - extensions: [ 'cc', 'cpp' ], - executables: [ 'g++' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - vbnet: { - extensions: [ 'vb', 'vbs', 'bas' ], - comment: "'" // No multiline - }, - 'aspx-vb': { - extensions: [ 'asp', 'aspx', 'asax', 'ascx', 'ashx', 'asmx', 'axd' ], - comment: "'" // No multiline - }, - csharp: { - extensions: [ 'cs' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - 'aspx-cs': { - extensions: [ 'aspx', 'asax', 'ascx', 'ashx', 'asmx', 'axd' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - java: { - extensions: [ 'java' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - php: { - extensions: [ 'php', 'php3', 'php4', 'php5' ], - executables: [ 'php' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - actionscript: { - extensions: [ 'as' ], - comment: '//', multiLine: [ /\/\*/, /\*\// ] - }, - sh: { - extensions: [ 'sh', 'kst', 'bash' ], - names: [ '.bashrc', 'bashrc' ], - executables: [ 'bash', 'sh', 'zsh' ], - comment: '#' - }, - yaml: { - extensions: [ 'yaml', 'yml' ], - comment: '#' - }, - markdown: { - extensions: [ 'md', 'mkd', 'markdown' ], - type: 'markdown' - }, - sass: { - extensions: [ 'sass' ], - comment: '//' //, multiLine: [ /\/\*/, /\*\// ] - }, - scss: { - extensions: [ 'scss' ], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - make: { - names: [ 'makefile' ], - comment: '#' - }, - apache: { - names: [ '.htaccess', 'apache.conf', 'apache2.conf' ], - comment: '#' - }, - jade: { - extensions: ['jade'], - comment: '//-?', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - groovy: { - extensions: ['groovy'], - comment: '//', multiLine: [ /\/\*\*?/, /\*\// ], jsDoc: true - }, - gsp: { - extensions: [ 'gsp' ], - //comment: '//', gsp only supports multiline comments. - multiLine: [ /<%--/, /--%>/ ], - pygment: "html"// .gsp is grails server pages in pygments, html is close enough. - }, - styl: { - extensions: [ 'styl' ], - comment: '//', multiLine: [ /\/\*/, /\*\// ], - pygment: "sass"// .styl isn't supported by pygments, sass is close enough. - }, - css: { - extensions: [ 'css' ], - multiLine: [ /\/\*/, /\*\// ], // for when we detect multi-line comments - commentStart: '/*', commentEnd: '*/' // for when we add multi-line comments - }, - html: { - extensions: [ 'html', 'htm' ], - multiLine: [ // ], - commentStart: '' - } -}; - -/** - * ## Docker.prototype.pygments - * - * Runs a given block of code through pygments - * - * @param {string} data The code to give to Pygments - * @param {string} language The name of the Pygments lexer to use - * @param {function} cb Callback to fire with Pygments output - */ -Docker.prototype.pygments = function(data, language, cb){ - // By default tell Pygments to guess the language, and if - // we have a language specified then tell pygments to use that lexer - var pygOpts = { - format: 'html', - options: { - encoding: 'utf-8', - tabsize: 2, - style: this.colourScheme - } - }; - - if(language) pygOpts['lang'] = language; - - // run pygmentize - pygmentize(pygOpts, data, function(err, result) { - if (err) { - console.error(err.toString()); - return; - } - - cb(result.toString()); - }); -}; - -/** - * ## Docker.prototype.highlight - * - * Highlights all the sections of a file using **pygments** - * Given an array of section objects, loop through them, and for each - * section generate pretty html for the comments and the code, and put them in - * `docHtml` and `codeHtml` respectively - * - * @param {Array} sections Array of section objects - * @param {string} language Language ith which to highlight the file - * @param {function} cb Callback function to fire when we're done - */ -Docker.prototype.highlight = function(sections, language, cb){ - var params = this.languages[language], self = this, pygment = language; - - var input = []; - for(var i = 0; i < sections.length; i += 1){ - input.push(sections[i].code); - } - // If the language we are parsing doesn't have single line comments - // (like HTML and CSS) we use a multi-line comment. - if (params.comment) { - input = input.join('\n' + params.comment + '----DIVIDER----\n'); - } else { - input = input.join('\n' + params.commentStart + '----DIVIDER----' + params.commentEnd + '\n'); - } - - if(this.languages[language].pygment) { - pygment = this.languages[language].pygment - } - - // Run our input through pygments, then split the output back up into its constituent sections - this.pygments(input, pygment, function(out){ - out = out.replace(/^\s*
    /,'').replace(/<\/pre><\/div>\s*$/,'');
    -    var bits = out.split(/^]*>[^<]+(?:<\/span>]*>)?----DIVIDER----[^<]*<\/span>$/gm);
    -    for(var i = 0; i < sections.length; i += 1){
    -      sections[i].codeHtml = '
    ' + bits[i] + '
    '; - sections[i].docHtml = showdown.makeHtml(sections[i].docs); - } - self.processDocCodeBlocks(sections, cb); - }); +Docker.prototype.outFile = function(filename){ + return path.normalize(filename.replace(path.resolve(this.options.inDir), this.options.outDir) + '.html'); }; -/** - * ## Docker.prototype.processDocCodeBlocks - * - * Goes through all the HTML generated from comments, finds any code blocks - * and highlights them - * - * @param {Array} sections Sections array as above - * @param {function} cb Callback to fire when done - */ -Docker.prototype.processDocCodeBlocks = function(sections, cb){ - var i = 0, self = this; - - function next(){ - // If we've reached the end of the sections array, we've highlighted everything, - // so we can stop and fire the callback - if(i == sections.length) return cb(); - - // Process the code blocks on this section, each time returning the html - // and moving onto the next section when we're done - self.extractDocCode(sections[i].docHtml, function(html){ - sections[i].docHtml = html; - i = i + 1; - next(); +Docker.prototype.writeFile = function(filename, fileContent, doneLog, doneCallback){ + mkdirp(path.dirname(filename), function(){ + fs.writeFile(filename, fileContent, function(){ + if(doneLog) console.log(doneLog); + if(doneCallback) doneCallback(); }); - } - - // Start off with the first section - next(); -}; - -/** - * ## Docker.prototype.extractDocCode - * - * Extract and highlight code blocks in formatted HTML output from showdown - * - * @param {string} html The HTML to process - * @param {function} cb Callback function to fire when done - */ -Docker.prototype.extractDocCode = function(html, cb){ - - // We'll store all extracted code blocks, along with information, in this array - var codeBlocks = []; - - // Search in the HTML for any code tag with a language set (in the format that showdown returns) - html = html.replace(/
    ([^<]*)<\/code><\/pre>/g, function(wholeMatch, langBlock, language, block){
    -    if(langBlock === '' || language === '') return "
    " + wholeMatch + '
    '; - // Unescape these HTML entities because they'll be re-escaped by pygments - block = block.replace(/>/g,'>').replace(/</g,'<').replace(/&/g,'&'); - - // Store the code block away in `codeBlocks` and leave a flag in the original text. - return "\n\n~C" + codeBlocks.push({ - language: language, - code: block, - i: codeBlocks.length + 1 - }) + "C\n\n"; }); - - // Once we're done with that, now we can move on to highlighting the code we've extracted - this.highlighExtractedCode(html, codeBlocks, cb); }; -/** - * ## Docker.prototype.highlightExtractedCode - * - * Loops through all extracted code blocks and feeds them through pygments - * for code highlighting. Unfortunately the only way to do this that's able - * to cater for all situations is to spawn a new pygments process for each - * code block (as different blocks might be in different languages). If anyone - * knows of a more efficient way of doing this, please let me know. - * - * @param {string} html The HTML the code has been extracted from - * @param {Array} codeBlocks Array of extracted code blocks as above - * @param {function} cb Callback to fire when we're done with processed HTML - */ -Docker.prototype.highlighExtractedCode = function(html, codeBlocks, cb){ - +Docker.prototype.copySharedResources = function(){ var self = this; + self.writeFile( + path.join(self.options.outDir, 'doc-filelist.js'), + 'var tree=' + JSON.stringify(self.tree) + ';', + 'Saved file tree to doc-filelist.js' + ); - function next(){ - // If we're done, then stop and fire the callback - if(codeBlocks.length === 0)return cb(html); + fs.readFile(path.join(__dirname, '..', 'res', 'style.less'), function(err, file){ + var hlpath = require.resolve('highlight.js'); + var cspath = path.resolve(path.dirname(hlpath), '..', 'styles'); + var colours = require('./getColourScheme')(self.options.colourScheme); + less.render(file.toString().replace('COLOURSCHEME', self.options.colourScheme), { + paths: [cspath], + globalVars: colours + }, function(err, out){ + self.writeFile( + path.join(self.options.outDir, 'doc-style.css'), + out.css, + 'Compiled CSS to doc-style.css' + ); + }); + }); - // Pull the next code block off the beginning of the array - var nextBlock = codeBlocks.shift(); + fs.readFile(path.join(__dirname, '..', 'res', 'script.js'), function(err, file){ + self.writeFile( + path.join(self.options.outDir, 'doc-script.js'), + file, + 'Copied JS to doc-script.js' + ); + }); - // Run the code through pygments - self.pygments(nextBlock.code, nextBlock.language, function(out){ - out = out.replace(/
    /,'
    ').replace(/<\/pre>/,'
    '); - html = html.replace('\n~C' + nextBlock.i + 'C\n', out); - next(); + this.options.js.concat(this.options.css).forEach(function(ext){ + var fn = path.basename(ext); + fs.readFile(path.resolve(ext), function(err, file){ + self.writeFile(path.join(self.options.outDir, fn), file, 'Copied ' + fn); }); - } - - // Fire off on first block - next(); + }); }; -/** - * ## Docker.prototype.addAnchors - * - * Automatically assign an id to each section based on any headings. - * - * @param {object} section The section object to look at - * @param {number} idx The index of the section in the whole array. - */ Docker.prototype.addAnchors = function(docHtml, idx, headings){ var ids = {}; if(docHtml.match(//)){ // If there is a heading tag, pick out the first one (likely the most important), sanitize // the name a bit to make it more friendly for IDs, then use that docHtml = docHtml.replace(/()(.*)(<\/h\2>)/g, function(a, start, level, middle, end){ - var id = encodeURIComponent(middle.replace(/<[^>]*>/g,'').toLowerCase()); + var id = encodeURIComponent(middle.replace(/<[^>]*>/g, '').toLowerCase()); var headingId = id; if(typeof ids[id] === 'undefined'){ @@ -1188,10 +611,10 @@ Docker.prototype.addAnchors = function(docHtml, idx, headings){ headingId = id + '_' + ids[id]; } - headings.push({ id: id, headingId: headingId, text: middle.replace(/<[^>]*>/g,''), level: level }); - return '\n
    \n '+ + headings.push({ id: id, headingId: headingId, text: middle.replace(/<[^>]*>/g, ''), level: level }); + return '\n
    \n ' + start + - '\n \n ' + + '\n \n ' + middle + '\n ' + end + '\n
    \n'; @@ -1199,387 +622,19 @@ Docker.prototype.addAnchors = function(docHtml, idx, headings){ }else{ // If however we can't find a heading, then just use the section index instead. docHtml = '\n
    ' + - '\n ' + + '\n ' + '\n
    \n' + docHtml; } return docHtml; }; -/** - * ## Docker.prototype.addLineNumbers - * - * Adds line numbers to rendered code HTML - * - * @param {string} html The code HTML - * @param {number} first Line number of the first code line - */ Docker.prototype.addLineNumbers = function(html, first){ - html = html.replace(/^
    /, '');
    -  html = html.replace(/<\/pre><\/div>$/, '');
    -
       var lines = html.split('\n');
     
    -  var out = [];
    -  var line = first;
    -
    -  for(var i = 0; i < lines.length; i += 1){
    -    out.push('' + line + '  ' + lines[i]);
    -
    -    line += 1;
    -  }
    -
    -  return '
    ' + out.join('\n') + '
    '; -}; - -/** - * ## Docker.prototype.renderCodeHtml - * - * Given an array of sections, render them all out to a nice HTML file - * - * @param {Array} sections Array of sections containing parsed data - * @param {string} filename Name of the file being processed - * @param {function} cb Callback function to fire when we're done - */ -Docker.prototype.renderCodeHtml = function(sections, filename, cb){ - - // Decide which path to store the output on. - var outFile = this.outFile(filename); - - var headings = []; - - // Calculate the location of the input root relative to the output file. - // This is necessary so we can link to the stylesheet in the output HTML using - // a relative href rather than an absolute one - var outDir = path.dirname(outFile); - var pathSeparator = path.join('a', 'b').replace(/(^.*a|b.*$)/g, ''); - var relativeOut = path.resolve(outDir) - .replace(path.resolve(this.outDir),'') - .replace(/^[\/\\]/,''); - var levels = relativeOut === '' ? 0 : relativeOut.split(pathSeparator).length; - var relDir = Array(levels + 1).join('../'); - - for(var i = 0; i < sections.length; i += 1){ - sections[i].docHtml = this.addAnchors(sections[i].docHtml, i, headings); - - if(this.lineNums) sections[i].codeHtml = this.addLineNumbers(sections[i].codeHtml, sections[i].firstCodeLine); - } - - // Render the html file using our template - var content = this.codeFileTemplate({ - title: path.basename(filename), - sections: sections + lines = lines.map(function(line, i){ + var n = first + i; + return ' ' + line; }); - var html = this.renderTemplate({ - title: path.basename(filename), - relativeDir: relDir, - content: content, - headings: headings, - sidebar: this.sidebarState, - colourScheme: this.colourScheme, - filename: filename.replace(this.inDir,'').replace(/^[\/\\]/,''), - js: this.extraJS.map(path.basename), - css: this.extraCSS.map(path.basename) - }); - - var self = this; - - // Recursively create the output directory, clean out any old version of the - // output file, then save our new file. - this.writeFile(outFile, html, 'Generated: ' + outFile.replace(self.outDir,''), cb); -}; - -/** - * ## Docker.prototype.renderMarkdownHtml - * - * Renders the output for a Markdown file into HTML - * - * @param {string} content The markdown file content - * @param {string} filename Name of the file being processed - * @param {function} cb Callback function to fire when we're done - */ -Docker.prototype.renderMarkdownHtml = function(content, filename, cb){ - // Run the markdown through *showdown* - content = showdown.makeHtml(content); - - this.extractDocCode(content, function(content){ - - var headings = []; - - // Add anchors to all headings - content = this.addAnchors(content,0, headings); - - // Wrap up with necessary classes - content = '
    ' + content + '
    '; - - // Decide which path to store the output on. - var outFile = this.outFile(filename); - - // Calculate the location of the input root relative to the output file. - // This is necessary so we can link to the stylesheet in the output HTML using - // a relative href rather than an absolute one - var outDir = path.dirname(outFile); - var pathSeparator = path.join('a', 'b').replace(/(^.*a|b.*$)/g, ''); - var relativeOut = path.resolve(outDir) - .replace(path.resolve(this.outDir),'') - .replace(/^[\/\\]/,''); - var levels = relativeOut == '' ? 0 : relativeOut.split(pathSeparator).length; - var relDir = Array(levels + 1).join('../'); - - // Render the html file using our template - var html = this.renderTemplate({ - title: path.basename(filename), - relativeDir: relDir, - content: content, - headings: headings, - colourScheme: this.colourScheme, - sidebar: this.sidebarState, - filename: filename.replace(this.inDir,'').replace(/^[\\\/]/,''), - js: this.extraJS.map(path.basename), - css: this.extraCSS.map(path.basename) - }); - - // Recursively create the output directory, clean out any old version of the - // output file, then save our new file. - this.writeFile(outFile, html, 'Generated: ' + outFile.replace(this.outDir,''), cb); - }.bind(this)); -}; - -/** - * ## Docker.prototype.copySharedResources - * - * Copies the shared CSS and JS files to the output directories - */ -Docker.prototype.copySharedResources = function(){ - var self = this; - - var toDo = 3; - function done(){ - if(!--toDo){ - self.finished(); - } - } - - fs.readFile(path.join(path.dirname(__filename),'..','res','script.js'), function(err, file){ - self.writeFileIfDifferent( - path.join(self.outDir, 'doc-script.js'), - file, - 'Copied JS to doc-script.js', - done - ); - }); - - // {{{ create css file with pygmentize - var pygOpts = { - format: 'html', - options: { - full: true, - style: this.colourScheme - } - }; - - fs.readFile(path.join(path.dirname(__filename),'..','res','css', self.colourScheme + '.css'), function(err, file){ - if (err) { - console.error('Error reading base CSS:\n', err); - process.exit(); - } - pygmentize(pygOpts, '', function(err, result) { - if (err) { - console.error('Error generating CSS:\n', err); - process.exit(); - } - - // extract css - result = result.toString().match(/