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.
Michael Orlitzky [Tue, 10 Oct 2023 15:26:19 +0000 (11:26 -0400)]
src/day.svg: double the width of the document
This is in preparation for an "infinite scroll" animation that I'm
going to try to implement by having two copies of the thing that
scrolls: one on-screen, and one off-screen. And for now at least I
actually want to be able to see the off-screen bits.
Michael Orlitzky [Tue, 10 Oct 2023 02:07:30 +0000 (22:07 -0400)]
src/day.svg: eliminate default bus transform
We don't want the bus group to have a "transform" attribute by default
because we want to use the CSS "transform" property to animate it, and
the CSS property overwrites the SVG one. Ungrouping and regrouping the
elements in the "bus" group fixes this somehow.
src/tickettext.woff2: add source font for the ticket text
This web font imitates the font used for the date, time, and service
name on CharmPass tickets. It's not a perfect match, but it's good
enough. I've stripped the character set down to 0-9, :/-, space, and
a-zA-Z.