Commit graph

73 commits

Author SHA1 Message Date
Ian Prest
4d23305696 Added syntax-highlighting to the various text editors
-- Using ACE Editor, which was just a drop-in replacement for the
TEXTAREAs
-- Implements #22
2015-08-09 11:59:03 -04:00
Ian Prest
ad24eadc87 Implemented keyboard 'decals'
-- Intended to put decorative labels (logos, etc.) on keyboard layouts.
-- They're basically just invisible keycaps; this works pretty well,
since there are already so many formatting options for text on keycaps,
and it saves us from having to manage a completely separate type of
thing.
-- Props to iandoug for the idea!

Also:
-- Disable x2,y2,width2,height2 on decals
-- Increase max keycap size to 18x18 (allows for really large decals)
2015-08-03 23:40:42 -04:00
Ian Prest
354377f559 Rejiggered the background-image dropdown & data
-- Also auto-calculating the keyboard width
2015-08-03 17:45:53 -04:00
Ian Prest
7724b33fc1 Merge branch 'backgrounds' of git://github.com/iandoug/keyboard-layout-editor into iandoug-backgrounds
Conflicts:
	kb.css
	kb.js
2015-08-03 11:30:26 -04:00
Ian Prest
b9b84feb06 Fix some CSS lint errors 2015-08-03 10:55:55 -04:00
Ian Prest
73da7aecc9 Disable save button if user not signed in 2015-08-02 19:51:36 -04:00
iandoug
5012215b9c Cleaned up code and data for backgrounds, converted background-acknowledge to md format and linked from README 2015-08-03 00:52:25 +02:00
Ian Prest
1f71ce495a Added user menu & logout command 2015-08-02 00:31:19 -04:00
Ian Prest
443de95437 Added glyph-set for combining diacritical marks. 2015-07-31 23:54:08 -04:00
Ian Prest
04447b9eaf Using angular-ui-bootstrap for tooltip on character picker
-- Needed to escape the scrolling div, which wasn't possible with
hint.css.
-- Couldn't switch everywhere, unfortunately, because
angular-ui-bootstrap tooltips have some nasty bugs dealing with disabled
input fields where the tooltips wouldn't go away.
2015-07-31 22:17:50 -04:00
Ian Prest
50393a4f05 Scroll the character-picker list if too long 2015-07-31 20:26:50 -04:00
Ian Prest
7ecf4d55a4 Initial character-picker implementation
-- Very similar to the color palettes
2015-07-31 19:09:37 -04:00
Ian Prest
9b2af5eff8 Added a button to swap primary & secondary keycap rectangles
-- sizes & positions are swapped so that the overall shape of the key is
maintained, but the labels will shift positions since they are always
rendered on the primary rectangle.
2015-07-31 17:37:12 -04:00
iandoug
6797c23937 Added code and data for supporting the backgrounds 2015-07-28 09:16:30 +02: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
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
966bb05663 Changed "no color" to render as a little 'x' instead of red stripes 2015-07-18 21:46:31 -04:00
Ian Prest
c2b1e4ab7a Fix front-printed text on DSA-profile caps 2015-07-18 21:32:05 -04:00
Ian Prest
3e6bbf61e7 Tweak CSS for fully-generic legend text
-- legends will be in order (left-to-right, top-to-bottom), and there
will now be 12 of them in total
2015-07-17 22:18:04 -04:00
Ian Prest
f5cbfa3555 Tweak to formatting for front-printed labels on SA/DSA profiles.
-- New rendering pushed the text down, so we move it back up.
-- Other profiles were already moved up by a pixel.
2015-07-12 21:02:52 -04:00
Ian Prest
2dd5109bfc Fix swatches display; was shifted right on webkit browsers 2015-07-12 19:28:05 -04:00
Ian Prest
a8922eaf47 Fix homing nub rendering. 2015-07-12 19:19:45 -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
552bb150e5 Small CSS tweak to make keys look better
-- Wasn't very obvious at 100%, but if you zoomed in, you could tell
that the border was getting clipped by a background <div> that was on
top of it.
2015-07-06 00:26:08 -04:00
Ian Prest
2edec9d375 Updated "profile" CSS styles
-- New OEM profile (renders same as DCS)
-- SA tweaked to sit a bit higher than DSA
-- Now showing a homing nub on all profiles (other than SA/DSA)
-- DSA/SA deep-dish made (slightly) more visible
2015-07-05 19:44:39 -04:00
Ian Prest
f290d0517f Show kbd name & author on the actual layout.
-- Linked to the rendered metadata screen.
2015-07-05 17:10:14 -04:00
Ian Prest
6c8e583c3a Prevent wrapping color-swatch tooltips
-- also deleted some unused CSS rules
2015-07-05 10:17:15 -04:00
Ian Prest
b8fb293a02 Added markdown rendering support for the 'notes'
-- Switched from plain bootstrap to angular-ui-bootstrap (to fix some
interaction problems); this necessitated a number of markup changes for
the modals and dropdowns.
-- Can now "cancel" the options dialog.
-- Sprinkled the markup with ng-cloak to prevent early rendering
problems.
-- Fixed some copy/paste issues with previous form changes (labels were
incorrect)
2015-07-05 02:42:47 -04:00
Ian Prest
3b11c8b9f6 Added metadata fields for "author" and "notes". 2015-07-04 21:38:04 -04:00
Ian Prest
f19d939278 Comprehensive style sweep to fix Bootstrap issues.
-- Upgrading to the latest Bootstrap broke a bunch of stuff, so I had to
go in and fix it.
-- While I was at it, I switched all the form controls to make better
use of the Bootstrap classes, so they look and reflow a bit better now.
2015-07-04 21:16:01 -04:00
Ian Prest
2f1be45e95 Fix up some formatting problems with the new Bootstrap
-- Also significantly cleaned up the formatting in the help dialog
2015-07-04 16:17:01 -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
3f44b1f866 Added the ability to upload a JSON file.
-- "Upload" button on the raw-data tab
-- Drag & drop to either the raw-data editor, or to the main kb preview
area
2015-07-03 00:42:30 -04:00
Ian Prest
21a98e8a42 Add links to CHANGELOG, CONTRIBUTORS, and LICENSE from website.
-- Load the Markdown files directly, parse them (with "marked") and put
the result in a model popup.
-- This way I don't need to maintain separate files for the website &
GitHub repo.
2015-07-02 21:35:01 -04:00
Jordi Orlando
1ab7c771f5 Add DSA dish
Conflicts:
	kb.css
