Explorar el Código

Tweak css

gh-pages
tmk hace 10 años
padre
commit
830962f9cb
Se han modificado 3 ficheros con 39 adiciones y 10 borrados
  1. 23
    2
      editor/hhkb/firmware.js
  2. 3
    4
      editor/hhkb/index.html
  3. 13
    4
      editor/hhkb/keyboard.css

+ 23
- 2
editor/hhkb/firmware.js Ver fichero

KEYBOARD_ID = "hhkb"; KEYBOARD_ID = "hhkb";

/* for ATMega32U4 with 32KB flash */
KEYMAP_START_ADDRESS = 0x6800; KEYMAP_START_ADDRESS = 0x6800;


/* HHKB firmware: v4.0-162-g52a7398 */
/* hex file whthout keymap region and eof */
function firmware_hex() function firmware_hex()
{ {
/* HHKB firmware: v4.0-162-g52a7398 */
/* Flash Map of ATMega32U4(32KB)
* +------------+ 0x0000
* | .vectors | 0xac (43vectors * 4bytes)
* | .progmem | PROGMEM variables and PSTR
* | .init0-9 |
* | .text | code
* | .fini9-0 |
* | | > text region
* |------------| _etext
* | .data |
* | .bss |
* | .noinit |
* | | > data region
* |------------| 0x6800
* | .keymap | > keymap region(2KB)
* |------------| 0x7000
* | bootloader | 4KB
* +------------+ 0x7FFF
*/
// TODO: read hex file directly from remote URL // TODO: read hex file directly from remote URL
// removed keymap region and eof
return "\ return "\
:100000000C942A070C9471070C9471070C947107D7\r\n\ :100000000C942A070C9471070C9471070C947107D7\r\n\
:100010000C9471070C9471070C9471070C94710780\r\n\ :100010000C9471070C9471070C9471070C94710780\r\n\

+ 3
- 4
editor/hhkb/index.html Ver fichero

// Title // Title
document.title = "TMK Keymap Editor for " + KEYBOARD_ID; document.title = "TMK Keymap Editor for " + KEYBOARD_ID;
$("#page-title").text("TMK Keymap Editor for " + KEYBOARD_ID); $("#page-title").text("TMK Keymap Editor for " + KEYBOARD_ID);
$("#keyboard2").load("hhkb.html");


// lost keymap under edting when leave the page // lost keymap under edting when leave the page
/* TODO: Needed when released /* TODO: Needed when released


// download hex file // download hex file
var blob = new Blob([content], {type: "application/octet-stream"}); var blob = new Blob([content], {type: "application/octet-stream"});
var hex_link = $("<a/>");
var hex_link = $("#hex-download");
hex_link.attr('href', window.URL.createObjectURL(blob)); hex_link.attr('href', window.URL.createObjectURL(blob));
hex_link.attr('download', KEYBOARD_ID + "_firmware.hex"); hex_link.attr('download', KEYBOARD_ID + "_firmware.hex");
// jQuery click() doesn't work straight for 'a' element // jQuery click() doesn't work straight for 'a' element
See <a href="https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md" target="_blank">this</a> for detailed description of keymap. See <a href="https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md" target="_blank">this</a> for detailed description of keymap.


<h2>Keyboard</h2> <h2>Keyboard</h2>
<div id="keyboard2" class="keyboard"></div>
<div id="keyboard" class="keyboard"> <div id="keyboard" class="keyboard">
<!-- <!--
Layer selector Layer selector
TODO: better align of buttons TODO: better align of buttons
--> -->
<h2>Keycodes</h2> <h2>Keycodes</h2>
<div id="keycode_tabs">
<div id="keycode_tabs" class="keycode_tabs">
<ul> <ul>
<li><a href="#tabs-1">Main</a></li> <li><a href="#tabs-1">Main</a></li>
<li><a href="#tabs-2">Function and Navigation</a></li> <li><a href="#tabs-2">Function and Navigation</a></li>


<h3>Firmware Hex File Download:</h3> <h3>Firmware Hex File Download:</h3>
<button id="keymap-download" title="save file">Download</button> <button id="keymap-download" title="save file">Download</button>
<a id="hex-download" style="display:none" ></a>


<h3>Keymap Output:</h3> <h3>Keymap Output:</h3>
<textarea id="keymap-output" rows="20" cols="80"></textarea> <textarea id="keymap-output" rows="20" cols="80"></textarea>

+ 13
- 4
editor/hhkb/keyboard.css Ver fichero

display:block; display:block;
float: left; float: left;
color:#777777; color:#777777;
font-family:arial;
font-family:helvetica, arial, sans-serif;
font-size:16px; font-size:16px;
font-weight:bold; font-weight:bold;
text-decoration:none; text-decoration:none;


.keyboard { .keyboard {
width: 1000px; width: 1000px;
overflow: nowrap;
font-size: 14px;
font-weight:bold;
}

.keycode_tabs {
width: 600px;
overflow: auto; overflow: auto;
font-size:14px;
font-weight:bold;
} }


#keycodes {
font-size:12px;
.action {
font-size:16px;
font-weight:bold; font-weight:bold;
width: 200px;
min-width: 30px;
} }


/* http://www.w3schools.com/cssref/css3_pr_resize.asp */ /* http://www.w3schools.com/cssref/css3_pr_resize.asp */

Cargando…
Cancelar
Guardar