Commit graph

26 commits

Author SHA1 Message Date
Ian Prest
d79d1511f7 added FLAT profile 2018-09-19 19:37:49 -07:00
Damian Cugley
31ef5a328d Allow for newer Google Fonts import snippet (#186)
Google Fonts now supplies an HTTPS rather than HTTP URL in its snippet, and adds quotes around the URL string. This change allows such snippets to survive the sanitation process.
2018-09-10 21:50:58 -07:00
Ian Prest
50347112a6 Fixed a problem parsing Font Awesome's CSS file; also updated FA to 4.4.0. 2015-09-29 23:02:14 -04:00
Ian Prest
65947be7b8 Added rendering support for a 'CHICKLET' profile.
-- Updated the tooltip for the profile fields to list supported profiles.
-- Fixed a rendering issue that prevented 'keySpacing' from being utilized (it wasn't used for the existing profiles).
2015-09-09 21:53:54 -04:00
Ian Prest
900caca4a7 Parse user-defined glyphs in CSS 2015-08-01 00:39:02 -04:00
Ian Prest
aa0dda5b4c Fix CSS generation when a rule has no style declarations. 2015-07-30 23:23:42 -04:00
Ian Prest
798607a78b Allow @import-ing of Google Fonts. 2015-07-30 22:04:58 -04:00
Ian Prest
45b0e0b03b Made renderer work with new CSS parser 2015-07-30 21:51:22 -04:00
Ian Prest
3f19d7f758 Merge branch 'master' into custom-css
Conflicts:
	css/kb.css.map
	kb.css
	kb.html
2015-07-27 20:35:01 -04:00
Ian Prest
50d068b663 Merge remote-tracking branch 'origin/master' into fully-generic-legends 2015-07-26 17:30:24 -04:00
Ian Prest
602ce2e55a Added a custom-styles editor
-- Similar to the raw-data editor.
-- Styles are parsed, modified so that they can only affect keycaps,
then applied to the page.
-- Modified the VIC-20 sample to demonstrate; it now has a
FontAwesome-style stylesheet, for the C64ProMono font, and is using
those custom styles for all the PETSCII glyphs.
2015-07-22 23:42:46 -04:00
Ian Prest
ceed023251 Remove unnecessary rendering bits
-- align flags no longer used during rendering
2015-07-17 22:32:42 -04:00
Ian Prest
699309c621 Fix problem loading the initial (numpad) layout
-- We tried to render the keys before body.onLoad was invoked, so the
render templates weren't ready.
-- Replaced with an init() function that is called earlier during
startup.
-- Fixes #91.
2015-07-17 11:15:45 -04:00
Ian Prest
f9e63ac0c5 Added SVG support for profile gradients
-- Holy hell... that was annoying.
2015-07-14 00:58:03 -04:00
Ian Prest
2bac6789b6 Rewrote SVG export as a doT.js template
-- Because more of the sizes are parameterized, SA/DSA-profile caps now
have the correct shape.
-- Also moved the SVG button to a more prominent location.
2015-07-13 23:33:41 -04:00
Ian Prest
824707f776 Major refactoring of the keycap rendering to HTML
-- Generating HTML with a doT.js template function; hopefully easier to
maintain.
-- More of the parameters refactored into the JS code, rather than
relying on being in the CSS; benefit => those parameters are available
when I do SVG rendering.
-- Also, now using Stylus to compile & minify CSS, and auto-inline small
images (Sublime project describes how to compile).
2015-07-12 19:16:57 -04:00
Ian Prest
ec21e1df5c Support rotated clusters in SVG
-- plus a bit of refactoring to rotated HTML to be more in line with SVG
2015-07-07 21:18:00 -04:00
Ian Prest
dab8167c16 More work on SVG export
-- more rendering refactoring & parameterization
-- a set of sizes to get output to scale (in mm)
2015-07-07 20:28:12 -04:00
Ian Prest
f94d8c9be6 Preliminary SVG work.
-- Refactored the rendering code so I could re-use as much of it as
possible.
-- Added a button to download SVG (currently on the raw-data tab).
-- Lots of limitations... no labels, no profile support, no rotated-key
support, etc.
2015-07-06 20:48:31 -04:00
Ian Prest
f7d1655934 Directive for label editors, to reduce boilerplate
-- Eliminated ~100 lines of oft-repeated markup.
2015-07-05 13:04:32 -04:00
Ian Prest
5b063b9b5e Can now set different colors for each text label on a keycap.
-- New color picker (angular-bootstrap-colorpicker)
-- Color picker placed beside each label field.
-- Can also drag & drop from palette to label fields (using
angular-dragdrop).
2015-07-04 01:39:20 -04:00
Ian Prest
4e5f2e66a1 Show an error if bad HTML is used in one of the label fields.
-- Exception that was thrown would prevent proper rendering of other
keys.
-- Now catching that exception and drawing an 'error' glyph in the label
field (with a tooltip).
2015-07-02 16:13:50 -04:00
Ian Prest
13c21a69ec Fix selection of rotated keys.
-- Marquee select just checks against the bbox, which is already
computed.
-- Single-click select transforms the mouse coordinates into key-space
by applying the inverse transformation matrix.  Then it can compare
against the two rectangles, just as it used to.
2013-11-12 22:56:42 -05:00
Ian Prest
b9ff4c651b Started implementation of rotated-cluster support.
-- Each key has a rotation angle, and center of rotation; available in
the editor.
-- Displaying crosshairs in the editor for the center of rotation.
-- Keyboard shortcuts to move CoR, and change angle.
-- Keyboard height is correctly calculated.
TODO:
-- Serialization is still wonky.
-- Can't click on rotated keys to select them.
2013-11-12 22:56:41 -05:00
Ian Prest
084a2e48d2 Speed up kbHeight calculations.
-- Querying the DOM was expensive; now just looping over all the keys.
2013-11-10 15:06:13 -05:00
Ian Prest
0f162a2264 Moved key-rendering to its own .js file. 2013-11-09 22:38:08 -05:00