\begin{code}
+-- Copyright 2008 the Contributors, as shown in the revision logs.
+-- Licensed under the Apache Public Source License 2.0 ("the License").
+-- You may not use this file except in compliance with the License.
+
module Html
where
import Edu_Berkeley_Sbp_Haskell_SBP
" LI { margin-top: 5px; }\n"++
" body { color: #333333; }\n"++
" blockquote { font-style: italic; width: 100% }\n"++
- " div.warn { border: 1px solid red; background-color: #fbb; color: white; }\n"++
+ " div.warn { border: 1px solid #f44; border-top: 5px solid #f44; background-color: #fbb; color: white; }\n"++
" td.warn { color: black; }\n"++
" div.announce { border: 1px solid green; background-color: #bfb; color: white; }\n"++
" td.announce { color: black; }\n"++
toHtml (Command "green" y) = "<font color=green>"++(toHtml y)++"</font>"
toHtml (Command "sc" y) = "<sc>"++(toHtml y)++"</sc>"
toHtml (Command "image" y) = "<img src='"++(toHtml y)++"'/>"
+ toHtml (Command "imagec" y) = "<center><img src='"++(toHtml y)++"'/></center>"
+ toHtml (Command "image2" y) = "<img width=180px src='"++(toHtml y)++"'/>"
toHtml (Command "image3" y) = "<img width=200px src='"++(toHtml y)++"'/>"
toHtml (Command "image4" y) = "<center><img width=550px src='"++(toHtml y)++"'/></center>"
toHtml (Command "warn" y) = "\n<div class=warn>\n<table border=0 cellpadding=5px>\n"
toHtml (GlyphText TradeMark) = "™"
toHtml (GlyphText ServiceMark) = "™"
toHtml (GlyphText Emdash) = "—"
- toHtml (GlyphText Ellipsis) = "…"
+ toHtml (GlyphText Ellipsis) = "…" -- &cdots;?
toHtml (GlyphText Cent) = "½"
toHtml (GlyphText Daggar) = "†"
toHtml (GlyphText DoubleDaggar) = "‡"
toHtml (GlyphText Sharp) = "⋘"
toHtml (GlyphText CheckMark) = "✓"
toHtml (GlyphText XMark) = "✗"
- toHtml (GlyphText LeftArrow) = "&#;" -- FIXME
+ toHtml (GlyphText LeftArrow) = "←"
+ toHtml (GlyphText RightArrow) = "→"
toHtml (GlyphText DoubleLeftArrow) = "&#;" -- FIXME
toHtml (GlyphText DoubleRightArrow) = "&#;" -- FIXME
toHtml (GlyphText DoubleLeftRightArrow) = "&#;" -- FIXME
htmlEscapeChar '\"' = """
htmlEscapeChar c = [c]
-pre x = "\n<div class=pre>"++ (pre' x) ++ "\n</div>\n"
+pre x = "\n<div class=pre style='white-space:nowrap'>"++ (pre' x) ++ "\n</div>\n"
where
pre' (' ':b) = " "++(pre' b)
pre' ('\n':b) = "<br/>\n"++(pre' b)