chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c56c2a
)
WIP colouring in
author
Ian Jackson
<ian@liberator.relativity.greenend.org.uk>
Wed, 28 Oct 2009 22:20:14 +0000
(22:20 +0000)
committer
Ian Jackson
<ian@liberator.relativity.greenend.org.uk>
Wed, 28 Oct 2009 22:20:14 +0000
(22:20 +0000)
12 files changed:
yarrg/web/autohandler
patch
|
blob
|
history
yarrg/web/devel
patch
|
blob
|
history
yarrg/web/docs
patch
|
blob
|
history
yarrg/web/dumptable
patch
|
blob
|
history
yarrg/web/intro
patch
|
blob
|
history
yarrg/web/lookup
patch
|
blob
|
history
yarrg/web/query_age
patch
|
blob
|
history
yarrg/web/query_commod
patch
|
blob
|
history
yarrg/web/query_offers
patch
|
blob
|
history
yarrg/web/query_route
patch
|
blob
|
history
yarrg/web/query_routesearch
patch
|
blob
|
history
yarrg/web/routetrade
patch
|
blob
|
history
diff --git
a/yarrg/web/autohandler
b/yarrg/web/autohandler
index 8ff09966b953143dfd474a4a0d43c66913f47c38..8096e66a61ba23b41181904fab5b596c5a2a5405 100644
(file)
--- a/
yarrg/web/autohandler
+++ b/
yarrg/web/autohandler
@@
-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.
-->
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();
% $m->call_next();
diff --git
a/yarrg/web/devel
b/yarrg/web/devel
index fecd77dc1b25449701391f4a8a65d6b888703d6b..b29dc421fc1b80762a6eef2bcca5d57653c366c6 100755
(executable)
--- a/
yarrg/web/devel
+++ b/
yarrg/web/devel
@@
-37,6
+37,7
@@
<title>YARRG (Yet Another Revenue Research Gatherer)</title>
</head><body>
<title>YARRG (Yet Another Revenue Research Gatherer)</title>
</head><body>
+<div class="navoptbar">
<a href="lookup">YARRG</a> -
Yet Another Revenue Research Gatherer
|
<a href="lookup">YARRG</a> -
Yet Another Revenue Research Gatherer
|
@@
-45,6
+46,8
@@
<a href="docs">documentation</a>
|
<b>development</b>
<a href="docs">documentation</a>
|
<b>development</b>
+</div>
+<div class="docs">
<h1>YARRG development, contribution and troubleshooting</h1>
<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.
any Fleet Officer or above of the crew Special Circumstances on the
Midnight Ocean.
+</div>
<& footer, isdevel => 1 &>
<& footer, isdevel => 1 &>
diff --git
a/yarrg/web/docs
b/yarrg/web/docs
index 9feaa6b651d02f6d60aa068ee3e004eb19f5cd81..6edf934b4fb783ff6e499fea666bce836cfa49be 100755
(executable)
--- a/
yarrg/web/docs
+++ b/
yarrg/web/docs
@@
-36,6
+36,7
@@
<html lang="en"><head><title>Website documentation - YARRG</title>
</head><body>
<html lang="en"><head><title>Website documentation - YARRG</title>
</head><body>
+<div class="navoptbar">
<a href="lookup">YARRG</a> -
Yet Another Revenue Research Gatherer
|
<a href="lookup">YARRG</a> -
Yet Another Revenue Research Gatherer
|
@@
-44,6
+45,8
@@
<b>documentation</b>
|
<a href="devel">development</a>
<b>documentation</b>
|
<a href="devel">development</a>
+</div>
+<div class="docs">
<h1>Looking up data in YARRG</h1>
<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!
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 &>
<& footer &>
diff --git
a/yarrg/web/dumptable
b/yarrg/web/dumptable
index 739f14d8b04f8eb3a8993f3572637c9f804ce22d..4e1fb3e5215e743ec7be8f06b505ecd82f44a2a8 100644
(file)
--- a/
yarrg/web/dumptable
+++ b/
yarrg/web/dumptable
@@
-59,7
+59,7
@@
$cols => $sth->{NAME}
$qa => undef
</%args>
% if (!$qa || $qa->{'debug'}) {
$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 %>
<tr>
% foreach my $field (@$cols) {
<th><% $field |h %>
diff --git
a/yarrg/web/intro
b/yarrg/web/intro
index 825189b883e9a6c7f8fea8026d125f424b0fe524..87a2ab0fe0f9d0ceeb9ecba27ed9a2c1fd8993d6 100755
(executable)
--- a/
yarrg/web/intro
+++ b/
yarrg/web/intro
@@
-37,6
+37,7
@@
<title>YARRG (Yet Another Revenue Research Gatherer)</title>
</head><body>
<title>YARRG (Yet Another Revenue Research Gatherer)</title>
</head><body>
+<div class="navoptbar">
<a href="lookup">YARRG</a> -
Yet Another Revenue Research Gatherer
|
<a href="lookup">YARRG</a> -
Yet Another Revenue Research Gatherer
|
@@
-45,7
+46,8
@@
<a href="docs">documentation</a>
|
<a href="devel">development</a>
<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
<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.
any Fleet Officer or above of the crew Special Circumstances on the
Midnight Ocean.
+</div>
<& footer &>
<& footer &>
diff --git
a/yarrg/web/lookup
b/yarrg/web/lookup
index 56b34fc36fb09d228cb4d9598f5c138a507ef444..6021531c39b6b631fcf0c638db27ac2de0dca8f8 100755
(executable)
--- a/
yarrg/web/lookup
+++ b/
yarrg/web/lookup
@@
-128,12
+128,12
@@
$ours
<html lang="en"><head><title><% ucfirst $ahtml{Query} %> - YARRG</title>
<style type="text/css">
<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) {
</style>
<&| script &>
function register_onload(f) {
@@
-147,6
+147,7
@@
tr.datarow1 { background: #ffffff; }
</head><body>
% if (!printable($m)) {
</head><body>
% if (!printable($m)) {
+<div class="navoptbar">
<a href="<% $m->current_comp()->name() |u %>">YARRG</a> -
Yet Another Revenue Research Gatherer
|
<a href="<% $m->current_comp()->name() |u %>">YARRG</a> -
Yet Another Revenue Research Gatherer
|
@@
-255,6
+256,7
@@
$debug => 0
</%args>
% if (!printable($m)) {
</%args>
% if (!printable($m)) {
+</div>
<hr>
% }
<hr>
% }
@@
-271,16
+273,16
@@
$debug => 0
return 0;
}
&>
return 0;
}
&>
-
-<p>
+</div>
%#---------- debugging and epilogue ----------
% if ($debug) {
%#---------- debugging and epilogue ----------
% if ($debug) {
-<
p
>
+<
div class="results"
>
<pre id="debug_log">
Debug log:
</pre>
<pre id="debug_log">
Debug log:
</pre>
+</div>
% }
<&| script &>
% }
<&| script &>
diff --git
a/yarrg/web/query_age
b/yarrg/web/query_age
index 7cfe54e291799e6c8daa53ec0207c0f4d37eeead..419febc976277efae36a682129fabd428c657061 100644
(file)
--- a/
yarrg/web/query_age
+++ b/
yarrg/web/query_age
@@
-52,6
+52,7
@@
my $sth= $dbh->prepare("SELECT archipelago, islandid, islandname, timestamp
$sth->execute();
</%perl>
$sth->execute();
</%perl>
+<div class="results">
<& SELF:pageload &>
<%method pageload>
<& SELF:pageload &>
<%method pageload>
@@
-69,12
+70,11
@@
$sth->execute();
$now
$fetchrow
</%args>
$now
$fetchrow
</%args>
-<table
id="ts_table
">
+<table
class="data" id="ts_table" rules="groups
">
<tr>
<th>Archipelago
<th>Island
<th>Age
<tr>
<th>Archipelago
<th>Island
<th>Age
-</tr>
% my $row;
% my %da_ages;
% my %ts_sortkeys;
% my $row;
% my %da_ages;
% my %ts_sortkeys;
diff --git
a/yarrg/web/query_commod
b/yarrg/web/query_commod
index 3b2bf3554533f40a334d63690dac86f023b16764..153ea792c92e7f9abcc9eac7472d37c72bdb7fca 100644
(file)
--- a/
yarrg/web/query_commod
+++ b/
yarrg/web/query_commod
@@
-50,6
+50,7
@@
my ($commodname,$cmid);
my $qa= \%ARGS;
</%perl>
my $qa= \%ARGS;
</%perl>
+<div class="query">
<h1>Commodity enquiry</h1>
% $prselector->('BuySell');
<h1>Commodity enquiry</h1>
% $prselector->('BuySell');
@@
-69,6
+70,8
@@
my $qa= \%ARGS;
</form>
%#========== results ==========
</form>
%#========== results ==========
+</div>
+<div class="results">
<%perl>
$emsgokorprint->($emsg) or $cmid=undef;
<%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) {
% 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>
<colgroup span=2>
<colgroup span=1>
<colgroup span=2>
diff --git
a/yarrg/web/query_offers
b/yarrg/web/query_offers
index 76f45c0da52f143bb39fd7de472c5a1118539cdf..6dc70f47d015f9813e828111c41c7ab6363b2066 100644
(file)
--- a/
yarrg/web/query_offers
+++ b/
yarrg/web/query_offers
@@
-54,6
+54,7
@@
my ($commodname,$cmid);
my $qa= \%ARGS;
</%perl>
my $qa= \%ARGS;
</%perl>
+<div class="query">
<h1>Prices for commodity at location(s)</h1>
% $prselector->('BuySell');
<h1>Prices for commodity at location(s)</h1>
% $prselector->('BuySell');
@@
-79,6
+80,8
@@
my $qa= \%ARGS;
<& "lookup:formhidden", ours => $ours &>
</form>
<& "lookup:formhidden", ours => $ours &>
</form>
+</div>
+<div class="results">
%#========== results ==========
<%perl>
%#========== results ==========
<%perl>
@@
-166,7
+169,7
@@
foreach my $bs (split /_/, $qa->{BuySell}) {
</%perl>
% while ($row= $sth->fetchrow_arrayref) {
% if (!$rowix) {
</%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>
<colgroup span=2>
<colgroup span=3>
<colgroup span=1>
diff --git
a/yarrg/web/query_route
b/yarrg/web/query_route
index fb32bcdd705017d6ad82f7da4a3344c55b44b47e..eeb4331eb067b7645dadb2506995d0a4323d600b 100644
(file)
--- a/
yarrg/web/query_route
+++ b/
yarrg/web/query_route
@@
-64,6
+64,8
@@
my $goupdate= sub { $be_post ? 'Update' : 'Go' };
</%perl>
</%perl>
+<div class="query">
+
<h1>Specify route</h1>
% # Sadly we need to do this rather hacky thing to make it be a POST
<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 &>
% };
<& "lookup:formhidden", ours => $ours &>
+</div>
+<div class="results">
<%perl>
#========== results ==========
<%perl>
#========== results ==========
diff --git
a/yarrg/web/query_routesearch
b/yarrg/web/query_routesearch
index 89a81371845c06069fe43b197a6ad8d945e89abb..2816086c068c9ed39a92e2e0221c649048f3dee9 100644
(file)
--- a/
yarrg/web/query_routesearch
+++ b/
yarrg/web/query_routesearch
@@
-67,6
+67,7
@@
my $maxcountea=15;
</%perl>
</%perl>
+<div class="query">
<h1>Find most profitable routes and trades</h1>
% if ($qa->{Dropdowns}) {
<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>
% }
</form>
+</div>
+<div class="results">
<%perl>
if (!$emsg && $maxdist > $maxmaxdist) {
<%perl>
if (!$emsg && $maxdist > $maxmaxdist) {
@@
-273,7
+276,7
@@
$someresults->();
% } else {
<h2>Best routes for profit per league</h2>
% }
% } 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>
<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.
(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>
diff --git
a/yarrg/web/routetrade
b/yarrg/web/routetrade
index 09e908b1ac44e160fb817dacb612a8c746e19b67..ce319facae713bb9e32edddf86a1509d979b4772 100644
(file)
--- a/
yarrg/web/routetrade
+++ b/
yarrg/web/routetrade
@@
-625,7
+625,7
@@
Generated by YARRG at <strong><%
%
<h2><a name="plan">Voyage trading plan</a></h2>
%
<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>";
% 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>
% 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>' : '' %>
<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>
throw => 'trades_sort', tbrow => 'trades_total' &>
ts_sortkeys= <% to_json_protecttags(\%ts_sortkeys) %>;
</&tabsort>
-
+<p>
<input type=submit name=update value="Update">
% } # !printable
<input type=submit name=update value="Update">
% } # !printable