diff --git a/kb.css b/kb.css index 6cc3ae3..e6b2f8c 100644 --- a/kb.css +++ b/kb.css @@ -191,10 +191,11 @@ for i in (1..9) { text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white; } -#rawdata, #rawdata-error, #customstyles, #customstyles-error, #noteseditor, #picker-html { font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; line-height: 1.42857143 !important; border: solid 1px #ccc; } +#rawdata, #rawdata-error, #customstyles, #customstyles-error, #noteseditor, #picker-html, #summary { font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; line-height: 1.42857143 !important; border: solid 1px #ccc; } #rawdata, #customstyles { width: 100%; height: 400px; } #noteseditor { height: 275px; } #rawdata-error, #customstyles-error { white-space: pre; } +#summary { width: 100%; height: 400px; padding-left: 20px;} #tab-content { border-left: 1px solid #ddd; diff --git a/kb.html b/kb.html index 744b13e..579bac6 100644 --- a/kb.html +++ b/kb.html @@ -259,6 +259,7 @@ Nav Bar / Header
  • Keyboard Properties
  • Custom Styles
  • Raw data
  • +
  • Summary
  • @@ -820,6 +821,17 @@ Nav Bar / Header
    + +
    +
    + Title: {{meta.name}}
    + Author: {{meta.author}}
    + Key sizes summary:
    + +
    +
    diff --git a/kb.js b/kb.js index 833dd59..eacc96c 100644 --- a/kb.js +++ b/kb.js @@ -271,8 +271,33 @@ reader.readAsText(file[0]); } }; + + // count the keys + $scope.keyCount = function() { + var counts = new Object(); + counts["Total"] = 0; + counts["Decals"] = 0; - // Helper function to select a single key + angular.forEach($scope.keys(), function(key){ + counts["Total"]++; + if (key.decal) + { + counts["Decals"]++; + var thisk = "Decal "; + } + else + {var thisk = "";}; + thisk += key.width + " x " + key.height; + if (counts[thisk]) + {counts[thisk]++;} + else + {counts[thisk] = 1;} + }); + counts["Total less decals"] = counts["Total"] - counts["Decals"]; + return counts; + }; + + // Helper function to select a single key function selectKey(key,event) { if(key) { // If SHIFT is held down, we want to *extend* the selection from the last