1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3<head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>SyntaxHighlighter Brushes Tests</title> 6 <script type="text/javascript" src="/components/jquery/jquery.min.js"></script> 7 8 <!-- SyntaxHighlighter --> 9 <script type="text/javascript" src="/components/xregexp/xregexp-all.js"></script> 10 <!-- XRegExp is bundled with the final shCore.js during build --> 11 <script type="text/javascript" src="/src/js/shCore.js"></script> 12 <script type="text/javascript" src="/src/js/shAutoloader.js"></script> 13 <script type="text/javascript" src="/src/js/shBrushAppleScript.js"></script> 14 <script type="text/javascript" src="/src/js/shBrushAS3.js"></script> 15 <script type="text/javascript" src="/src/js/shBrushBash.js"></script> 16 <script type="text/javascript" src="/src/js/shBrushColdFusion.js"></script> 17 <script type="text/javascript" src="/src/js/shBrushCpp.js"></script> 18 <script type="text/javascript" src="/src/js/shBrushCSharp.js"></script> 19 <script type="text/javascript" src="/src/js/shBrushCss.js"></script> 20 <script type="text/javascript" src="/src/js/shBrushDelphi.js"></script> 21 <script type="text/javascript" src="/src/js/shBrushDiff.js"></script> 22 <script type="text/javascript" src="/src/js/shBrushErlang.js"></script> 23 <script type="text/javascript" src="/src/js/shBrushGroovy.js"></script> 24 <script type="text/javascript" src="/src/js/shBrushJava.js"></script> 25 <script type="text/javascript" src="/src/js/shBrushJavaFx.js"></script> 26 <script type="text/javascript" src="/src/js/shBrushJScript.js"></script> 27 <script type="text/javascript" src="/src/js/shBrushPerl.js"></script> 28 <script type="text/javascript" src="/src/js/shBrushPhp.js"></script> 29 <script type="text/javascript" src="/src/js/shBrushPlain.js"></script> 30 <script type="text/javascript" src="/src/js/shBrushPowerShell.js"></script> 31 <script type="text/javascript" src="/src/js/shBrushPython.js"></script> 32 <script type="text/javascript" src="/src/js/shBrushRuby.js"></script> 33 <script type="text/javascript" src="/src/js/shBrushSass.js"></script> 34 <script type="text/javascript" src="/src/js/shBrushScala.js"></script> 35 <script type="text/javascript" src="/src/js/shBrushSql.js"></script> 36 <script type="text/javascript" src="/src/js/shBrushVb.js"></script> 37 <script type="text/javascript" src="/src/js/shBrushXml.js"></script> 38 39 <link type="text/css" rel="stylesheet" href="/pkg/styles/shCoreDefault.css"/> 40</head> 41 42<body> 43 44<div id="output"></div> 45 46<style> 47body { 48 background: white; 49 font-family: Helvetica; 50} 51 52.test-wrap { 53 width: 100%; 54 height: 800px; 55 overflow: auto; 56 border: none; 57} 58</style> 59 60<script type="text/javascript"> 61var brushes = [ 62 'AS3', 63 'AppleScript', 64 'Bash', 65 'CSharp', 66 'ColdFusion', 67 'Cpp', 68 'Css', 69 'Delphi', 70 'Diff', 71 'Erlang', 72 'Groovy', 73 'JScript', 74 'Java', 75 'JavaFX', 76 'Perl', 77 'Php', 78 'Plain', 79 'PowerShell', 80 'Python', 81 'Ruby', 82 'Sass', 83 'Scala', 84 'Sql', 85 'Vb', 86 'Xml' 87 ]; 88 89$(document).ready(function() 90{ 91 var html = '', links = ''; 92 93 $.each(brushes, function(index) 94 { 95 var name = this; 96 97 links += '<a href="#theme' + index + '">' + name + '</a> '; 98 99 html += '' 100 + '<div class="test-wrap">' 101 + '<h1>' 102 + '<a href="#theme' + (index + 1) + '">next</a> ' 103 + '<a name="theme' + index + '">' 104 + name 105 + '</a>' 106 + '</h1>' 107 ; 108 109 $.ajax({ 110 url: 'brushes/' + name.toLowerCase() + '.html', 111 type: 'GET', 112 dataType: 'text', 113 async: false, 114 success: function(data) 115 { 116 html += data; 117 }, 118 error: function() 119 { 120 html += '<p>Not found...</p>'; 121 } 122 }); 123 124 html += '</div>\n'; 125 126 if (index % 2 != 0) 127 html += '<div style="clear:both"></div>\n'; 128 }); 129 130 $('#output')[0].innerHTML = links + '\n' + html; 131 $('#output a[name]:first').attr('name', 'top'); 132 $('#output a[href]:last').attr('href', '#top').html('top'); 133 134 SyntaxHighlighter.highlight(); 135}); 136</script> 137 138</body> 139</html> 140