2015-07-02 14:56:41 -04:00
Ian Prest
8add9dc5ff Changed how I represented the PETSCII glyphs on the VIC-20 layout 2015-07-02 14:16:17 -04:00
Ian Prest
01e8936958 Removed "z-index" from CSS for PETSCII glyphs
... it didn't help with the rendering, but it *did* screw up the mouse
interactions.
2015-06-29 22:10:37 -04:00
Ian Prest
1f4b6b9e3b Cleaned up the VIC-20 sample, added C64 font to render PETSCII box-drawing characters
-- C64 font from http://style64.org/c64-truetype
2015-06-29 21:57:47 -04:00
Ian Prest
3932c2eb57 Added '@media print' rules so that only the KB layout gets printed. 2014-05-20 20:39:00 -04: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
789a5ba6c6 Formatting tweak to shortcut keys.
-- Make key text monospaced.
2013-11-10 15:28:25 -05:00
Ian Prest
e075ee3ad3 Fix rendering of profiles on non-rectangular keys.
-- Now setting background-size & background-position properties on the
keycap foregrounds (which are the elements that have gradients applied).
-- Now, instead of each section getting its own gradient, they each get
the *same* gradient... so when they are laid on top of each other, the
gradients match.
-- This is just about perfect for DCS (cylindrical).
-- The effect is less convincing for DSA/SA caps; ideally we'd be able
to "blend" the two gradients together somehow, but CSS doesn't support
non-normal blend-modes, and I don't want to get into <canvas> rendering.
2013-11-09 16:16:58 -05:00
Ian Prest
59336dc798 Added styles for SA profile.
-- Identical to DSA, at the moment.
2013-11-09 14:41:29 -05:00
Ian Prest
37583857bd Small change to make it less likely that the swap-colors button will overlap the color names. 2013-11-09 14:06:36 -05:00
Ian Prest
5dffa0b13d Added a button to swap the fg/bg colors of a keycap.
Also:
-- fixed colors of text to go through same lightening process as keycap
-- fixed styles for right-aligned side-printed text.
2013-11-09 13:27:40 -05:00
Ian Prest
4729175d7a Added an indication of which palette colors are being used.
-- The palette swatch will have a glyph to indicate it's the current
foreground/background color.
-- We print the color name beside the foreground/background color editor
fields.
2013-11-09 13:00:12 -05:00
Ian Prest
1494f0bbbe More accurate color handling.
1. Instead of using the specified color for the top of the cap, and then
darkening the side, I use the specified color for the sides of the cap,
and then lighten the top.
-- All swatches were sampled from the smooth part of the color chips...
and the smooth is usually present on the *side* of the caps, not the
top.
-- The top of the caps usually has a matte-finish, which is visibly
lighter than the smooth finish.

2. Lighten the color in LAB-space, instead of in RGB-space.
-- results in better appearance for the light colors

3. Tweaked the gradients for DSA and DCS.

4. Updated existing sample layouts to use SP color values.
-- Deleted old/unloved sample layouts.
-- Darkened the Stealth-Black layout to match other changes.

5. Changed the default keycap color from #eeeeee --> #cccccc
-- Relative appearance is similar between old & new versions.
2013-11-09 02:31:10 -05:00
Ian Prest
968e10bc9b Fix the side-printed labels.
-- Somewhere along the line they got moved up... moved them back down.
-- Made the DSA version 1px smaller, so that it would fit in the
available space.
2013-11-09 00:00:52 -05:00
Ian Prest
3cb7d7e7d9 Use vertical gradient for spacebars.
-- User will need to add SPACE to the Profile/Row string.
2013-11-08 23:13:41 -05:00
Ian Prest
25cca4bb2e A handful of bug fixes.
-- Line spacing was too big on the keycaps (I think it was picking up
the spacing from Bootstrap); fixed in CSS
-- DSA keys were showing the inner-border in the incorrect spot (wasn't
really noticable on the dark colors of Retro DSA); fixed in CSS
-- Replaced custom min/max functions with the correct Math.min, Math.max
functions.
-- The valiation for x/y offsets was too aggressive; for some
oddly-shaped keys, it didn't let you set values that were big enough.
-- Swapped the order of the keylabel tops for the primary & secondary
rectangles.  This ensures that the label is in the same place whether
stepped or not, at the expense of maybe affecting old layouts.
2013-10-19 16:05:53 -04:00