/*#######################################################################################
AVR Small Webserver 

Copyright (C) 2004 Ulrich Radig

#######################################################################################*/
#include "main.h"
#include "webpage.h"

PROGMEM char HTTP_200[] = {
"HTTP/1.0 200 OK\r\n"
"Server: ATMega8\r\n"
"Content-Type: text/html\r\n"
"\r\n"
"%END"
};

PROGMEM char HTTP_200_CSS[] = {
"HTTP/1.0 200 OK\r\n"
"Server: ATMega8\r\n"
"Content-Type: text/css\r\n"
"\r\n"
"%END"
};

PROGMEM char HTTP_302[] = {
"HTTP/1.0 302 Found\r\n"
"Location: /\r\n"
"Server: ATMega8\r\n"
"Content-Type: text/html\r\n"
"\r\n"
"%END"
};

PROGMEM char HTTP_404[] = {
"HTTP/1.0 404 Not Found\r\n"
"Server: ATMega8\r\n"
"Content-Type: text/html\r\n"
"\r\n"
"%END"
};

PROGMEM char PageMain[] = {
"<html><head><title>Mega8 Webserver</title>\n"
"<meta http-equiv=\"expires\" content=\"0\">\n"
"<link href=\"m8.css\" rel=\"stylesheet\" type=\"text/css\"></head>\n"
"<body><h1>Mega8 Webserver</h1><form action=\"/\">\n"
"<h2>Password</h2><div class=\"pwd\">\n"
"<input type=\"password\" name=\"pwd\" size=\"10\" maxlength=\"8\"></div>\n"
"<h2>Relay</h2><ul>\n"
"<li><input type=\"submit\" name=\"rel\" value=\"ON\" class=\"%REL\"></li>\n"
"<li><input type=\"submit\" name=\"rel\" value=\"OFF\" class=\"%REL\"></li></ul>\n"
"<h2>Output</h2><ul>\n"
"<li><input type=\"submit\" name=\"out\" value=\"ON\" class=\"%OUT\"></li>\n"
"<li><input type=\"submit\" name=\"out\" value=\"OFF\" class=\"%OUT\"></li></ul>\n"
"<h2>Input</h2><p class=\"inp %INP\">%INP</p>\n"
"</form><p class=\"ftr\">Mega8 Webserver, based on\n"
"<a href=\"http://www.ulrichradig.de/\">Ulrich Radig's Firmware</a>, modified by\n"
"<a href=\"http://www.elektronik.de.vu/\">Arne Rossius</a>.</p></body>"
"%END" //%END = Ende des Files
};

PROGMEM char PageCSS[] = {
"body{font-size:1em;font-weight:normal;font-family:Verdana,sans-serif;background:#333;color:#fff;text-align:center;}\n"
"h1{font-size:1.5em;font-weight:bold;}\n"
"h2{clear:both;font-size:1.2em;font-weight:bold;border:1px solid #ff0;width:10em;margin:2em auto 0;padding:.125em 0;background:#fc0;color:#333;}\n"
".pwd{width:12em;border:solid #ff0;border-width:0 1px 1px;margin:0 auto;padding:.5em 0;background:#666;}\n"
".pwd *{font-weight:bold;font-family:Courier New, monospace;border:1px solid #ccc;background:#333;text-align:center;color:#ff0;}\n"
".pwd *:focus{background:#999;}\n"
"[value=\"NOP\"]{display:none;}\n"
"ul{margin:0 auto;padding:0;display:table;border:solid #ff0;border-width:0 1px 1px;}\n"
"li{list-style-type:none;display:inline;display:table-cell;background:blue;width:6em;}\n"
"li input{width:6em;font-size:1em;font-weight:normal;border:0 solid #ff0;padding:.5em 0;cursor:pointer;color:#000;}\n"
"[value=\"ON\"]{background:lime;border-width:0 1px 0 0;}\n"
"[value=\"OFF\"]{background:red;}\n"
"[value=\"ON\"].on{font-weight:bold;}\n"
"[value=\"OFF\"].off{font-weight:bold;}\n"
"[value=\"ON\"]:hover,[value=\"ON\"]:focus{background:#090;}\n"
"[value=\"OFF\"]:hover,[value=\"OFF\"]:focus{background:#900;}\n"
"p.inp{font-weight:bold;color:#000;margin:0 auto;padding:.5em 0;width:12em;border:solid #ff0;border-width:0 1px 1px;text-transform:uppercase;}\n"
"p.on{background:lime;}\n"
"p.off{background:red;}\n"
"p.ftr{margin:3em 0 1em;font-style:italic;}\n"
"a:link{color:#ff0;}\n"
"a:visited{color:#f90;}\n"
"a:active,a:focus{color:red;}"
"%END" //%END = Ende des Files
};

PROGMEM char Page302[] = {
"<html><head><title>302 Found</title></head>\n"
"<body><h1>302 Found</h1>\n"
"<p>The file you requested was found <a href=\"/\">here</a>.</p>\n"
"<hr><address>Mega8 Webserver</address>\n"
"</body></html>"
"%END" //%END = Ende des Files
};

PROGMEM char Page404[] = {
"<html><head><title>404 Not Found</title></head>\n"
"<body><h1>404 Not Found</h1>\n"
"<p>The file you requested could not be found on this server.</p>\n"
"<hr><address>Mega8 Webserver</address>\n"
"</body></html>"
"%END" //%END = Ende des Files
};
