aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/top/src
diff options
context:
space:
mode:
authorMariano Guerra <[email protected]>2016-10-21 16:44:28 +0100
committerMariano Guerra <[email protected]>2017-03-13 11:51:52 +0100
commitc46da866eb1a6396ae1d670436dd6d87b4b8e442 (patch)
tree61e5f8b9bbee4a435fbc07e677be6412f0b343c3 /system/doc/top/src
parentdb41a7fe2ebbc44c7fa16835630c11fe78a9cc4a (diff)
downloadotp-c46da866eb1a6396ae1d670436dd6d87b4b8e442.tar.gz
otp-c46da866eb1a6396ae1d670436dd6d87b4b8e442.tar.bz2
otp-c46da866eb1a6396ae1d670436dd6d87b4b8e442.zip
improve applications and modules list styles
Diffstat (limited to 'system/doc/top/src')
-rw-r--r--system/doc/top/src/erl_html_tools.erl47
-rw-r--r--system/doc/top/src/otp_man_index.erl61
2 files changed, 40 insertions, 68 deletions
diff --git a/system/doc/top/src/erl_html_tools.erl b/system/doc/top/src/erl_html_tools.erl
index d55c2e1164..28a0649658 100644
--- a/system/doc/top/src/erl_html_tools.erl
+++ b/system/doc/top/src/erl_html_tools.erl
@@ -387,9 +387,7 @@ subst("#copyright#", _Info, _Group) ->
"copyright Copyright &copy; 1991-2004";
subst("#groups#", Info, _Group) ->
[
- "<table border=0 width=\"90%\" cellspacing=3 cellpadding=5>\n",
- subst_groups(Info),
- "</table>\n"
+ subst_groups(Info)
];
subst("#applinks#", Info, Group) ->
subst_applinks(Info, Group);
@@ -476,16 +474,10 @@ subst_unknown_groups([{_Group,Heading,Apps} | Groups], Text0, Left) ->
group_table(Heading,Apps) ->
- [
- " <tr>\n",
- " <td colspan=2 class=header>\n",
- " <font size=\"+1\"><b>",Heading,"</b></font>\n",
- " </td>\n",
- " </tr>\n",
+ ["<h2>",Heading,"</h2>",
+ "<table class=\"group-table\">\n",
subst_apps(Apps),
- " <tr>\n",
- " <td colspan=2><font size=1>&nbsp;</font></td>\n",
- " </tr>\n"
+ "</table>\n"
].
% Count and split the applications in half to get the right sort
@@ -500,17 +492,11 @@ subst_apps([]) ->
subst_app(App, [{VSN,_Path,Link,Text}]) ->
[
" <tr class=app>\n",
- " <td align=left valign=top>\n",
- " <table border=0 width=\"100%\" cellspacing=0 cellpadding=0>\n",
- " <tr class=app>\n",
- " <td align=left valign=top>\n",
+ " <td>\n",
" <a href=\"",Link,"\" target=\"_top\">",uc(App),"</a>\n",
" <a href=\"",Link,"\" target=\"_top\">",VSN,"</a>\n",
- " </td>\n",
- " </tr>\n",
- " </table>\n"
" </td>\n",
- " <td align=left valign=top>\n",
+ " <td>\n",
Text,"\n",
" </td>\n",
" </tr>\n"
@@ -518,27 +504,14 @@ subst_app(App, [{VSN,_Path,Link,Text}]) ->
subst_app(App, [{VSN,_Path,Link,Text} | VerInfos]) ->
[
" <tr class=app>\n",
- " <td align=left valign=top>\n",
- " <table border=0 width=\"100%\" cellspacing=0 cellpadding=0>\n",
- " <tr class=app>\n",
- " <td align=left valign=top>\n",
+ " <td>\n",
" <a href=\"",Link,"\" target=\"_top\">",uc(App),
- "</a>&nbsp;&nbsp;<br>\n",
+ "</a>\n",
" <a href=\"",Link,"\" target=\"_top\">",VSN,"</a>\n",
- " </td>\n",
- " <td align=right valign=top width=50>\n",
- " <table border=0 width=40 cellspacing=0 cellpadding=0>\n",
- " <tr class=app>\n",
- " <td align=left valign=top class=appnums>\n",
+ " <td class=appnums>\n",
subst_vsn(VerInfos),
- " </td>\n",
- " </tr>\n",
- " </table>\n"
- " </td>\n",
- " </tr>\n",
- " </table>\n"
" </td>\n",
- " <td align=left valign=top>\n",
+ " <td>\n",
Text,"\n",
" </td>\n",
" </tr>\n"
diff --git a/system/doc/top/src/otp_man_index.erl b/system/doc/top/src/otp_man_index.erl
index 12aaba1423..655d7265f7 100644
--- a/system/doc/top/src/otp_man_index.erl
+++ b/system/doc/top/src/otp_man_index.erl
@@ -154,10 +154,10 @@ gen_html(RefPages, OutFile)->
SortedPages = lists:sort(RefPages),
lists:foreach(fun({_,Module, App, AppDocDir, RefPagePath}) ->
- io:fwrite(Out, " <TR>\n",[]),
- io:fwrite(Out, " <TD><A HREF=\"~s\">~s</A></TD>\n",
+ io:fwrite(Out, " <tr>\n",[]),
+ io:fwrite(Out, " <td><a href=\"~s\">~s</a></td>\n",
[RefPagePath, Module]),
- io:fwrite(Out, " <TD><A HREF=\"~s\">~s</A></TD>\n",
+ io:fwrite(Out, " <td><a HREF=\"~s\">~s</a></td>\n",
[filename:join(AppDocDir, "index.html"),
App]),
io:fwrite(Out, " </TR>\n",[])
@@ -175,41 +175,40 @@ gen_html(RefPages, OutFile)->
html_header() ->
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
"<!-- This file was generated by the otp_man_index -->\n"
- "<HTML>\n"
- "<HEAD>\n"
+ "<html>\n"
+ "<head>\n"
" <link rel=\"stylesheet\" href=\"otp_doc.css\" type=\"text/css\"/>\n"
- " <TITLE>Erlang/OTP Manual Page Index</TITLE>\n"
- "</HEAD>\n"
- "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000FF\" VLINK=\"#FF00FF\" ALINK=\"#FF0000\">\n"
- "<CENTER>\n"
+ " <title>Erlang/OTP Manual Page Index</title>\n"
+ "</head>\n"
+ "<body>\n"
+ "<center>\n"
"<!-- A HREF=\"http://www.erlang.org/\">\n"
"<img alt=\"Erlang logo\" src=\"erlang-logo.png\"/>\n"
- "</A><BR -->\n"
- "<SMALL>\n"
- "[<A HREF=\"index.html\">Up</A> | <A HREF=\"http://www.erlang.org/\">Erlang</A>]\n"
- "</SMALL><BR>\n"
- "<P/><FONT SIZE=\"+4\">OTP Reference Page Index</FONT><BR>\n"
- "</CENTER>\n"
- "<CENTER>\n"
- "<P/>\n"
- "<TABLE BORDER=1>\n"
- "<TR>\n"
- " <TH>Manual Page</TH><TH>Application</TH>\n"
- "</TR>\n".
+ "</a><br -->\n"
+ "<small>\n"
+ "[ <A HREF=\"index.html\">Up</A> | <A HREF=\"http://www.erlang.org/\">Homepage</A> ]\n"
+ "</small><br>\n"
+ "<h1>OTP Reference Page Index</h1>\n"
+ "</center>\n"
+ "<center>\n"
+ "<table class=\"man-index\">\n"
+ "<tr>\n"
+ " <th>Manual Page</th><th>Application</th>\n"
+ "</tr>\n".
html_footer(Year) ->
- "</TABLE>\n"
- "</CENTER>\n"
- "<P/>\n"
- "<CENTER>\n"
- "<HR/>\n"
- "<SMALL>\n"
+ "</table>\n"
+ "</center>\n"
+ "<p/>\n"
+ "<center>\n"
+ "<hr/>\n"
+ "<small>\n"
"Copyright &copy; 1991-" ++ Year ++ "\n"
"<a href=\"http://www.ericsson.com/technology/opensource/erlang/\">\n"
"Ericsson AB</a>\n"
- "</SMALL>\n"
- "</CENTER>\n"
- "</BODY>\n"
- "</HTML>\n".
+ "</small>\n"
+ "</center>\n"
+ "</body>\n"
+ "</html>\n".