chiark / gitweb /
WIP colouring in
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 28 Oct 2009 22:20:14 +0000 (22:20 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 28 Oct 2009 22:20:14 +0000 (22:20 +0000)
12 files changed:
yarrg/web/autohandler
yarrg/web/devel
yarrg/web/docs
yarrg/web/dumptable
yarrg/web/intro
yarrg/web/lookup
yarrg/web/query_age
yarrg/web/query_commod
yarrg/web/query_offers
yarrg/web/query_route
yarrg/web/query_routesearch
yarrg/web/routetrade

index 8ff09966b953143dfd474a4a0d43c66913f47c38..8096e66a61ba23b41181904fab5b596c5a2a5405 100644 (file)
@@ -94,5 +94,11 @@ $r->content_type('text/html; charset=UTF-8');
     which contains mostly contributions from YARRG users and is not
     covered by the AGPL.
 -->
-
+<style type="text/css">
+  body { margin: 0; }
+  div.navoptbar { padding: 1em; background: #e0e0ff; }
+  address { background: #d7d8b3; padding: 1em; }
+  div.docs { padding: 1em; }
+  hr { display: none; }
+</style>
 % $m->call_next();
index fecd77dc1b25449701391f4a8a65d6b888703d6b..b29dc421fc1b80762a6eef2bcca5d57653c366c6 100755 (executable)
@@ -37,6 +37,7 @@
 <title>YARRG (Yet Another Revenue Research Gatherer)</title>
 </head><body>
 
+<div class="navoptbar">
 <a href="lookup">YARRG</a> -
  Yet Another Revenue Research Gatherer
 |
@@ -45,6 +46,8 @@
 <a href="docs">documentation</a>
 |
 <b>development</b>
+</div>
+<div class="docs">
 
 <h1>YARRG development, contribution and troubleshooting</h1>
 
@@ -141,4 +144,5 @@ Email Ian Jackson ijackson (at) chiark.greenend.org.uk.  Or talk to
 any Fleet Officer or above of the crew Special Circumstances on the
 Midnight Ocean.
 
+</div>
 <& footer, isdevel => 1 &>
index 9feaa6b651d02f6d60aa068ee3e004eb19f5cd81..6edf934b4fb783ff6e499fea666bce836cfa49be 100755 (executable)
@@ -36,6 +36,7 @@
 <html lang="en"><head><title>Website documentation - YARRG</title>
 </head><body>
 
+<div class="navoptbar">
 <a href="lookup">YARRG</a> -
  Yet Another Revenue Research Gatherer
 |
@@ -44,6 +45,8 @@
 <b>documentation</b>
 |
 <a href="devel">development</a>
+</div>
+<div class="docs">
 
 <h1>Looking up data in YARRG</h1>
 
@@ -202,4 +205,5 @@ them for 20 PoE each, and then buy 2000 beans at B for 10 PoE each and
 sail them to C to sell for 20 PoE each even if such a trade would in
 fact be possible.  In practice this is unlikely to be a problem!
 
+</div>
 <& footer &>
index 739f14d8b04f8eb3a8993f3572637c9f804ce22d..4e1fb3e5215e743ec7be8f06b505ecd82f44a2a8 100644 (file)
@@ -59,7 +59,7 @@ $cols => $sth->{NAME}
 $qa => undef
 </%args>
 %      if (!$qa || $qa->{'debug'}) {
-<table frame=box rules=all>
+<table class="data" frame=box rules=all>
 <tr>
 %              foreach my $field (@$cols) {
 <th><% $field |h %>
index 825189b883e9a6c7f8fea8026d125f424b0fe524..87a2ab0fe0f9d0ceeb9ecba27ed9a2c1fd8993d6 100755 (executable)
@@ -37,6 +37,7 @@
 <title>YARRG (Yet Another Revenue Research Gatherer)</title>
 </head><body>
 
+<div class="navoptbar">
 <a href="lookup">YARRG</a> -
  Yet Another Revenue Research Gatherer
 |
@@ -45,7 +46,8 @@
 <a href="docs">documentation</a>
 |
 <a href="devel">development</a>
-
+</div>
+<div class="docs">
 <h1>Introduction to YARRG</h1>
 
 YARRG (Yet Another Revenue Research Gatherer) is a third-party tool
@@ -122,4 +124,5 @@ Email Ian Jackson ijackson (at) chiark.greenend.org.uk.  Or talk to
 any Fleet Officer or above of the crew Special Circumstances on the
 Midnight Ocean.
 
+</div>
 <& footer &>
index 56b34fc36fb09d228cb4d9598f5c138a507ef444..6021531c39b6b631fcf0c638db27ac2de0dca8f8 100755 (executable)
@@ -128,12 +128,12 @@ $ours
 
 <html lang="en"><head><title><% ucfirst $ahtml{Query} %> - YARRG</title>
 <style type="text/css">
-body {
-  color: #000000;
-  background: #ffffff;
-}
-tr.datarow0 { background: #e3e3e3; }
-tr.datarow1 { background: #ffffff; }
+  body { color: #000000; background: #c5c7ae; }
+  div.query { background: #d7d8b3; padding: 1em; }
+  div.results { padding: 1em; }
+  table.data { background: #b5b686; }
+  tr.datarow0 { background: #e3e3e3; }
+  tr.datarow1 { background: #ffffff; }
 </style>
 <&| script &>
   function register_onload(f) {
@@ -147,6 +147,7 @@ tr.datarow1 { background: #ffffff; }
 </head><body>
 
 % if (!printable($m)) {
+<div class="navoptbar">
 <a href="<% $m->current_comp()->name() |u %>">YARRG</a> -
  Yet Another Revenue Research Gatherer
 |
@@ -255,6 +256,7 @@ $debug => 0
 </%args>
 
 % if (!printable($m)) {
+</div>
 <hr>
 % }
 
@@ -271,16 +273,16 @@ $debug => 0
        return 0;
     }
  &>
-
-<p>
+</div>
 
 %#---------- debugging and epilogue ----------
 
 % if ($debug) {
-<p>
+<div class="results">
 <pre id="debug_log">
 Debug log:
 </pre>
+</div>
 % }
 
 <&| script &>
index 7cfe54e291799e6c8daa53ec0207c0f4d37eeead..419febc976277efae36a682129fabd428c657061 100644 (file)
@@ -52,6 +52,7 @@ my $sth= $dbh->prepare("SELECT archipelago, islandid, islandname, timestamp
 $sth->execute();
 
 </%perl>
+<div class="results">
 
 <& SELF:pageload &>
 <%method pageload>
@@ -69,12 +70,11 @@ $sth->execute();
   $now
   $fetchrow
 </%args>
-<table id="ts_table">
+<table class="data" id="ts_table" rules="groups">
 <tr>
 <th>Archipelago
 <th>Island
 <th>Age
-</tr>
 % my $row;
 % my %da_ages;
 % my %ts_sortkeys;
index 3b2bf3554533f40a334d63690dac86f023b16764..153ea792c92e7f9abcc9eac7472d37c72bdb7fca 100644 (file)
@@ -50,6 +50,7 @@ my ($commodname,$cmid);
 my $qa= \%ARGS;
 </%perl>
 
+<div class="query">
 <h1>Commodity enquiry</h1>
 
 % $prselector->('BuySell');
@@ -69,6 +70,8 @@ my $qa= \%ARGS;
 </form>
 
 %#========== results ==========
+</div>
+<div class="results">
 <%perl>
 
 $emsgokorprint->($emsg) or $cmid=undef;
@@ -109,7 +112,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
 %      my $rowix= 0;
 %      while ($island= $islands->fetchrow_hashref) {
 %              if (!$rowix) {
-<table id="<% $bs %>_table" rules=groups>
+<table class="data" id="<% $bs %>_table" rules=groups>
 <colgroup span=2>
 <colgroup span=1>
 <colgroup span=2>
index 76f45c0da52f143bb39fd7de472c5a1118539cdf..6dc70f47d015f9813e828111c41c7ab6363b2066 100644 (file)
@@ -54,6 +54,7 @@ my ($commodname,$cmid);
 my $qa= \%ARGS;
 </%perl>
 
+<div class="query">
 <h1>Prices for commodity at location(s)</h1>
 
 % $prselector->('BuySell');
@@ -79,6 +80,8 @@ my $qa= \%ARGS;
 <& "lookup:formhidden", ours => $ours &>
 
 </form>
+</div>
+<div class="results">
 
 %#========== results ==========
 <%perl>
@@ -166,7 +169,7 @@ foreach my $bs (split /_/, $qa->{BuySell}) {
 </%perl>
 %      while ($row= $sth->fetchrow_arrayref) {
 %              if (!$rowix) {
-<table id="<% $bs %>_table" rules=groups>
+<table class="data" id="<% $bs %>_table" rules=groups>
 <colgroup span=2>
 <colgroup span=3>
 <colgroup span=1>
index fb32bcdd705017d6ad82f7da4a3344c55b44b47e..eeb4331eb067b7645dadb2506995d0a4323d600b 100644 (file)
@@ -64,6 +64,8 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' };
 
 </%perl>
 
+<div class="query">
+
 <h1>Specify route</h1>
 
 % # Sadly we need to do this rather hacky thing to make it be a POST
@@ -100,6 +102,8 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' };
 % };
 <& "lookup:formhidden", ours => $ours &>
 
+</div>
+<div class="results">
 <%perl>
 #========== results ==========
 
index 89a81371845c06069fe43b197a6ad8d945e89abb..2816086c068c9ed39a92e2e0221c649048f3dee9 100644 (file)
@@ -67,6 +67,7 @@ my $maxcountea=15;
 
 </%perl>
 
+<div class="query">
 <h1>Find most profitable routes and trades</h1>
 
 % if ($qa->{Dropdowns}) {
@@ -102,6 +103,8 @@ This feature is not available from the "drop down menus" interface.
 % }
 
 </form>
+</div>
+<div class="results">
 <%perl>
 
 if (!$emsg && $maxdist > $maxmaxdist) {
@@ -273,7 +276,7 @@ $someresults->();
 %      } else {
 <h2>Best routes for profit per league</h2>
 %      }
-<table rules=groups id="ap<% $ap %>_table">
+<table class="data" rules=groups id="ap<% $ap %>_table">
 <colgroup span=2>
 <colgroup span=1>
 <colgroup span=1>
@@ -344,8 +347,3 @@ Per league values count each island visited as one
 (additional) league; the `Dist.' column is however the actual distance
 to be sailed.  All profit figures are somewhat approximate; get a
 complete trading plan for a route for accurate information.
-
-<%perl>
-
-
-</%perl>
index 09e908b1ac44e160fb817dacb612a8c746e19b67..ce319facae713bb9e32edddf86a1509d979b4772 100644 (file)
@@ -625,7 +625,7 @@ Generated by YARRG at <strong><%
 %
 <h2><a name="plan">Voyage trading plan</a></h2>
 
-<table rules=groups <% printable($m) ? 'width=100%' : '' %> >
+<table class="data" rules=groups <% printable($m) ? 'width=100%' : '' %> >
 % my $tbody= sub {
 %      if (!printable($m)) { return '<tbody>'; }
 %#  return "<tr><td colspan=7><hr>";
@@ -857,7 +857,7 @@ Islands shown in reverse order of visits.<br>
 %      my $cdspan= $qa->{ShowStalls} ? ' colspan=2' : '';
 %      my $cdstall= $qa->{ShowStalls} ? '<th>Stall</th>' : '';
 <h2><a name="trades">Relevant trades</a></h2>
-<table id="trades" rules=groups>
+<table class="data" id="trades" rules=groups>
 <colgroup span=1>
 <colgroup span=2>
 <% $qa->{ShowStalls} ? '<colgroup span=2>' : '' %>
@@ -965,7 +965,7 @@ Islands shown in reverse order of visits.<br>
        throw => 'trades_sort', tbrow => 'trades_total' &>
   ts_sortkeys= <% to_json_protecttags(\%ts_sortkeys) %>;
 </&tabsort>
-
+<p>
 <input type=submit name=update value="Update">
 
 % } # !printable