aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-11-19Add video_export.shTeddy Wing
These are the commands I used to convert the demo video into HTML5-suitable video formats. The commands are copied from guides I found on the net looking for `ffmpeg` HTML5 video conversion. I did add the `-b 275k` setting on the WebM video to sort of match the bitrate I saw on the MP4 video. Otherwise it ends up being horrible quality without the flag, or around 14 Mb with the `-b:v 1M` flag (this version results in ~4 Mb).
2018-11-19Add purchase flow thank-you pageTeddy Wing
Move the existing thank-you page to `thank-you-license-download.html`. Use `thank-you.html` as the final page of the purchase flow. Paddle will redirect to this page at the end of purchase. Allows us to retain some branding during purchase. Using the existing HTML file for a better URL.
2018-11-19Make the logo link to the home pageTeddy Wing
Do this on all pages that aren't the home page.
2018-11-19license: Remove TODOTeddy Wing
Done already.
2018-11-19thank-you.html: Educate apostropheTeddy Wing
2018-11-19robots.txt: Disallow the thank-you pageTeddy Wing
Doesn't make sense to me to have this page be tracked by search engines.
2018-11-19index.html: Add preview bannerTeddy Wing
2018-11-19Fix video width on small screen widthsTeddy Wing
When the screen width gets small enough to clip the video, reduce the width of the video to the content width. Couldn't use the same larger-than-content-width layout, at least not easily, because the percentage would need to be dependent on the window width, not the width of the video element's container.
2018-11-19index.html: Add demo videoTeddy Wing
Not committing the video files. They're only 3 & 4 megabytes each, but that still seems a bit too much to keep in version control. Add the video to the home page and center it in the content area. We give it a negative margin to center it since it's wider than the container.
2018-11-19Ignore video filesTeddy Wing
2018-11-16index.html: Increase minimum OS requirementTeddy Wing
Just tested the program on 10.8 and it didn't work. It ran just fine, but didn't run map actions, and I'm not sure why. Used the release build, so I didn't debug it at all. Since I'm planning an imminent public release, just set the minimum to an OS version that we know for sure works. In the future, I'd still like to get the program working on 10.8. We can always bring down the minimum OS version.
2018-11-15index.html: Remove "Application switcher" exampleTeddy Wing
Turns out this doesn't work very well. It activates the application switcher, but doesn't deactivate it, so it doesn't go away. Bad example. Oh well.
2018-11-15index.html: Add a section describing the Vim syntax pluginTeddy Wing
2018-11-15index.html: Add an extra command to the 'frequently used' exampleTeddy Wing
Give an example of a multi-button trigger mapping.
2018-11-15Add manual pagesTeddy Wing
Also a section linking to them on the home page. Generated in the main DomeKey repository with: $ a2x --no-xmllint --format xhtml doc/dome-key.1.intermediate.txt $ a2x --no-xmllint --format xhtml doc/dome-key-mappings.7.txt Deciding to go with the AsciiDoc CSS for now and not bother with making these pages fit with the site's style to make things easy.
2018-11-15index.html: Add Paddle checkout JavaScriptTeddy Wing
Clicking on the "Buy" button brings up the Paddle checkout modal overlay.
2018-11-14index.html: Add information on licensing and upgradesTeddy Wing
2018-11-14Decide on an email addressTeddy Wing
2018-11-14purchaser: Add timestamp to secretTeddy Wing
Trying to add a little more entropy to the calculation. Went with chrono instead of `std::time` because it gives me an `i64` timestamp instead of a `Result`.
2018-11-14.htaccess: Add full FastCGI rewrite rulesTeddy Wing
Also add some section comments. Here we point /license and /license/download to `license.fcgi`, and /fulfillment to `fulfillment.fcgi`. The actual FastCGI binaries with the `.fcgi` extension get redirected to 404 because we already have nicer-looking URLs for them.
2018-11-14license: Add HTML 500 error responseTeddy Wing
2018-11-14license: Add thank-you page at `/license`Teddy Wing
2018-11-14Add thank-you pageTeddy Wing
2018-11-13internal_error.html: Fix logo imageTeddy Wing
Hadn't tested this when I made it. Was outputting a formatted byte string instead of the plain base64, which resulted in `b'BASE_64'` being inserted. Output the real base64 to get the image to decode properly.
2018-11-13Add 400 error pageTeddy Wing
HTML copied from the 404 page, but I remove the `text-center` on the error message because it doesn't look good. Took a multiline message for me to realise it.
2018-11-13license: Add "Content-Type" to 404 responseTeddy Wing
The `set_404()` function doesn't do this, as it makes no assumptions about response content type.
2018-11-13Add 500 error page with generatorTeddy Wing
Base structure copied from `404.html`. Python script based on the `generate_homebrew_formula.py` script in the main DomeKey repository. The filename comes from the Apache server configuration. Generate the 500 page because we can't rely on dependencies. This gets the CSS and logo and includes them inline in the HTML page. Thanks to this answer for explaining how to get a byte string from a file to send to the base64 encoder: https://stackoverflow.com/questions/45482272/typeerror-a-bytes-like-object-is-required-not-str-python-2-to-3/45482834#45482834
2018-11-13404.html: Make subtitle maroonTeddy Wing
Match the change in `index.html`.
2018-11-13license: Get URL path without query string parametersTeddy Wing
The `REQUEST_URI` parameter gives us the URL path including the query string. Unfortunately, there's no param for just the path without the query string. Well, that's not entirely true. On my production server I'll be using Apache, and in development I'm using Lighttpd. Apache provides a `SCRIPT_URL` param that does include just the path, but Lighttpd doesn't appear to have an equivalent. I wasn't able to figure out how to add a `SCRIPT_URL` param in Lighttpd manually, either. Using `bin-environment` in the FastCGI config didn't work, and using `setenv.add-environment` wouldn't allow me to set it to both of our routes (I assume). In light of this, just grab the path from `REQUEST_URI` by getting the part in front of `?`.
2018-11-13logger: Remove query string from log lineTeddy Wing
The query string is already included in the `REQUEST_URI` param. What we had would just print it twice.
2018-11-13Add a meta description to HTML pagesTeddy Wing
2018-11-13license: Render HTML 404 page from /licenseTeddy Wing
2018-11-13lighttpd.conf: Serve static assetsTeddy Wing
Want to be able to use our static image and CSS assets from the FCGI code when rendering HTML.
2018-11-13Makefile: Restart `lighttpd` when both binaries changeTeddy Wing
2018-11-13license: Extract response logic from `/license/download`Teddy Wing
I want to be able to use the exact same logic for the `/license` route. To do so, we move the common logic to a new `build_response()` function. For all responses we need to return from `build_response()`, make new structs `HtmlResponse` and `ZipResponse` that write the response in the desired format. The `ZipResponse` does what we're already doing in `/license/download`. The `HtmlResponse` will respond with HTML and show a thank-you page on success.
2018-11-13logger: Use `REQUEST_URI` instead of `SCRIPT_NAME`Teddy Wing
The script name isn't necessarily the same as the request path. We really want the request path.
2018-11-13license: Respond 404 if purchaser not foundTeddy Wing
2018-11-13license: Send 400 Bad Request if requested with incorrect parametersTeddy Wing
2018-11-13license: Clean up commentsTeddy Wing
2018-11-13license: Remove `unwrap`sTeddy Wing
Respond with a 500 on error. Add 'aquatic-prime' to `foreign_links` errors to be able to convert it with `into()`.
2018-11-13database: Reduce connection pool sizeTeddy Wing
Read https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing recently, and reducing the pool size seemed like a good idea.
2018-11-13license: Combine zip response writersTeddy Wing
2018-11-13license: Move database query to a functionTeddy Wing
Will make it a bit easier to handle errors from `Result`s.
2018-11-13license: Refuse non-POST requestsTeddy Wing
2018-11-13licene: Set filename of license Zip fileTeddy Wing
2018-11-13license: Replace `include_bytes!` with `include_str!` for keysTeddy Wing
Forgot that `include_str!` existed. Certainly makes things a lot cleaner this way.
2018-11-13license: Generate a license and send it in HTTP responseTeddy Wing
If the purchaser coming from POST params is found in the database, generate a license for the purchaser, zip the license, and send a response containing the zipped data. zip: Change the writer input to a mutable reference to enable us to use the zip data when writing to the response. Otherwise we get a borrow error.
2018-11-13license: Get purchaser from database using paramsTeddy Wing
Use POST params `name`, `email`, and `secret` to get a purchaser from the database. If none exists, we should probably send a 404, otherwise we'll generate a license for that purchaser and send it in the response as a Zip archive.
2018-11-13lighttpd.conf: Use `license` binary for `/license/download` routeTeddy Wing
2018-11-12Add src/bin/license.rsTeddy Wing
This binary will show a thank-you page to purchasers. I had also planned to make a third binary to send the license file as a Zip archive, but now I think I'm going to do that here too, working out the routing inside this program.