Commit Graph

4 Commits

Author SHA1 Message Date
Martin Taillefer ef18deae4c Site improvements (#3967)
- Rejigger how callouts are rendered such that wide embedded text blocks don't cause
things to go haywire.

- Add a thin faint border around callouts, which provides some needed visual definition
without adding weight to the page.

- Fix long-standing bugs where the 'callout wiggle' affected not only the callout's icon,
but also the print/download/copy buttons of nested text blocks.

- Fix dark theme functionality which broke when I converted to TypeScript.
2019-04-09 08:07:49 -07:00
mtail ba0fb5cda9 Port scripts to TypeScript.
- Port all the JavaScript to TypeScript. Finally, a typed language to
eliminate a whole class of avoidable errors. This ends up being a line-
by-line affair, mostly about adding type information on functions and
some function calls. This also involved adding quite a few null checks
(since TypeScript tracks nullness). This results in the code being
inherently more robust in the face of somehow malformed HTML which
doesn't contain what the script code is expecting to find.

- Ditch the recently added JSHint linter in favor of tslint.
2019-03-31 21:16:16 -07:00
mtail 373916fcfa Improve accessibility
- Increase the constrast for links, per LightHouse analysis.

- Add support for disabling syntax coloring in example text blocks. This
can be controlled from the menu.
2019-03-09 11:56:32 -08:00
Martin Taillefer bedbc83da6
JavaScript cleanup. (#3427)
- Now that the scripts are loaded with 'defer', no need to trigger all
behavior via a DOMContentLoaded event handler as the scripts will all
naturally run after the DOM has been loaded.

- Use a considerably simpler approach to copy to the clipboard in code
blocks. This saves around 10K of script code believe it or not.
2019-02-28 01:38:52 -08:00