Better HTML

This commit is contained in:
Stephane Bortzmeyer 2023-08-01 20:23:50 +02:00
parent 1d75ff5e5e
commit 7939d78faa

View File

@ -167,7 +167,7 @@ html_head s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC
html_tail = "<hr/><p><a href=\"/\">langtag.net Home</a></p></body></html>"
linkLanguage langcode =
if (length langcode) == 3 then
"<a href=\"http://www.sil.org/iso639-3/documentation.asp?id=" ++
"<a href=\"https://iso639-3.sil.org/code/" ++
langcode ++ "\">See the SIL entry</a> (if present)."
else if (length langcode) == 2 then
"<a href=\"http://www.loc.gov/standards/iso639-2/php/langcodes_name.php?iso_639_1=" ++
@ -185,7 +185,7 @@ descrToHTML a = concat (List.intersperse " / " (map onedescrToHTML a))
oneprefixToHTML s = " Possible prefix: <code><a href=\"../language/" ++ s ++ ".html\">" ++ s ++ "</a></code>"
prefixesToHTML a = concat (map oneprefixToHTML a)
toHTML (Date d) = "<p>Date: " ++ dateToHTML d ++ "</p>"
toHTML (Lang l) = (html_head ((lang'descr l) !! 0)) ++ "<p><code>" ++
toHTML (Lang l) = (html_head ((lang'descr l) !! 0)) ++ "<p>Code <code>" ++
(lang'subtag l) ++ "</code>. " ++
addedToHTML (lang'added l) ++ ". Description: " ++
descrToHTML (lang'descr l) ++ ". " ++