Skip to content
This repository
Browse code

Use new XHTML when generating example script HTML files

  • Loading branch information...
commit f2b76b294a9c6a22a90dc2adbcce576795319e7c 1 parent 38648d8
authored

Showing 1 changed file with 22 additions and 12 deletions. Show diff stats Hide diff stats

  1. 34  post-setup.rb
34  post-setup.rb
@@ -163,15 +163,22 @@ def filetoHTML(file, html)
163 163
   File.open(file) do |src|
164 164
     File.open(html, 'w') do |dest|
165 165
       dest.puts <<-END_EXHTMLHEAD
166  
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
167  
-"http://www.w3.org/TR/html4/loose.dtd">
168  
-<HTML>
169  
-<HEAD>
170  
-<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
171  
-<TITLE>Example: #{file}</TITLE>
172  
-</HEAD>
173  
-<BODY style=\"background-color: #fffff0;\">
174  
-<PRE>
  166
+<!DOCTYPE public PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  167
+<html xmlns="http://www.w3.org/1999/xhtml">
  168
+<head>
  169
+  <meta name="generator" content="ex2html.rb" />
  170
+  <meta http-equiv="Content-Type" content=
  171
+  "text/html; charset=us-ascii" />
  172
+  <link rel="stylesheet" type="text/css" href="css/popup.css" />
  173
+
  174
+  <title>RMagick example: #{file}</title>
  175
+</head>
  176
+
  177
+<body>
  178
+<h1>#{file}</h1>
  179
+<div class="bodybox">
  180
+<div class="bodyfloat">
  181
+<pre>
175 182
         END_EXHTMLHEAD
176 183
 
177 184
       src.each do |line|
@@ -180,9 +187,12 @@ def filetoHTML(file, html)
180 187
       end
181 188
 
182 189
       dest.puts <<-END_EXHTMLTAIL
183  
-</PRE>
184  
-</BODY>
185  
-</HTML>
  190
+</pre>
  191
+</div>
  192
+</div>
  193
+<div id="close"><a href="javascript:window.close();">Close window</a></div>
  194
+</body>
  195
+</html>
186 196
         END_EXHTMLTAIL
187 197
     end
188 198
     File.chmod(0644, html)

0 notes on commit f2b76b2

Please sign in to comment.
Something went wrong with that request. Please try again.