r7088: start on some real structure for the SWAT web pages
authorAndrew Tridgell <tridge@samba.org>
Mon, 30 May 2005 06:15:01 +0000 (06:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:14 +0000 (13:17 -0500)
- this imports the basic css pages from samba.org

- i have created some useful ejs scripts in common.js that will be included by all pages

- added a real login page, and a logout button showing who you are logged in as

- added page_header() and page_footer() functions that take a page type, allowing
  for "plain" or "columms" pages

- added some simple menus on the left of the columns page type, with links to the esp
  tests and some useful links for samba4 developers
(This used to be commit 86d2ecf0f2a8de8abfdcc5f2aae7d4d969d19339)

26 files changed:
swat/docs/menu.js [new file with mode: 0644]
swat/esptest/auth.esp
swat/esptest/exception.esp
swat/esptest/formtest.esp
swat/esptest/include.esp
swat/esptest/index.esp [deleted file]
swat/esptest/index.html [deleted file]
swat/esptest/ldb.esp
swat/esptest/loadparm.esp
swat/esptest/menu.js [new file with mode: 0644]
swat/esptest/session.esp
swat/esptest/showvars.esp
swat/images/linkpad.gif [new file with mode: 0755]
swat/index.esp
swat/login.esp [new file with mode: 0644]
swat/logout.esp [new file with mode: 0644]
swat/scripting/common.js [new file with mode: 0644]
swat/scripting/footer.esp [new file with mode: 0644]
swat/scripting/footer_columns.esp [new file with mode: 0644]
swat/scripting/footer_plain.esp [new file with mode: 0644]
swat/scripting/header.esp [new file with mode: 0644]
swat/scripting/header_columns.esp [new file with mode: 0644]
swat/scripting/header_plain.esp [new file with mode: 0644]
swat/scripting/preauth.esp [new file with mode: 0644]
swat/style/common.css [new file with mode: 0644]
swat/style/main.css [new file with mode: 0644]

diff --git a/swat/docs/menu.js b/swat/docs/menu.js
new file mode 100644 (file)
index 0000000..eceacf9
--- /dev/null
@@ -0,0 +1,6 @@
+/* show a menu for the docs directory */
+simple_menu(
+       "Samba Information",
+       "Samba4 development", "http://devel.samba.org/",
+       "Recent Checkins", "http://build.samba.org/?tree=samba4&function=Recent+Checkins",
+       "Recent Builds",   "http://build.samba.org/?tree=samba4&function=Recent+Builds");
index ac85ddc026a62696a8a3d0b91cc3e88c8faadec5..35953dc7dc3532a893124599b4cea1015af520a6 100644 (file)
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP Authentication Test"); %>
+
 <h1>Samba4 unixAuth test</h1>
 
 <form name="AuthTest" method="POST" action="@@request['SCRIPT_NAME']"> 
@@ -22,7 +19,7 @@ Samba4 ESP test
 if (request['REQUEST_METHOD'] == "POST") {
        /* if they cancelled then take them back to the list of tests */
        if (form['submit'] == "Cancel") {
-               redirect("index.esp");
+               redirect("/");
        }
        
        username  = form['Username'];
@@ -48,5 +45,4 @@ write ("<br>PRIVILEGE = " + session['PRIVILEGE'] + "\n");
 
 %>
 
-</BODY>
-</HTML>
+<% page_footer(); %>
index d569fbe7760ad59239a46128c6b235914c1a82da..abea890d987122faa53e90400b4008d9b3bec889 100644 (file)
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP Exception test"); %>
+
 <h1>Samba4 exception test</h1>
 
 <form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']"> 
@@ -15,7 +12,7 @@ Samba4 ESP test
 if (request['REQUEST_METHOD'] == "POST") {
        /* if they cancelled then take them back to the list of tests */
        if (form['submit'] == "Cancel") {
-               redirect("index.esp");
+               redirect("/");
        }
 
        function TestFunction(arg1, arg2) {
@@ -33,5 +30,5 @@ if (request['REQUEST_METHOD'] == "POST") {
 %>
 
 and here is some filler text ...
-</BODY>
-</HTML>
+
+<% page_footer(); %>
index 7996900eb210bd53c6754e4256dc499c4abc17a6..89e542c55291c12077354eb95850006b40a40d1f 100644 (file)
@@ -1,9 +1,4 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-<h1>Samba4 form test</h1>
+<% page_header("columns", "ESP Form Test"); %>
 
 <form name="FormTest" method="POST" action="@@request['SCRIPT_NAME']"> 
     firstName: <input name="firstName" type="text" value=""><br>
@@ -20,7 +15,7 @@ Samba4 ESP test
 
   /* if they cancelled then take them back to the list of tests */
   if (form['submit'] == "Cancel") {
-     redirect("index.esp");
+     redirect("/");
   }
 %>
   You chose firstName=@@form['firstName'] lastName=@@form['lastName']
@@ -37,5 +32,4 @@ Samba4 ESP test
   }
 %>
 
-</BODY>
-</HTML>
+<% page_footer(); %>
index 9b67a768da50967b99d08850ebf901ee8e3b79d7..f7fd5e0b910821bb293de1228516747f92673845 100644 (file)
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP Include Test"); %>
+
 including /scripting/test.ejs<p>
 <% include("/scripting/test.ejs"); %>
 calling a function from test.ejs ...<p>
@@ -14,9 +11,8 @@ calling a function from test.esp ...<p>
 <% res = testfn('foo'); %>
 result is: @@res
 
-<form name="Cancel" method="POST" action="index.esp"> 
+<form name="Cancel" method="POST" action="/"> 
     <input name="submit" type="submit" value="Cancel"><br>
 </form>
 
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/index.esp b/swat/esptest/index.esp
deleted file mode 100644 (file)
index 40f6cbc..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<%
-  var tests = new Array("formtest", "showvars", "include", 
-                        "session", "loadparm", "exception",
-                       "ldb", "auth");
-%>
-
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-<img src="/images/logo.png" alt="Samba">
-<h1>Samba4 ESP test</h1>
-
-Please choose one of the following tests:
-<ul>
-<%
-  for (test in tests) {
-     url = tests[test] + ".esp";
-     write("<li> <a href=" + url + ">" + tests[test] + "</a>");
-  }
-%>
-</ul>
-
-For more information on ejs see <a
-href="http://www.appwebserver.org/products/ejs/ejs.html">http://www.appwebserver.org/products/ejs/ejs.html</a><p>
-
-For more information on esp see <a
-href="http://www.appwebserver.org/products/esp/esp.html">http://www.appwebserver.org/products/esp/esp.html</a><p>
-
-</BODY> 
-</HTML>
diff --git a/swat/esptest/index.html b/swat/esptest/index.html
deleted file mode 100644 (file)
index 0c64b4f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<%
-  var tests = new Array("formtest", "showvars", "include");
-%>
-
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-<img src="/images/logo.png" alt="Samba">
-<h1>Samba4 ESP test</h1>
-
-Please choose one of the following tests:
-<ul>
-<%
-  for (test in tests) {
-     url = tests[test] + ".html";
-     write("<li> <a href=" + url + ">" + tests[test] + "</a>");
-  }
-%>
-</ul>
-</BODY>
-</HTML>
index 3285574bf29bafc911b7a96f15d13b89bd5009a7..1bc75bce73063862e6043ed5768f43c395deb02b 100644 (file)
@@ -1,19 +1,16 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP ldb test"); %>
+
 <h1>Samba4 ldb test</h1>
 
-<form name="LdbTest" method="POST" action="@@request['SCRIPT_NAME']"> 
-    <input name="submit" type="submit" value="Cancel"><br>
+<form name="LdbTest" method="post" action="@@request['SCRIPT_NAME']"> 
+    <input name="submit" type="submit" value="Cancel" /><br />
 </form>
 
 <%
 if (request['REQUEST_METHOD'] == "POST") {
        /* if they cancelled then take them back to the list of tests */
        if (form['submit'] == "Cancel") {
-               redirect("index.esp");
+               redirect("/");
        }
 }
 
@@ -27,10 +24,10 @@ function showLdbRes(res) {
                        var a = r[j];
                        if (typeof(a) == "object") {
                                for (k in a) {
-                                       write(j + "[" + k + "]=" + a[k] + "<br>\n");
+                                       write(j + "[" + k + "]=" + a[k] + "<br />\n");
                                }
                        } else {
-                               write(j + "=" + r[j] + "<br>\n");
+                               write(j + "=" + r[j] + "<br />\n");
                        }
                }
                write("<p>");
@@ -43,7 +40,7 @@ Trying a attribute constrained search on samdb:<p>
 
 <%
 var dbfile = lpGet("sam database");
-var attrs = new Array("name", "dnsDomain", "objectSid");
+var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
 
 res = ldbSearch(dbfile, "(objectClass=domain)", attrs);
 showLdbRes(res);
@@ -54,10 +51,16 @@ and now an unconstrained search:<p>
 <%
 var dbfile = lpGet("sam database");
 
-res = ldbSearch(dbfile, "(objectClass=domain)");
+res = ldbSearch(dbfile, "(objectClass=user)");
 showLdbRes(res);
 %>
 
+and a bad search<br>
+
+<%
+res = ldbSearch("foo");
+%>
+
+all done
 
-</BODY>
-</HTML>
+<% page_footer() %>
index b9f2c54ec5a83728ca8391b029be73071bcde659..0ed69d939a56c16b0ca5e75c7dedbf252857372a 100644 (file)
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP loadparm test"); %>
+
 <h1>Samba4 loadparm test</h1>
 
 <form name="LoadparmTest" method="POST" action="@@request['SCRIPT_NAME']"> 
@@ -37,7 +34,7 @@ function showValue(name, v) {
 if (request['REQUEST_METHOD'] == "POST") {
        /* if they cancelled then take them back to the list of tests */
        if (form['submit'] == "Cancel") {
-               redirect("index.esp");
+               redirect("/");
        }
        
        var v;
@@ -73,5 +70,4 @@ showParameter("server signing");
 showParameter("interfaces");
 %>
 
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/menu.js b/swat/esptest/menu.js
new file mode 100644 (file)
index 0000000..3b16824
--- /dev/null
@@ -0,0 +1,11 @@
+/* show a menu for the esp test pages */
+simple_menu(
+       "ESP Tests",
+       "ldb database",       "/esptest/ldb.esp",
+       "html forms",         "/esptest/formtest.esp",
+       "esp includes",       "/esptest/include.esp",
+       "session variables",  "/esptest/session.esp",
+       "loadparm access",    "/esptest/loadparm.esp",
+       "exception handling", "/esptest/exception.esp",
+       );
+
index e1d6a6370d98052ee856c942c22b41f14308d2ab..3d787012c60f676928e56eaa99e1eca40fc203dd 100644 (file)
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP session test"); %>
+
 <h1>Samba4 session test</h1>
 
 <form name="SessionTest" method="POST" action="@@request['SCRIPT_NAME']"> 
@@ -22,7 +19,7 @@ Samba4 ESP test
 if (request['REQUEST_METHOD'] == "POST") {
        /* if they cancelled then take them back to the list of tests */
        if (form['submit'] == "Cancel") {
-               redirect("index.esp");
+               redirect("/");
        }
        
        name  = form['Name'];
@@ -61,5 +58,4 @@ showArray("session", session);
 write("SessionId=" + request['SESSION_ID'] + "<br>\n");
 %>
 
-</BODY>
-</HTML>
+<% page_footer(); %>
index 04bfb7b1f629c7735145c142ec0e09aab82d9ee9..262a0962b7911dca6f2b5c3166357fd2b08833c9 100644 (file)
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP standard variables test"); %>
+
 <h1>Samba4 showvars test</h1>
 
 <%
@@ -26,10 +23,10 @@ Samba4 ESP test
    showArray("session", session);
 %>
 
-<form name="Cancel" method="POST" action="index.esp"> 
+<form name="Cancel" method="POST" action="/"> 
     <input name="submit" type="submit" value="Cancel"><br>
 </form>
 
 </ul>
-</BODY>
-</HTML>
+
+<% page_footer(); %>
diff --git a/swat/images/linkpad.gif b/swat/images/linkpad.gif
new file mode 100755 (executable)
index 0000000..613b4f5
Binary files /dev/null and b/swat/images/linkpad.gif differ
index 373bd9f74e7d88af1c68474cb7c6230d1598b0a3..325deeddaeef39139f061026d7e0ead21fb57221 100644 (file)
@@ -1,20 +1,7 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-redirecting you to the test pages ...
-<%
-if (server['SERVER_PROTOCOL'] == "http" &&
-    server['TLS_SUPPORT'] == "True") {
-       if (headers['HOST']) {
-               redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
-       } else {
-               redirect("https://" + server['SERVER_NAME'] + ":" + server['SERVER_PORT'] + request['REQUEST_URI']);
-       }
-} else {
-       redirect("esptest/index.esp");
-}
-%>
-</BODY>
-</HTML>
+<% page_header("columns", "Welcome to SWAT"); %>
+
+<h1>Welcome to SWAT!</h1>
+
+Please select a menu item from the selection on the left
+
+<% page_footer(); %>
diff --git a/swat/login.esp b/swat/login.esp
new file mode 100644 (file)
index 0000000..1dfc114
--- /dev/null
@@ -0,0 +1,29 @@
+<% page_header("plain", "SWAT Login"); %>
+
+<form name="login" method="POST" action="@@request.SCRIPT_NAME"> 
+    Username:   <input name="Username"  type="text" value=""><br>
+    Password:  <input name="Password" type="password" value=""><br>
+    <br>
+    <input name="submit" type="submit" value="Login"><br>
+</form>
+
+<%
+       if (request.REQUEST_METHOD == "POST") {
+               /* for now just authenticate everyone */
+               session.AUTHENTICATED = true;
+               session.authinfo = new Object();
+
+               session.authinfo.username = form.Username;
+
+               /* if the user was asking for the login page, then now
+                  redirect them to the main page. Otherwise just
+                  redirect them to the current page, which will now
+                  show its true content */
+               if (request.REQUEST_URI == "/login.esp") {
+                  redirect("/");
+               } else {
+                  redirect(request.REQUEST_URI);
+               }
+       }
+%>
+<% page_footer(); %>
diff --git a/swat/logout.esp b/swat/logout.esp
new file mode 100644 (file)
index 0000000..b725d63
--- /dev/null
@@ -0,0 +1,8 @@
+<% 
+page_header("plain", "Logging out"); 
+
+session.AUTHENTICATED = false;
+redirect("/login.esp");
+
+page_footer(); 
+%>
diff --git a/swat/scripting/common.js b/swat/scripting/common.js
new file mode 100644 (file)
index 0000000..0691512
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+       js functions and code common to all pages
+*/
+
+/* define some global variables for this request */
+global.page = new Object();
+
+/* fill in some defaults */
+global.page.title = "Samba Web Administration Tool";
+
+/*
+  show the page header. page types include "plain" and "column" 
+*/
+function page_header(pagetype, title) {
+       global.page.pagetype = pagetype;
+       global.page.title = title;
+       include("/scripting/header_" + pagetype + ".esp");
+}
+
+/*
+  show the page footer, getting the page type from page.pagetype
+  set in page_header()
+*/
+function page_footer() {
+       include("/scripting/footer_" + global.page.pagetype + ".esp");
+}
+
+/*
+  check if a uri is one of the 'always allowed' pages, even when not logged in
+  This allows the login page to use the same style sheets and images
+*/
+function always_allowed(uri) {
+       var allowed = new Array("/images/favicon.ico", 
+                               "/images/linkpad.gif",
+                               "/images/logo.png",
+                               "/style/main.css",
+                               "/style/common.css");
+       for (i in allowed) {
+               if (allowed[i] == uri) {
+                       return true;
+               }
+       }
+       return false;
+}
+
+/*
+  display a simple menu. First argument is menu title, followed by
+  pairs of menu item name and link
+*/
+function simple_menu() {
+       write("<i>" + arguments[0] + "</i><br /><ul>\n");
+       for (i = 1; i < arguments.length; i = i + 2) {
+               write("<li><a href=\"" + arguments[i+1] + "\">" + arguments[i] + "</a></li>\n");
+       }
+       write("</ul>\n");
+}
diff --git a/swat/scripting/footer.esp b/swat/scripting/footer.esp
new file mode 100644 (file)
index 0000000..5f85cab
--- /dev/null
@@ -0,0 +1 @@
+</html>
diff --git a/swat/scripting/footer_columns.esp b/swat/scripting/footer_columns.esp
new file mode 100644 (file)
index 0000000..29b06a4
--- /dev/null
@@ -0,0 +1,7 @@
+<% 
+   /* footer for columns page type */
+%>
+</div>
+</div>
+</body>
+<% include("/scripting/footer.esp"); %>
diff --git a/swat/scripting/footer_plain.esp b/swat/scripting/footer_plain.esp
new file mode 100644 (file)
index 0000000..ea0a3f7
--- /dev/null
@@ -0,0 +1,7 @@
+<% 
+   /* footer for plain page type */
+%>
+</div>
+</div>
+</body>
+<% include("/scripting/footer.esp"); %>
diff --git a/swat/scripting/header.esp b/swat/scripting/header.esp
new file mode 100644 (file)
index 0000000..1630b2b
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
diff --git a/swat/scripting/header_columns.esp b/swat/scripting/header_columns.esp
new file mode 100644 (file)
index 0000000..6122124
--- /dev/null
@@ -0,0 +1,68 @@
+<% include("/scripting/header.esp"); %>
+
+<title>@@global.page.title</title>
+
+<link rel="stylesheet" href="/style/common.css" type="text/css" media="all" />
+<link rel="stylesheet" href="/style/main.css" type="text/css" media="all" />
+<link rel="shortcut icon" href="/images/favicon.ico" />
+
+<!--[if gte IE 5.5]>
+       <style type="text/css">
+       /*<![CDATA[*/
+       .logo_hack {
+filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/logo.png',sizingMethod='scale');
+       }
+       /*]]>*/ 
+       </style>
+<![endif]-->
+
+<!--[if lte IE 5]>
+       <style type="text/css">
+       /*<![CDATA[*/
+       .logo_hack {
+       background-image:url(/images/logo.gif);
+       background-position:center;
+       background-repeat:no-repeat;
+       top:23.5px;
+       left:-10px;
+       }
+       /*]]>*/
+        </style>
+<![endif]-->
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="Content-Language" content="en-us" />
+
+</head>
+
+
+<body>
+
+<div id="banner">
+  <div class="stripe"></div>
+  <div class="logout">
+  <b>logged in as @@session.authinfo.username</b>
+  <form method="post" action="/logout.esp">
+  <input type="submit" value="Logout" />
+  </form>
+  </div>
+</div>
+
+<div id="logo">
+  <div class="logo_hack"><a href="/"><img src="/images/linkpad.gif" alt="SWAT" /></a></div>
+</div>
+
+<div class="slogan">
+  <h4>Samba Web Administration Tool</h4>
+</div>
+
+<div class="nav">
+     <% 
+     include("/docs/menu.js"); 
+     include("/esptest/menu.js");
+     %>
+</div>
+
+<div id="content">
+  <div class="center">
diff --git a/swat/scripting/header_plain.esp b/swat/scripting/header_plain.esp
new file mode 100644 (file)
index 0000000..69bd0cd
--- /dev/null
@@ -0,0 +1,51 @@
+<% include("/scripting/header.esp"); %>
+
+<title>@@global.page.title</title>
+
+<link rel="stylesheet" href="/style/common.css" type="text/css" media="all" />
+<link rel="stylesheet" href="/style/main.css" type="text/css" media="all" />
+<link rel="shortcut icon" href="/images/favicon.ico" />
+
+<!--[if gte IE 5.5]>
+       <style type="text/css">
+       /*<![CDATA[*/
+       .logo_hack {
+filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/logo.png',sizingMethod='scale');
+       }
+       /*]]>*/ 
+       </style>
+<![endif]-->
+
+<!--[if lte IE 5]>
+       <style type="text/css">
+       /*<![CDATA[*/
+       .logo_hack {
+       background-image:url(/images/logo.gif);
+       background-position:center;
+       background-repeat:no-repeat;
+       top:23.5px;
+       left:-10px;
+       }
+       /*]]>*/
+        </style>
+<![endif]-->
+
+</head>
+
+
+<body>
+
+<div id="banner">
+  <div class="stripe"></div>
+</div>
+
+<div id="logo">
+  <div class="logo_hack"><a href="/"><img src="/images/linkpad.gif" alt="SWAT" /></a></div>
+</div>
+
+<div class="slogan">
+  <h4>Samba Web Administration Tool</h4>
+</div>
+
+<div id="content">
+  <div class="center">
diff --git a/swat/scripting/preauth.esp b/swat/scripting/preauth.esp
new file mode 100644 (file)
index 0000000..489f6b5
--- /dev/null
@@ -0,0 +1,17 @@
+<%
+include("/scripting/common.js");
+
+/* this script is called on every web request. If it produces any
+   output at all then that output is returned and the requested page
+   is not given or processed.
+*/ 
+if (server['SERVER_PROTOCOL'] == "http" &&
+    server['TLS_SUPPORT'] == "True") {
+       write("redirect to https");
+        redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
+} else if (always_allowed(request['REQUEST_URI']) != true && 
+          session['AUTHENTICATED'] == undefined) {
+       /* present the login page */
+       include("/login.esp");
+}
+%>
diff --git a/swat/style/common.css b/swat/style/common.css
new file mode 100644 (file)
index 0000000..58406cc
--- /dev/null
@@ -0,0 +1,185 @@
+/* common.css */
+
+       /********* Basic elements across the site **********/
+       /***************************************************/
+
+body {
+       margin:0;
+       background-color:#E5E9F5;
+       font-family:Lucidasans, Helvetica, Verdana, sans-serif;
+       font-size:medium;
+       color:#000;
+}
+h1 {
+       font-size:x-large;
+}
+h2 {
+       text-align:left;
+       color:#FFFF64;
+       font-size:large;
+       background-color:#3878CD;
+       margin-top:60px;
+       margin-bottom:15px;
+       padding:2px;
+       padding-left:5px;
+}
+h3 {
+       font-size:medium;
+}
+h5 {
+       font-size:small;
+       text-align:right;
+       display:inline;
+}
+* html h5 {
+       padding-right:4px;
+}
+h6 {
+       font-size:small;
+       text-align:right;
+       text-align:right;
+}
+h6 a {
+       margin-right:3px;
+}
+table.real thead { 
+        background-color: #E5E9F5;
+}
+table.real th,
+table.real td {
+        border: 1px solid #3878CD;
+        padding: 2px;
+}
+table.real { 
+        border: 2px solid #3878CD;
+        background-color: #F5F8FF;
+}
+a:link:hover {
+       color:#CC0033;
+       background-color:#FFFF64;
+}
+ol li {
+       margin-bottom:12px;
+}
+blockquote {                           
+       margin:35px;                    
+       padding:15px;                   
+       border-left:2px groove #CCC;
+       border-top:2px groove #CCC;
+}
+img {
+       border:0;
+}
+.punch {                       /*creates a bold typeface */
+       font-weight:bold;
+}
+
+       /********************* header styles *******************************/
+       /******************************************************************/
+#banner {
+       position:absolute;
+       top:0;
+       left:0;
+       height:90px;
+       width:100%;
+       padding-top:4px;
+       background-color:#FFFF64;
+}
+.logout {
+       text-align:right;
+
+}
+.logout form {
+       display:inline;
+}
+.stripe {
+       position:absolute;
+       top:40px;
+       left:0;
+       height:55px;
+       width:100%;
+       background-color:#3878CD;
+       border-top:2px solid #575756;
+       border-bottom:2px solid #575756;
+}
+.slogan {
+       position:absolute;
+       left:187px;
+       z-index:1;
+}
+html>body .slogan {    /**** Opera needs its own rule *********/
+       top:100px;
+}
+:root .slogan {                /**** Undo the Opera rule for all other browsers ****/
+       top:80px;
+}
+* html .slogan {       /** Then, give IE 5/6 its own rule ****** */
+       top:100px;
+}
+
+               /******** PNG logo with transparency across browsers  */
+               /******************************************************/
+#logo>.logo_hack {
+       background-image:url(/images/logo.png);
+       background-position:center;
+       background-repeat:no-repeat;
+}
+.logo_hack {
+       position:absolute;
+       top:25px;
+       left:0;
+       width:250px;
+       height:119px;
+       padding:0;
+       margin:0;
+}
+.logo_hack a:hover {
+       background:transparent;
+}
+
+               /******** Main nav menu styles ****************/
+               /**********************************************/
+.nav {
+       position:absolute;
+       top:152px;
+       left:20px;
+       width:180px;
+       background-color:#F5F8FF;
+       border:2px groove #3878CD;
+       padding:0;
+       padding-bottom:5px;
+       margin:0;
+       z-index:1;
+}
+.nav ul {
+       list-style-type:none;
+       text-align:center;
+       padding:0;
+       margin:0;
+}
+.nav a,
+.nav a:link,
+.nav a:visited {
+       display:block;
+       height:20px;
+       font-size:small;
+       color:#2B5C9F;
+}
+.nav a:hover {
+       color:#FFF;
+       background-color:#3878CD;
+}
+.nav a:active {
+       color:#FFFF64;
+       background-color:#3878CD;
+       font-size:14px;
+}
+.nav img {
+       padding:0;
+       margin:0;
+       width:180px;
+       height:30px;
+}
+.colophon {
+       margin-left:20px;
+}
diff --git a/swat/style/main.css b/swat/style/main.css
new file mode 100644 (file)
index 0000000..15f768d
--- /dev/null
@@ -0,0 +1,107 @@
+/* main.css */
+
+               /******* Links for right-hand side of the page ******/
+               /****************************************************/
+#links {
+       float:right;
+       margin:115px 1em 0 0;  
+       padding:0;
+    width:173px;
+}
+* html #links {        /* Applies to IE5/6 only */
+       margin:115px .5% 0 0;
+}
+#links h4 {
+       margin-top:10px;
+       margin-left:1.5px;
+       font-size:small;
+}
+#links ul {
+       list-style-type:none;
+       padding:0;
+       padding-top:5px;
+       margin-left:20px;
+}
+#links a {
+       font-size:small;
+}
+#links p {
+       margin-top:25px;
+       margin-left:20px;
+}
+.releases {
+       padding:2px;
+       margin-top:35px;
+       border:1px solid #CCC;
+       background-color:#E5E9F5;
+}
+.beyond, .related, .intl {
+       padding:2px;
+       margin-top:25px;
+       border:1px solid #CCC;
+       background-color:#E5E9F5;
+}
+.beyond li {
+       margin-bottom:10px;
+}
+.contacts li{
+       list-style-type:disc;
+}
+               /****** Formats the page layout ********************/
+               /**************************************************/ 
+#content>.center {
+       min-height:800px;
+       z-index:0;
+}
+.center {
+       margin:0 22% 0 175px;
+       padding-top:130px;
+       padding-left:35px;
+       padding-bottom:50px;
+       padding-right:15px;
+       background-color:#FFF;
+       border-left:1px solid #FFFF64;
+       border-right:1px solid #FFFF64;
+       z-index:-1;
+}
+.center ul {
+       list-style-type:none;
+}
+.headline {
+        margin-left:20px;
+        font-style:italic;
+}
+               /*********T-shirts and mirror footnotes *************/
+               /****************************************************/
+.plugs {
+       font-style:italic;
+       text-align:center;
+       border-top:2px groove #3878CD;
+       border-bottom:2px groove #3878CD;
+       padding:10px;
+       margin-top:100px;
+}
+.plugs p {
+       padding:30px;
+}
+.plugs img {
+       float:left;
+}
+.request {
+       margin-top:50px;
+       font-style:italic;
+       font-size:small;
+}
+#noswp img {
+    border:1px solid #3868CD;
+    width:370px;
+    height:90px;
+}
+#noswp a:hover {
+    background-color:transparent;
+}
+#noswp {
+    width:auto;
+    text-align:center;
+    margin:10px 0 25px 0;
+}