X-Git-Url: http://git.megacz.com/?p=wix.git;a=blobdiff_plain;f=src%2FHtml.lhs;h=a3ff54f19c3f0780bf5debf114110aa991bc5a5e;hp=96e9e6a2119138f9ba56a5a2b8d00e500622f23a;hb=7123f2f1bd0db15a0d0a4c5d3849eae09a069a8c;hpb=78cfe8113affda63fdb4ea2ef607f0b8e3ee1139 diff --git a/src/Html.lhs b/src/Html.lhs index 96e9e6a..a3ff54f 100644 --- a/src/Html.lhs +++ b/src/Html.lhs @@ -31,7 +31,7 @@ style = " 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"++ @@ -183,8 +183,9 @@ instance ToHtml Paragraph where toHtml (P t) = stag "p" $ toHtml t -link ref body = ""++icon++body++"" +link ref body = ""++icon++body++"" where + urlify = toHtml icon = if ".pdf" `isSuffixOf` ref then " " else if "mailto:" `isPrefixOf` ref then " " else "" @@ -236,6 +237,8 @@ instance ToHtml Text where toHtml (Command "green" y) = ""++(toHtml y)++"" toHtml (Command "sc" y) = ""++(toHtml y)++"" toHtml (Command "image" y) = "" + toHtml (Command "imagec" y) = "
" + toHtml (Command "image2" y) = "" toHtml (Command "image3" y) = "" toHtml (Command "image4" y) = "
" toHtml (Command "warn" y) = "\n
\n\n" @@ -272,7 +275,7 @@ instance ToHtml Text where 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) = "‡" @@ -282,7 +285,8 @@ instance ToHtml Text where 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 @@ -310,7 +314,7 @@ htmlEscapeChar '\'' = "'" htmlEscapeChar '\"' = """ htmlEscapeChar c = [c] -pre x = "\n
"++ (pre' x) ++ "\n
\n" +pre x = "\n
"++ (pre' x) ++ "\n
\n" where pre' (' ':b) = " "++(pre' b) pre' ('\n':b) = "
\n"++(pre' b)