diff options
author | swhite <swhite@61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1> | 2004-04-07 16:16:06 +0000 |
---|---|---|
committer | swhite <swhite@61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1> | 2004-04-07 16:16:06 +0000 |
commit | 5c38d78508f623a313b95f80f7b8dba85b9a7472 (patch) | |
tree | 661baed138d60a7dd2630cacc9dc616fdf79ea1d | |
parent | 71658c1d36cdf48dbf32bb62f5e4e18bb5d9f838 (diff) |
Various HTML tweeks. Made to load with Amaya.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPDExtra/trunk@51 61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1
-rw-r--r-- | src/Groups.c | 18 | ||||
-rw-r--r-- | src/IO.c | 40 | ||||
-rw-r--r-- | src/Processors.c | 17 |
3 files changed, 48 insertions, 27 deletions
diff --git a/src/Groups.c b/src/Groups.c index eb3f248..53c9f06 100644 --- a/src/Groups.c +++ b/src/Groups.c @@ -153,6 +153,11 @@ static int MessagesPage (const cGH *GH, httpRequest *request, void *data) SetHTML_HeadHeader( message); Send_HTTP_String(request, message ); + Send_HTTP(request, "<style type=\"text/css\">\n"); + Send_HTTP(request, " td.nomsg { background-color: #E9F4D3; }\n"); + Send_HTTP(request, "</style>\n"); + Send_HTTP(request, "</head>\n<body>\n"); + /* Write out the header part */ SetHTML_ContentHeader(GH, 0, message, NULL); Send_HTTP_String(request, message); @@ -163,24 +168,27 @@ static int MessagesPage (const cGH *GH, httpRequest *request, void *data) "simulation. At the moment the messages will disappear \n" "when the simulation finishes, but soon there will be an \n" "option to save them to a file.</p>\n" - "<center><table><form action=\"/Messages/\">\n" + "<div class=\"centered\">" + "<form action=\"/Messages/\">\n" + "<table>\n" "<tr><td>Name:</td>" "<td><input type=\"text\" size=\"40\" maxlength=\"100\" name=\"name\" " - "value=\"\"></td></tr>\n" + "value=\"\" /></td></tr>\n" "<tr><td valign=\"top\">Message:</td><td>" "<textarea name=\"memo\" rows=\"10\" cols=\"40\"></textarea>\n" "</td></tr></table>\n" - "<input type=\"submit\" value=\"Submit Message\"></form>\n" + "<input type=\"submit\" value=\"Submit Message\" />\n" "<table width=\"80%\"><tr><td>\n" "<h2>Messages:</h2></td></tr>\n" "<tr><td><table width=\"100%\" cellpadding=\"5\" cellspacing=\"5\">" - "<tr><td bgcolor=\"#E9F4D3\">" ); + "<tr><td class=\"nomsg\">" ); temp = message_board ? message_board : "No messages yet ... use the form above to add one"; Send_HTTP (request, temp ); - Send_HTTP (request, "</td></tr></table></td></tr></table></center>" ); + Send_HTTP (request, "</td></tr></table>\n" ); + Send_HTTP (request, "</td></tr></table>\n</form>\n</div>\n" ); /* Write out the footer part. */ SetHTML_ContentFooter(GH, 0, message); @@ -224,7 +224,9 @@ static int AdvertisedFilePage(const cGH *GH, httpRequest *request, void *data) SetHTML_HeadHeader( message); Send_HTTP_String(request, message ); - + + Send_HTTP(request, "</head>\n<body>\n"); + /* HTTP_Write out the header part. */ SetHTML_ContentHeader(GH, 0, message, NULL); Send_HTTP_String(request, message); @@ -243,9 +245,11 @@ static int AdvertisedFilePage(const cGH *GH, httpRequest *request, void *data) "allow you to e.g. add fields and customise behaviour.\n" "Depending on your authorisation, you can access the \n" "<a href=\"/Parameters/index.html\">parameter steering page</a></p>\n" - "<center>\n" - "<table cellspacing=\"5\" cellpadding=\"5\"\n>" - "<tr><th>File Name</th><th>Variable</th><th>Description</th></tr>\n"); + "<div class=\"centered\">\n" + "<table cellspacing=\"5\" cellpadding=\"5\" rules=\"cols\">\n" + "<thead>\n" + "<tr><th>File Name</th><th>Variable</th><th>Description</th></tr>\n" + "</thead>\n<tbody>\n"); for (list = filelist; list; list = list->next) { @@ -263,7 +267,7 @@ static int AdvertisedFilePage(const cGH *GH, httpRequest *request, void *data) Send_HTTP_String(request, message); } - Send_HTTP(request,"</table></center>"); + Send_HTTP(request,"</tbody></table>\n</div>"); /* Write out the footer part. */ SetHTML_ContentFooter(GH, 0, message); @@ -315,9 +319,9 @@ static int SendFilePage(const cGH *GH, httpRequest *request, void *data) Send_HTTP(request, "<html>\n<head>\n"); Send_HTTP(request, "<title>Error 500: Internal Error</title>\n"); Send_HTTP(request, "</head>\n<body>\n"); - Send_HTTP(request, "<center><p>Unable to open " ); + Send_HTTP(request, "<div class=\"centered\"><p>Unable to open " ); Send_HTTP(request, list->filename ); - Send_HTTP(request, "</p></center>\n"); + Send_HTTP(request, "</p></div>\n"); Send_HTTP(request, "</body>\n</html>\n" ); } break; @@ -333,9 +337,9 @@ static int SendFilePage(const cGH *GH, httpRequest *request, void *data) Send_HTTP(request, "<html>\n<head>\n" ); Send_HTTP(request, "<title>Error 404: Not Found</title>\n" ); Send_HTTP(request, "</head>\n<body>\n" ); - Send_HTTP(request, "<center><p>" ); + Send_HTTP(request, "<div class=\"centered\"><p>" ); Send_HTTP(request, request->uri ); - Send_HTTP(request, " does not exist</p></center>\n" ); + Send_HTTP(request, " does not exist</p></div>\n" ); Send_HTTP(request, "</body>\n</html>\n" ); } return 0; @@ -373,21 +377,24 @@ static int ViewportFilePage(const cGH *GH, httpRequest *request, void *data) SetHTML_HeadHeader( message); Send_HTTP_String(request, message ); + Send_HTTP(request, "</head>\n<body>\n"); + /* HTTP_Write out the header part. */ SetHTML_ContentHeader(GH, 0, message, NULL); Send_HTTP_String(request, message); - Send_HTTP(request, "<h1>Viewport</h1>"); + Send_HTTP(request, "<h1>Viewport</h1>\n"); Send_HTTP(request, "<p>This page displays certain types of the output files \n" "from the <a href=\"/Output/index.html\">download</a> page \n" - "as images (currently only jpegs [mime type image/jpeg]).</p>\n" + "as images (currently only JPEGs [mime type image/jpeg]).</p>\n" "<p>Many IO methods have <dfn>steerable</dfn> parameters which \n" "allow you to e.g. add fields and customise behaviour.\n" "Depending on your authorisation, you can access the \n" - "<a href=\"/Parameters/index.html\">parameter steering page</a></p>\n"); + "<a href=\"/Parameters/index.html\">parameter steering page</a></p>\n" + "<div class=\"centered\">\n"); for (list = filelist; list; list = list->next) { @@ -396,8 +403,7 @@ static int ViewportFilePage(const cGH *GH, httpRequest *request, void *data) if (!foundone) { Send_HTTP(request, - "<center>" - "<table cellspacing=\"5\" cellpadding=\"5\" border=\"0\"\n>" + "<table cellspacing=\"5\" cellpadding=\"5\">\n" "<tr><th>Variable<br>File Name</th>\n" "<th>Description</th><th>Image</th></tr>\n"); foundone = 1; @@ -428,12 +434,12 @@ static int ViewportFilePage(const cGH *GH, httpRequest *request, void *data) if (!foundone) { - Send_HTTP(request, "<center><strong><p>No viewable images registered!</p>" - "<strong></center>\n"); + Send_HTTP(request, "<strong>\n<p>No viewable images registered!</p>\n" + "</strong>\n"); } - Send_HTTP(request, "</table>\n</center>\n"); + Send_HTTP(request, "</div>\n"); /* Write out the footer part. */ diff --git a/src/Processors.c b/src/Processors.c index f0c3527..fb6330e 100644 --- a/src/Processors.c +++ b/src/Processors.c @@ -109,7 +109,14 @@ static int ProcessorsPage(const cGH *cctkGH, httpRequest *request, void *data) SetHTML_HeadHeader( message); Send_HTTP_String(request, message ); - + + Send_HTTP(request, "<style type=\"text/css\">\n"); + Send_HTTP(request, " th, td { padding-left: 1em; padding-right: 1em; }\n"); + Send_HTTP(request, " td.name { text-align: left; }\n"); + Send_HTTP(request, " td.number { text-align: center; }\n"); + Send_HTTP(request, "</style>\n"); + Send_HTTP(request, "</head>\n<body>\n"); + /* HTTP_Write out the header part. */ SetHTML_ContentHeader(cctkGH, 0, message, NULL); retval = Send_HTTP_String(request, message); @@ -117,7 +124,7 @@ static int ProcessorsPage(const cGH *cctkGH, httpRequest *request, void *data) Send_HTTP(request, "<h1>Processor Information</h1>\n"); Send_HTTP(request, - "<center>\n<table>\n" + "<div class=\"centered\">\n<table rules=\"cols\">\n" "<tr>" "<th>Number</th>\n" "<th>Machine Name</th>\n" @@ -126,15 +133,15 @@ static int ProcessorsPage(const cGH *cctkGH, httpRequest *request, void *data) nprocs = CCTK_nProcs(cctkGH); for (np=0;np<nprocs;np++) { - SetToCString( message, "<tr><td align=center>" ); + SetToCString( message, "<tr><td class=\"number\">" ); ConcatDecimal( message, np ); - ConcatCString( message, "</td><td align=left>" ); + ConcatCString( message, "</td><td class=\"name\">" ); ConcatCString( message, HTTPDExtra_RemoteHostName(np) ); ConcatCString( message, "</td></tr>\n"); Send_HTTP_String(request, message ); } - retval = Send_HTTP(request, "</table>\n</center>\n"); + retval = Send_HTTP(request, "</table>\n</div>\n"); SetHTML_ContentFooter(cctkGH, 0, message); retval = Send_HTTP_String(request, message); |