summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/helpers/html_output.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2005-10-01 02:14:46 +0000
committermurphy <murphy@rubychan.de>2005-10-01 02:14:46 +0000
commitc194637b0d9af5ee756c5efa0942fe8cc09769e5 (patch)
treec9f6f310cacbf8b70b0bc45c2892a402529341db /lib/coderay/encoders/helpers/html_output.rb
parent1712b65570da6495a87f267cb3f11ef05383cbe5 (diff)
downloadcoderay-c194637b0d9af5ee756c5efa0942fe8cc09769e5.tar.gz
Some demos updated.
Massive changes for HTML output layout.
Diffstat (limited to 'lib/coderay/encoders/helpers/html_output.rb')
-rw-r--r--lib/coderay/encoders/helpers/html_output.rb20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/coderay/encoders/helpers/html_output.rb b/lib/coderay/encoders/helpers/html_output.rb
index 692e810..c873896 100644
--- a/lib/coderay/encoders/helpers/html_output.rb
+++ b/lib/coderay/encoders/helpers/html_output.rb
@@ -200,22 +200,15 @@ module CodeRay
DIV, DIV_TABLE, PAGE =
<<-`DIV`, <<-`DIV_TABLE`, <<-`PAGE`
-
-<div class="code">
-<pre><%CONTENT%></pre>
+<div class="CodeRay">
+ <div class="code"><pre><%CONTENT%></pre></div>
</div>
DIV
-
-<div class="code">
- <table class="code_table">
- <tr>
- <td class="line_numbers"><pre><%LINE_NUMBERS%></pre></td>
- <td class="code_cell"><div class="nowrap"><pre><%CONTENT%></pre></div></td>
- </tr>
- </table>
-</div>
+<table class="CodeRay"> <tr>
+ <td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre><%LINE_NUMBERS%></pre></td>
+ <td class="code"><pre title="double click to expand" ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><%CONTENT%></pre></td>
+</tr> </table>
DIV_TABLE
-<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de">
@@ -227,6 +220,7 @@ module CodeRay
</style>
</head>
<body style="background-color: white;">
+
<%CONTENT%>
</body>
</html>