diff --git a/Makefile b/Makefile index 5203dae..9d21f92 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,6 @@ path_doc_output_html=${path_doc_output}/manual path_doc_output_html1=${path_doc_output}/manual.html path_doc_css=${path_doc}/manual.css path_doc_img=${path_doc}/img -path_doc_interactive_src=$(path_doc)/interactive.js -path_doc_interactive_dest=$(path_doc_output)/interactive.js \ - $(path_doc_output_html)/interactive.js path_manual_texi=${path_doc}/manual.texi path_info_install := /usr/local/share/info @@ -32,6 +29,7 @@ doc_imgs := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.dia)) doc_imgs_txt := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.txt)) doc_replace := s/<\/body>/ +@float Figure, f:inc-clientside +@verbatim + + - - -@end example + + +@end verbatim +@caption{Including ease.js client-side} +@end float Likely, you only want the first one. The unit tests can more easily be run by loading @file{build/browser-test.html} in your web browser (@pxref{Building}). diff --git a/doc/interactive.js b/doc/interactive.js index f9ed78c..1a2bf5e 100644 --- a/doc/interactive.js +++ b/doc/interactive.js @@ -23,3 +23,32 @@ head.appendChild( sjquery ); head.appendChild( sjquery_ui ); head.appendChild( css ); +// will call callback when jQuery has been loaded +function jqueryCheck( callback ) +{ + if ( typeof $ === 'undefined' ) + { + // check again in 50ms + setTimeout( function() + { + jqueryCheck( callback ); + }, 50 ); + + return; + } + + callback(); +} + +jqueryCheck( function() +{ + $( document ).ready( function() + { + // syntax highlighting for code samples + $( '.verbatim, .samp, .code, .example' ).each( function( i, element ) + { + hljs.highlightBlock( element, ' ' ); + } ); + } ); +} ); + diff --git a/doc/manual.css b/doc/manual.css index 67cd830..66e7ca3 100644 --- a/doc/manual.css +++ b/doc/manual.css @@ -70,3 +70,132 @@ var { line-height: 0.5em; } + +/* +github.com style (c) Vasily Polovnyov +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #f8f8ff +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #998; + font-style: italic +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .lisp .title, +pre .subst { + color: #000; + font-weight: bold +} + +pre .number, +pre .hexcolor { + color: #40a070 +} + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #d14 +} + +pre .title, +pre .id { + color: #900; + font-weight: bold +} + +pre .javascript .title, +pre .lisp .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .label, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #009926 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .lisp .keyword, +pre .tex .special, +pre .input_number { + color: #990073 +} + +pre .builtin, +pre .built_in, +pre .lisp .title { + color: #0086b3 +} + +pre .preprocessor, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} + +pre .tex .formula { + opacity: 0.5; +} +