]> Pileus Git - ~andy/aweather-web/commitdiff
Initial import
authorAndy Spencer <andy753421@gmail.com>
Fri, 17 Jun 2011 05:28:22 +0000 (05:28 +0000)
committerAndy Spencer <andy753421@gmail.com>
Fri, 17 Jun 2011 05:28:22 +0000 (05:28 +0000)
33 files changed:
.gitignore [new file with mode: 0644]
.htaccess [new file with mode: 0644]
data/global.css [new file with mode: 0644]
html.ct [new file with mode: 0644]
html.h [new file with mode: 0644]
images/aweather.ico [new file with mode: 0644]
images/dl-arrow.png [new file with mode: 0644]
images/dl-bg.png [new file with mode: 0644]
images/logo.png [new file with mode: 0644]
images/main-bg.png [new file with mode: 0644]
images/nav-bg.png [new file with mode: 0644]
images/os-linux.png [new file with mode: 0644]
images/os-macos.png [new file with mode: 0644]
images/os-windows.png [new file with mode: 0644]
index.c [new file with mode: 0644]
mkfile [new file with mode: 0644]
push.sh [new file with mode: 0755]
screens/globe.png [new file with mode: 0644]
screens/globe_s.png [new file with mode: 0644]
screens/grits.png [new file with mode: 0644]
screens/grits_s.png [new file with mode: 0644]
screens/iso.png [new file with mode: 0644]
screens/iso_s.png [new file with mode: 0644]
screens/meso.png [new file with mode: 0644]
screens/meso_s.png [new file with mode: 0644]
screens/plugins.png [new file with mode: 0644]
screens/plugins_s.png [new file with mode: 0644]
screens/region.png [new file with mode: 0644]
screens/region_s.png [new file with mode: 0644]
screens/synop.png [new file with mode: 0644]
screens/synop_s.png [new file with mode: 0644]
screens/terrain.png [new file with mode: 0644]
screens/terrain_s.png [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..ea1a3a0
--- /dev/null
@@ -0,0 +1,5 @@
+*~
+*.o
+*.cgi
+*.swp
+html.c
diff --git a/.htaccess b/.htaccess
new file mode 100644 (file)
index 0000000..60d65f6
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,4 @@
+Options +ExecCGI
+AddHandler cgi-script .cgi
+RewriteEngine on
+RewriteRule ^([a-z]*)$ 'index.cgi/$1'
diff --git a/data/global.css b/data/global.css
new file mode 100644 (file)
index 0000000..f65efc9
--- /dev/null
@@ -0,0 +1,314 @@
+/* Clearn defaults */
+* {
+       margin: 0;
+       padding: 0;
+       outline: 0;
+       position: relative; 
+}
+
+h1, h2, h3, h4, h5, h6 {
+       font-weight: normal;
+}
+
+a {
+       color: black;
+       text-decoration: none;
+}
+
+a img {
+       border: none;
+}
+
+ul {
+       display: block;
+}
+
+/* Global styles */
+.content h1, h2 {
+       margin-top: 1em;
+}
+h3, h4, h5, h6 {
+       margin-top: 0.5em;
+}
+blockquote {
+       font-style: italic;
+       font-family: serif;
+}
+blockquote:before {
+       font-weight: bold;
+       content: '“';
+}
+blockquote:after {
+       font-weight: bold;
+       content: '”';
+}
+ul {
+       left: 30px;
+}
+span.code {
+       font-family: monospace;
+}
+div.code {
+       font-family: monospace;
+       background-color: #666;
+       border: solid 1px #222;
+       padding: 2px 6px 2px 6px;
+       margin-bottom: 5px;
+       color: white;
+       font-weight: bold;
+}
+
+/* Layout */
+body {
+       background: fixed;
+       background-image: url('../images/main-bg.png');
+       background-repeat: repeat-x;
+       background-color: white;
+       margin-left: auto;
+       margin-right: auto;
+       font-family: sans-serif;
+       width: 850px;
+       /* width: 80%; */
+
+}
+
+/* Header stuff */
+.top {
+       height: 80px;
+       margin-top: 15px;
+       border-collapse: collapse;
+}
+
+.top * {
+       float: left;
+}
+
+.logo {
+       width: 130px;
+       z-index: 1;
+}
+
+.title {
+       font-size: 22pt;
+       font-weight: bold;
+       font-style: italic;
+       font-family: 'DejaVu Sans', sans-serif;
+       color: #222;
+}
+
+.nav {
+       position: absolute;
+       top: 45px;
+       left: 135px;
+       right: 0px;
+       z-index: 1;
+       height: 36px;
+       margin: 0 0px 0 30px;
+       padding: 0 15px 0 15px;
+       border-radius: 8px;
+       -moz-border-radius: 8px;
+       background-image: url("../images/nav-bg.png");
+       box-shadow: 0px 2px 2px #a0a0ff;
+}
+
+.nav .sep {
+       float: left;
+       clear: none;
+       display: block;
+       float: left;
+       width: 0px;
+       height: 36px;
+       border-left:  solid 1px #222;
+       border-right: solid 1px #777;
+       margin: 0 10px 0 10px;
+}
+
+.nav a {
+       display: block;
+       margin: 5px 7px 5px 7px;
+       padding: 2px;
+       font-size: 12pt;
+       font-weight: normal;
+       color: #f4f4f4;
+       border: solid 1px transparent;
+       border-radius: 4px;
+       -moz-border-radius: 4px;
+}
+
+.nav a:hover {
+       text-decoration: underline;
+}
+
+.nav a.cur {
+       background-color: #666;
+       border: solid 1px #888;
+       text-decoration: none;
+}
+
+/* Content */
+.content {
+       background-color: white;
+       color: black;
+       margin-top: 20px;
+       padding: 24px;
+       border:     solid 1px #bce;
+       border-top: solid 1px #abd;
+       border-radius: 8px;
+       -moz-border-radius: 8px;
+}
+
+.content hr {
+       margin: 25px 0 25px 0;
+}
+
+.content ul.left {
+       width: 250px;
+}
+
+.content a {
+       text-decoration: underline;
+}
+
+/* Footer */
+.footer, .footer * {
+       text-align: center;
+       font-size: 8pt;
+       margin-top: 5px;
+       color: #444;
+}
+.footer a {
+       text-decoration: underline;
+}
+
+/***********************
+ * Page specific stuff *
+ ***********************/
+/* Index page */
+.buttons {
+       float: right;
+       width: 200px;
+       margin-left: 25px;
+}
+
+.buttons > * {
+       margin-bottom: 10px;
+}
+
+.download {
+       display: block;
+       height: 62px;
+       color: white;
+       padding: 8px 10px 8px 10px;
+       background-image: url("../images/dl-bg.png");
+       border-radius: 10px;
+       -moz-border-radius: 10px;
+       box-shadow: 0px 2px 2px rgba(0,0,0,0.30);
+}
+
+.download:first-line {
+       font-weight: bold;
+       font-style: italic;
+       line-height: 2em;
+}
+
+.download img {
+       position: absolute;
+       top: 10px;
+       right: 10px;
+}
+
+.screen {
+       float: right;
+       margin-left: 25px;
+}
+
+/* Screnshots */
+.gallery {
+       left: 0px; /* override ul */
+       margin: 20px;
+       font-size: larger;
+}
+.gallery > * {
+       list-style: none;
+       text-align: center;
+       left:   0;
+       float:  left;
+       width:  320px;
+       height: 350px;
+       margin: 15px;
+       padding-left:  15px;
+       padding-right: 15px;
+}
+.gallery a {
+       display: block;
+}
+.gallery img {
+       box-shadow: 0px 2px 6px #888;
+       margin-bottom: 4px;
+       float: none;
+       margin-left:   0px;
+}
+
+/* News */
+.news {
+       margin-top: 20px;
+}
+.news dt {
+       clear: both;
+       font-weight: bold;
+}
+.news dd {
+       margin-left:   10px;
+       margin-bottom: 15px;
+}
+.note { 
+       font-style: italic;
+       text-align: center;
+}
+
+/* Downloads */
+li.linux, li.windows, li.macos {
+       list-style-type: none;
+       background-repeat: no-repeat;
+       padding-left: 50px;
+       margin: 10px 10px 20px 0;
+       clear: both;
+}
+li.linux {
+       background-image: url("../images/os-linux.png");
+}
+li.windows {
+       background-image: url("../images/os-windows.png");
+}
+li.macos {
+       background-image: url("../images/os-macos.png");
+}
+dl.inline dt {
+       display: block;
+       float: left;
+       clear: both;
+       font-weight: bold;
+       width: 8em;
+}
+dl.inline dt:after {
+       content: ":";
+}
+h1 + .note,
+h2 + .note {
+       text-align: left;
+       margin-bottom: 10px;
+}
+
+dl.inline dt {
+       display: block;
+       float: left;
+       clear: both;
+       font-weight: bold;
+       width: 8em;
+}
+dl.inline dt:after {
+       content: ":";
+}
+dl.small dt {
+       width: 4em;
+}
diff --git a/html.ct b/html.ct
new file mode 100644 (file)
index 0000000..af42dca
--- /dev/null
+++ b/html.ct
@@ -0,0 +1,334 @@
+<% #include "html.h" %>
+
+<% /* Global functions */ %>
+<% void print_header(void) { %>
+Content-Type: application/xhtml+xml; charset=UTF-8
+
+<% } %>
+
+<% void print_nav(const page_t *page, const page_t *cur) { %>
+       <% const char *class = page == cur ? " class=\"cur\"" : ""; %>
+       <a href="<%= page->link %>"<%= class %>><%= page->name %></a>
+<% } %>
+
+<% void print_screen(char *name) { %>
+       <a href="screens/<%= name %>.png">
+               <img src="screens/<%= name %>_s.png" alt="<%= name %>" class="screen" />
+       </a>
+<% } %>
+
+<% void print_page(const page_t *page) { %>
+<?xml version="1.0" encoding="UTF-8"?> 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
+       <head> 
+               <title>AWeather<% if (page->name) printf(" - %s", page->name); %></title> 
+               <meta http-equiv="X-UA-Compatible" content="IE=9" />
+               <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> 
+               <link rel="shortcut icon" href="images/aweather.ico" />
+               <link href="data/global.css" rel="stylesheet" type="text/css" />
+       </head> 
+       <body> 
+               <div class="top">
+                       <!-- <a href=""><img class="logo" src="../data/aweather.svg" /></a> -->
+                       <a href="."><img class="logo" src="images/logo.png" alt="AWeather" /></a>
+                       <h1 class="title"><a href=".">AWeather</a></h1>
+                       <h2 class="nav">
+                               <% for (int i = 0; header[i].link; i++) print_nav(&header[i], page); %>
+                               <span class="sep" />
+                               <% print_nav(&grits[0], page); %>
+                       </h2>
+               </div>
+               <div class="content">
+                       <% page->print(); %>
+                       <br style="clear:both;" />
+               </div>
+               <p class="footer">
+                       Copyright © 2011 Andy Spencer
+                       <% for (int i = 0; footer[i].link; i++) { %>
+                               | <% print_nav(&footer[i], page); %>
+                       <% } %>
+               </p>
+       </body> 
+</html> 
+<% } %>
+
+<% /* Normal Pages */ %>
+<% void print_about(void) { %>
+       <p class="intro">
+       To the best of my knowledge, all the weather related programs currently
+       available for Linux are either very simple and provide little
+       meteorological information or are huge, ancient, or proprietary beasts
+       created for the National Weather Service. AWeather is made to fill the
+       gap by providing lots of weather information while still using standard
+       free software practices. As such, the research focus of this software
+       is weather, not creative way to write software.
+       </p>
+       <hr />
+       <h2>Intended Features</h2>
+       <ul>
+               <li>High quality data sources
+                   (Level-II archive, etc)</li>
+               <li>3D Volume browser (todo)</li>
+               <li>GTK+ User Interface</li>
+               <li>API for algorithms
+                   (vortex/hail signatures, rain-rate, etc)
+                   (todo)</li>
+               <li>Other?</li>
+       </ul>
+
+       <h2>Status</h2>
+       <blockquote>Now that it's spring again, progress on AWeather is continuing.</blockquote>
+       <h3>Working</h3>
+       <ul>
+               <li>Level-II and Conus NEXRAD imagery</li>
+               <li>Real-time and offline mode</li>
+               <li>Virtual Globe base rendering</li>
+               <ul><li>Including terrain, satellite, and map imagery</li></ul>
+               <li>Auto-updating</li>
+               <li>volume display</li>
+       </ul>
+       <h3>Todo</h3>
+       <ul>
+               <li>Vertical cross sections</li>
+               <li>Derived NEXRAD data (storm relative motion, echo tops, compost reflective, etc)</li>
+               <li>Additional data sources (watch/warning boxes, surface data, etc)</li>
+               <li>Animation</li>
+       </ul>
+<% } %>
+
+<% void print_news(void) { %>
+       <dl class="news">
+               <dt>2011-06-13</dt>
+               <dd>Started work on this new website. Lots of progress in AWeather as well:<ul>
+                       <li>Merged support for isosurfaces to the main branch (Finally!)</li>
+                       <li>Added an option to automatically refresh after a timeout</li>
+                       <li>New fullscreen mode</li>
+               </ul></dd>
+
+               <dt>2010-05-17</dt>
+               <dd>AWeather 0.4.1:<ul>
+                       <li>Win32 fixes and improved debug support</li>
+                       <li>Fix bug with daylight savings time</li>
+                       <li>Function to clear old cache entries</li>
+               </ul></dd>
+
+               <dt>2010-05-14</dt>
+               <dd>AWeather 0.4:<ul>
+                       <li>Conus radar images</li>
+                       <li>Multiple radars support</li>
+                       <li>Gentoo, Ubuntu, MS Windows and source packages are available</li>
+               </ul></dd>
+
+               <dt>2009-11-09</dt>
+               <dd>AWeather 0.3.0 released, based on libgis but still rather
+                   buggy.</dd>
+
+               <dt>2009-10-24</dt>
+               <dd>AWeather 0.2.3 (maintenance release).<br/>
+                   Added a Application menu entry and a few build/runtime fixes.</dd>
+
+               <dt>2009-09-02</dt>
+               <dd>The source repository has been migrated to Git. A lot of
+                   progress is being made on libgis, which is now able to display
+                   a virtual globe using data from NASA servers.</dd>
+       </dl>
+       <p class="note">See also: AWeather's <a href="/git/?p=proj/aweather">gitweb</a></p>
+<% } %>
+
+<% void print_screenshots(void) { %>
+       <br />
+       <p>
+               AWeather provides consistent user interface that allows the
+               user to zoom in from a high level view of the entire Earth down
+               to regional and microscale views.
+       </p>
+       <ul class="gallery">
+               <li>
+                       <% print_screen("synop"); %>
+                       High level view using grits
+               </li>
+               <li>
+                       <% print_screen("region"); %>
+                       Regional view of a storm front
+               </li>
+               <li>
+                       <% print_screen("meso"); %>
+                       Mesoscale view of a tornadic system
+               </li>
+               <li>
+                       <% print_screen("iso"); %>
+                       Close up showing a 52.5 dBZ isosurface
+               </li>
+       </ul>
+<% } %>
+
+<% void print_download(void) { %>
+       <h2>Stable release</h2>
+       <p class="note">
+               While AWeather won't be considered stable until version 1.0,<br />
+               these are as close to stable as you can get until then
+       </p>
+       <ul>
+               <li class="linux"><dl class="inline">
+                       <dt>Source code</dt>
+                       <dd><a href="../aweather-0.4.2.tar.gz">aweather-0.4.2.tar.gz</a></dd>
+
+                       <dt>Gentoo</dt>
+                       <dd>Emerge <span class="code">sci-geosciences/aweather</span> from the sunrise overlay</dd>
+
+                       <dt>Debian</dt>
+                       <dd>Packaging in progress, check back soon</dd>
+               </dl></li>
+               <li class="windows"><dl class="inline">
+                       <dt>Windows</dt>
+                       <dd><a href="../aweather-0.4.2-gtk.exe">aweather-0.4.2-gtk.exe</a></dd>
+
+                       <dt>Update only</dt>
+                       <dd><a href="../aweather-0.4.2.exe">aweather-0.4.2.exe</a></dd>
+               </dl></li>
+               <li class="macos" style="padding-top: .8em; padding-bottom: .8em">
+                       Coming soon (hopefully)
+               </li>
+       </ul>
+
+       <h2>Unstable releases</h2>
+       <p class="note">Pre-releases, betas, and other hazardous software</p>
+       <div style="margin-left: 30px;">
+               <p>Check out the <a href="../">releases</a> directory for any potential updates</p>
+               <p>Pre-releases are labeled with a -p0 and are mainly build for testing the Windows packages</p>
+       </div>
+
+       <h2>Development code</h2>
+       <p class="note">
+               Development code is available from Git, and from gitweb
+               (<a href="/git/?=proj/aweather">AWeather</a>,
+                <a href="/git/?=proj/grits">Grits</a>, 
+                <a href="/git/?=~spenceal/rsl">RSL</a>)
+       </p>
+       <div style="margin-left: 30px;">
+               <div class="code">git clone git://lug.rose-hulman.edu/proj/aweather</div>
+               <div class="code">git clone git://lug.rose-hulman.edu/proj/grits</div>
+               <div class="code">git clone git://lug.rose-hulman.edu/~spenceal/rsl</div>
+       </div>
+<% } %>
+
+<% void print_development(void) { %>
+       <!-- Open source mumbo jumbo.. -->
+
+       <p class="note" style="clear: both;">
+               The AWeather <a href="/code/projects/aweather/wiki">development wiki</a>
+               is the main resource for development material.
+       </p>
+
+       <h2>Bug report and feature requests</h2>
+       <div style="margin-left: 30px;">
+               <p><a href="/code/projects/aweather/issues/new">New issue</a></p>
+               <p><a href="/code/projects/aweather/issues">Open issues</a></p>
+       </div>
+
+       <h2>How to contribute?</h2>
+       <ul>
+               <li>Locate or host Meteorological and Geospatial data feeds</li>
+               <li>Maintain a Mac OS, Windows, or Linux installer</li>
+               <li>Test AWeather and submit bug reports</li>
+               <li>Make better logo!</li>
+       </ul>
+
+       <h2>Building AWeather</h2>
+       <p class="note">See the <a href="code/projects/aweather/wiki/Install">install</a> wiki page for more details</p>
+       <ul>
+               <li>AWeather has direct dependencies on Grits, and RSL, among other things.</li>
+               <li>Currently building AWeather will require the exact same version of
+                   Grits to be installed, but this may change in the near future as
+                   the software stabilizes.</li>
+       </ul>
+       
+       <h2>Architecture Overview</h2>
+       <ul>
+               <li>Built on top of GObject and GTK+</li>
+               <li>Uses the Grits "Virtual Globe" library for much of the graphics work.<br />
+                   Grits also provides some other generic functionality and a plugin API.</li>
+               <li>AWeather itself is a front-end for grits along with a
+                   bundle of weather related plugins.</li>
+       </ul>
+<% } %>
+
+<% void print_grits(void) { %>
+       <h1>Grits</h1>
+       <p>Grits is a Virtual Globe library developed along side AWeather, but
+          can be used by other programs as well.</p>
+       <p>It is differentiated from other Virtual Globes such as Google Earth,
+          NASA World Wind, and KDE Marble in that it is developed as a library
+          that is used by other programs, such as AWeather, rather than
+          providing a user interface that is used directly.</p>
+       <ul class="gallery">
+               <li>
+                       <% print_screen("grits"); %>
+                       Grits without any plugins
+
+               </li>
+               <li>
+                       <% print_screen("plugins"); %>
+                       Satellite and Environment plugins
+               </li>
+               <li>
+                       <% print_screen("terrain"); %>
+                       Elevation plugin showing a mountain
+               </li>
+       </ul>
+<% } %>
+
+<% /* Footer Pages */ %>
+<% void print_contact(void) { %>
+       <h1>Contact</h1>
+       <p class="note">Questions? Comments? Trouble compiling AWeather?</p>
+       <dl class="inline small">
+               <dt>Email</dt><dd><a href="mailto:andy753421@gmail.com">Andy Spencer</a></dd>
+               <dt>IRC</dt>  <dd>#rhlug@irc.freenode.net</dd>
+       </dl>
+<% } %>
+
+<% void print_legal(void) { %>
+       <h1>Legal</h1>
+<% } %>
+
+<% /* Special Pages */ %>
+<% void print_index(void) { %>
+       <p class="intro">
+               AWeather is designed to be an advanced weather program which is
+               designed to be used by weather enthusiasts. AWeather is not
+               another weather dockapp that simply displays a pre-computed
+               forecast. It is designed to be an easy to use program that
+               integrates a variety of weather data in simple unified
+               interface; see features for more details.
+       </p>
+       <hr />
+       <% print_screen("meso"); %>
+       <div class="buttons">
+               <a class="download" href="">
+                       <p>Download</p>
+                       <p>AWeather 0.5-p0 source</p>
+                       <img src="images/dl-arrow.png" />
+               </a>
+               <a class="download" href="">
+                       <p>Download</p>
+                       <p>AWeather 0.5-p0 source</p>
+                       <img src="images/dl-arrow.png" />
+               </a>
+       </div>
+       <b>Features:</b>
+       <ul class="left">
+               <li>Detailed Level-II radar</li>
+               <li>3D volume rendering</li>
+               <li>Dual-pole support</li>
+               <li>Surface and map overlays</li>
+               <li>Terrain rendering</li>
+               <li>Online and offline modes with
+                   caching and automatic updating</li>
+       </ul>
+<% } %>
+
+<% void print_notfound(void) { %>
+       <h1>404 - Not found</h1>
+<% } %>
diff --git a/html.h b/html.h
new file mode 100644 (file)
index 0000000..ef99197
--- /dev/null
+++ b/html.h
@@ -0,0 +1,30 @@
+/* Types */
+typedef struct {
+       const char *link;
+       const char *name;
+       void (*print)(void);
+} page_t;
+
+/* Data */
+extern page_t header[];
+extern page_t grits[];
+extern page_t footer[];
+extern page_t special[];
+
+/* Global functions */
+void print_header(void);
+void print_page(const page_t *which);
+
+/* Pages */
+void print_about(void);
+void print_news(void);
+void print_screenshots(void);
+void print_download(void);
+void print_development(void);
+void print_grits(void);
+
+void print_contact(void);
+void print_legal(void);
+
+void print_index(void);
+void print_notfound(void);
diff --git a/images/aweather.ico b/images/aweather.ico
new file mode 100644 (file)
index 0000000..b3730fc
Binary files /dev/null and b/images/aweather.ico differ
diff --git a/images/dl-arrow.png b/images/dl-arrow.png
new file mode 100644 (file)
index 0000000..264822f
Binary files /dev/null and b/images/dl-arrow.png differ
diff --git a/images/dl-bg.png b/images/dl-bg.png
new file mode 100644 (file)
index 0000000..b3fed97
Binary files /dev/null and b/images/dl-bg.png differ
diff --git a/images/logo.png b/images/logo.png
new file mode 100644 (file)
index 0000000..29c9da4
Binary files /dev/null and b/images/logo.png differ
diff --git a/images/main-bg.png b/images/main-bg.png
new file mode 100644 (file)
index 0000000..fc7bbd6
Binary files /dev/null and b/images/main-bg.png differ
diff --git a/images/nav-bg.png b/images/nav-bg.png
new file mode 100644 (file)
index 0000000..975257e
Binary files /dev/null and b/images/nav-bg.png differ
diff --git a/images/os-linux.png b/images/os-linux.png
new file mode 100644 (file)
index 0000000..17cdb9e
Binary files /dev/null and b/images/os-linux.png differ
diff --git a/images/os-macos.png b/images/os-macos.png
new file mode 100644 (file)
index 0000000..ecc6a52
Binary files /dev/null and b/images/os-macos.png differ
diff --git a/images/os-windows.png b/images/os-windows.png
new file mode 100644 (file)
index 0000000..e04f057
Binary files /dev/null and b/images/os-windows.png differ
diff --git a/index.c b/index.c
new file mode 100644 (file)
index 0000000..d66adff
--- /dev/null
+++ b/index.c
@@ -0,0 +1,50 @@
+#include <glib.h>
+#include "html.h"
+
+/* Page data */
+page_t header[] = {
+       {"about",       "About",       print_about},
+       {"news",        "News",        print_news},
+       {"screenshots", "Screenshots", print_screenshots},
+       {"download",    "Download",    print_download},
+       {"development", "Development", print_development},
+       {NULL,          NULL,          NULL},
+};
+page_t grits[] = {
+       {"grits",   "Grits",   print_grits},
+       {NULL,      NULL,      NULL},
+};
+page_t footer[] = {
+       {"contact", "Contact", print_contact},
+       {"legal",   "Legal",   print_legal},
+       {NULL,      NULL,      NULL},
+};
+page_t special[] = {
+       {"index.cgi", NULL,        print_index},
+       {"notfound",  "Not found", print_notfound},
+       {NULL,        NULL,        NULL},
+};
+page_t *everything[] = {header, grits, footer, special, NULL};
+const page_t *index    = &special[0];
+const page_t *notfound = &special[1];
+
+/* Main */
+int main(int argc, char **argv)
+{
+       print_header();
+
+       const gchar *name = g_getenv("PATH_INFO");
+       if (name == NULL || name[0] == '\0' || name[1] == '\0')
+               return print_page(index), 0;
+
+       /* Look up a specific page */
+       for (int i = 0; everything[i];         i++)
+       for (int j = 0; everything[i][j].link; j++) {
+               page_t *page = &everything[i][j];
+               if (g_str_equal(page->link, name+1))
+                       return print_page(page), 0;
+       }
+
+       /* 404 */
+       return print_page(notfound), 0;
+}
diff --git a/mkfile b/mkfile
new file mode 100644 (file)
index 0000000..a0db4a4
--- /dev/null
+++ b/mkfile
@@ -0,0 +1,17 @@
+CT=/scratch/ct/ct
+CFLAGS='--std=c99 -Wall'
+
+PKG_FLAGS=`{pkg-config --cflags glib-2.0}
+PKG_LIBS=`{pkg-config --libs glib-2.0}
+
+index.cgi: index.o html.o
+       gcc $CFLAGS -o $target $prereq $PKG_LIBS
+
+%.o: %.c
+       gcc $CFLAGS $PKG_FLAGS -c -o $target $prereq
+
+%.c: %.ct
+       $CT -o $target $prereq 
+
+clean:
+       rm -f *.o *.cgi html.c
diff --git a/push.sh b/push.sh
new file mode 100755 (executable)
index 0000000..02940a0
--- /dev/null
+++ b/push.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+user=spenceal
+dest=/home/lug/htdocs/proj/aweather/web/
+rsync -uavz \
+       .htaccess $user@lug.rose-hulman.edu:$dest
+rsync -uavz \
+       --delete \
+       --exclude '*~' \
+       --exclude '.*' \
+       --exclude '*.o' \
+       ./ $user@lug.rose-hulman.edu:$dest
diff --git a/screens/globe.png b/screens/globe.png
new file mode 100644 (file)
index 0000000..06311a7
Binary files /dev/null and b/screens/globe.png differ
diff --git a/screens/globe_s.png b/screens/globe_s.png
new file mode 100644 (file)
index 0000000..6ff962c
Binary files /dev/null and b/screens/globe_s.png differ
diff --git a/screens/grits.png b/screens/grits.png
new file mode 100644 (file)
index 0000000..22df408
Binary files /dev/null and b/screens/grits.png differ
diff --git a/screens/grits_s.png b/screens/grits_s.png
new file mode 100644 (file)
index 0000000..b808bc5
Binary files /dev/null and b/screens/grits_s.png differ
diff --git a/screens/iso.png b/screens/iso.png
new file mode 100644 (file)
index 0000000..d2cc2fd
Binary files /dev/null and b/screens/iso.png differ
diff --git a/screens/iso_s.png b/screens/iso_s.png
new file mode 100644 (file)
index 0000000..c07da8e
Binary files /dev/null and b/screens/iso_s.png differ
diff --git a/screens/meso.png b/screens/meso.png
new file mode 100644 (file)
index 0000000..12ddfb9
Binary files /dev/null and b/screens/meso.png differ
diff --git a/screens/meso_s.png b/screens/meso_s.png
new file mode 100644 (file)
index 0000000..15811a3
Binary files /dev/null and b/screens/meso_s.png differ
diff --git a/screens/plugins.png b/screens/plugins.png
new file mode 100644 (file)
index 0000000..720535d
Binary files /dev/null and b/screens/plugins.png differ
diff --git a/screens/plugins_s.png b/screens/plugins_s.png
new file mode 100644 (file)
index 0000000..909f221
Binary files /dev/null and b/screens/plugins_s.png differ
diff --git a/screens/region.png b/screens/region.png
new file mode 100644 (file)
index 0000000..7600f9b
Binary files /dev/null and b/screens/region.png differ
diff --git a/screens/region_s.png b/screens/region_s.png
new file mode 100644 (file)
index 0000000..fb40ef8
Binary files /dev/null and b/screens/region_s.png differ
diff --git a/screens/synop.png b/screens/synop.png
new file mode 100644 (file)
index 0000000..ee2d374
Binary files /dev/null and b/screens/synop.png differ
diff --git a/screens/synop_s.png b/screens/synop_s.png
new file mode 100644 (file)
index 0000000..2ccf9ed
Binary files /dev/null and b/screens/synop_s.png differ
diff --git a/screens/terrain.png b/screens/terrain.png
new file mode 100644 (file)
index 0000000..e95ea6d
Binary files /dev/null and b/screens/terrain.png differ
diff --git a/screens/terrain_s.png b/screens/terrain_s.png
new file mode 100644 (file)
index 0000000..27ce3d7
Binary files /dev/null and b/screens/terrain_s.png differ