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?
Michael Orlitzky [Thu, 19 Oct 2023 00:48:11 +0000 (20:48 -0400)]
src/CharmBypass-{Bold,Regular}.sfd: move up out of src
These are the last remaining files in the src/ directory. Move them to
the top level with everything else so that we can simplify the build
rules a bit.
Michael Orlitzky [Thu, 19 Oct 2023 00:45:12 +0000 (20:45 -0400)]
Makefile.am,configure.ac,.gitignore: update for day.svg rename
Since we're moving the source day.svg to where the built day.svg
previously lived, a rename is also in order. We now name the optimized
output file day.min.svg.
Michael Orlitzky [Wed, 18 Oct 2023 23:13:08 +0000 (19:13 -0400)]
src/CharmBypass-{Bold,Regular}.sfd: new font source files
Include the FontForge source files for the "CharmBypass-Bold" and
"CharmBypass-Regular" fonts. This will eventually allow us to build
the woff2 fonts on-the-fly.
These fonts were created from the letterforms used in the CharmPass
app. Copyright law in the United States generally does not protect
typefaces themselves; it protects only fonts, which are a particular
programmatic digital representation of a typeface. Since I have copied
only the letterforms, distributing the fonts (which are my own
creation) should not run afoul of the law. But as always when it comes
to legal matters: IANAL, YOLO, IDGAF.
Michael Orlitzky [Sat, 14 Oct 2023 03:23:52 +0000 (23:23 -0400)]
Makefile.am,src: replace the existing ticket font with two new ones
Using separate regular and bold fonts on the ticket lets us more
accurately mimic the official app. For example, the "service letter"
looks a lot better in bold. This commit replaces tickettext.woff2 by
CharmBypass-Regular.woff2 and CharmBypass-Bold.woff2.
Michael Orlitzky [Tue, 10 Oct 2023 15:54:09 +0000 (11:54 -0400)]
src/day.svg: change cloud group spacing
Even though the clouds scroll right-to-left, the translation
coordinates are based on the groups' left-hand edges. As a result,
everything will be easier if I "left align" the clouds initially.