Without this, the unicode right-arrow doesn't show up on android. (If
we try to outsmart it with an XML entity reference, our minimization
pipeline deletes the entity reference and puts the arrow back. Thanks
for that.)
tableau.svg: add the MARC Train origin/destination
This (finally?) had to be hacked into the XML by hand because inkscape
isn't smart enough to handle multiple <tspan>s within a single <text>
element. We want to keep the origin, arrow, and destination all as
separate tspans (with ids) so that we can change the origin and
destination easily from a script.
Since I was already hacking it by hand, I cleaned up the XML a bit.
Hopefully it can survive a round trip through inkscape in the future.
index.html.in: uppercase the security code automatically
There's no reason to do this, except the only reason to do this:
people are dumb and this will help their dumb asses when we make
it possible to change the code via the menu.
In particular we no longer reset all of the html/body styles; we leave
them up to the user agent. Only when showing the ticket do we zero out
the margin and padding explicitly.
The page should begin as a form that lets you select a ticket. Only
when that form is submitted should we display the ticket. This commit
starts the transition.
Michael Orlitzky [Thu, 26 Oct 2023 01:40:16 +0000 (21:40 -0400)]
doc/TODO: all (well, almost) transform attributes are gone
The few remaining are horizontal flips that make the front of the tram
out of its back. Inkscape doesn't seem to want to forget those after
an un/regrouping.
Michael Orlitzky [Wed, 25 Oct 2023 22:14:15 +0000 (18:14 -0400)]
sfd2woff: rename to sfd2woff.ff
The ".ff" extension lets FontForge guess which scripting language (the
legacy one) the script uses. Without it, FontForge with python support
will guess wrong and throw errors.
Michael Orlitzky [Wed, 25 Oct 2023 21:15:49 +0000 (17:15 -0400)]
configure.ac: fix all AC_PATH_PROG checks
The third argument to AC_PATH_PROG is a value to set, not an action to
perform, when the test fails. So all of the existing checks were wrong
and failed to fail when the program is missing. I do this for a
living.
Michael Orlitzky [Wed, 25 Oct 2023 20:54:46 +0000 (16:54 -0400)]
svgclean.xsl: new XSL stylesheet to help clean up our inkscape mess
There are a few more cleanup/minimization opportunities left in our
SVG, even after it has been scoured. For example, inkscape wraps all
of its text in redundant <tspan> elements, even when the parent <text>
has the same style as the sole <tspan>. We'd like to remove those, to
simplify the code and save space.
XSLT can do this. This new stylesheet can do this. We add it now, in
preparation for yet another SVG processing phase.
Michael Orlitzky [Tue, 24 Oct 2023 15:36:40 +0000 (11:36 -0400)]
index.html.in: javascript cleanup
Encapsulate everything into functions and kick them off with event
listeners. This _mostly_ fixes the centering of the security code.
There is however a slight centering glitch visible upon page load when
the code is (for example) "WW". Resizing the page correctly re-centers
it; leaving only the mystery of why it was not centered to begin with;
we supposedly center it once when the page loads.
Michael Orlitzky [Tue, 24 Oct 2023 15:16:15 +0000 (11:16 -0400)]
index.html.in: center the security code in its container
This is mostly working and just needs some code cleanup. And to be
called when the window resizes. I found an easy solution completely
by accident, so that's nice.
Michael Orlitzky [Tue, 24 Oct 2023 14:10:39 +0000 (10:10 -0400)]
index.html.in: support random and user-specified security codes
The security code will now be set at page-load to a random two digit
string with characters taken from the set [0-9A-Z]. I've never
actually seen two consecutive digits (zero through nine) in the
official app; but it's good enough for now.
What's better is that you can pass ?code=YO via URL paramaters to set
the code to "YO". Since the code only changes once every day, a
one-way ticket revealing the code now essentially gets you a day pass.
Note: The resulting codes are not usually centered properly (yet).
Michael Orlitzky [Sun, 22 Oct 2023 22:24:43 +0000 (18:24 -0400)]
index.html.in: set ticket expiration to 90 minutes
This is what CharmPass does for one-way tickets, and the expiration
date/time only blinks for about ten minutes after you use a ticket in
the official app. This is a tiny detail (and we could always ditch the
blinking to make the display accurate with an expiration of 1h) but
it's easy enough to get completely right, so why not?