From f2e433d52b18a9373049a98366b7e452a5c5418f Mon Sep 17 00:00:00 2001 From: Brian Peacock Date: Wed, 7 May 2014 13:26:44 -0500 Subject: [PATCH] Formatting --- lib/GUI/css/main.less | 28 +++++++++++++++++++++++++++- lib/GUI/index.handlebars | 17 ++++++++--------- lib/GUI/js/main.js | 8 +++++++- lib/static/main.css | 27 ++++++++++++++++++++++++++- lib/static/main.js | 8 +++++++- 5 files changed, 75 insertions(+), 13 deletions(-) diff --git a/lib/GUI/css/main.less b/lib/GUI/css/main.less index 9691fc688..046aeee3b 100644 --- a/lib/GUI/css/main.less +++ b/lib/GUI/css/main.less @@ -1,6 +1,11 @@ @import "../../../node_modules/helpers.less/helpers.less"; /*** Main Styles ***/ +body { + margin: 0; + font-family: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, Sans-Serif; +} + h1 { text-align: center; @@ -14,8 +19,29 @@ h1 { } } -/*** Setup ***/ +.center { + text-align: center; +} +#content { + margin: 0 auto; + max-width: 880px; + padding: 20px; +} + +/*** Setup ***/ +#setup { + background: #DB4141; + padding: 15px 20px; + display: inline-block; + .border-radius(4px); + text-align: left; + color: #FFF; + + code { + font-family: Consolas, monaco, monospace; + } +} /*** Package Entries ***/ .entry { diff --git a/lib/GUI/index.handlebars b/lib/GUI/index.handlebars index 1c1df7fd4..eb8452fa4 100644 --- a/lib/GUI/index.handlebars +++ b/lib/GUI/index.handlebars @@ -11,20 +11,19 @@

{{ name }}

- - + +
-
-

Setup:

- - npm set registry {{ baseUrl }}
- npm adduser --registry {{ baseUrl }} -
-
+
+
+ npm set registry {{ baseUrl }}
+ npm adduser --registry {{ baseUrl }} +
+

Available Packages:

{{#each packages}} diff --git a/lib/GUI/js/main.js b/lib/GUI/js/main.js index 632ae0a12..0e35c1461 100644 --- a/lib/GUI/js/main.js +++ b/lib/GUI/js/main.js @@ -3,7 +3,7 @@ var $ = require('unopinionate').selector, $(function() { var $form = $('#search-form'), - $input = $form.find('[type="search"]'), + $input = $form.find('input'), $searchResults = $("#search-results"), $body = $('body'), request; @@ -40,4 +40,10 @@ $(function() { $body.removeClass('state-search'); } }); + + $form.find('.clear').click(function(e) { + e.preventDefault(); + $input.val(''); + $form.keyup(); + }); }); diff --git a/lib/static/main.css b/lib/static/main.css index a70e4dcd9..42fcb8909 100644 --- a/lib/static/main.css +++ b/lib/static/main.css @@ -1,4 +1,8 @@ /*** Main Styles ***/ +body { + margin: 0; + font-family: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, Sans-Serif; +} h1 { text-align: center; } @@ -10,7 +14,28 @@ h1 a:visited { h1 a:hover { text-decoration: underline; } +.center { + text-align: center; +} +#content { + margin: 0 auto; + max-width: 880px; + padding: 20px; +} /*** Setup ***/ +#setup { + background: #DB4141; + padding: 15px 20px; + display: inline-block; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + text-align: left; + color: #FFF; +} +#setup code { + font-family: Consolas, monaco, monospace; +} /*** Package Entries ***/ .entry { background: #EEE; @@ -19,4 +44,4 @@ h1 a:hover { .state-search #standard-content { display: none; } -/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22lib%2FGUI%2Fcss%2Fmain.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22%3BAAGA%3BEACC%2CkBAAA%3B%3BAADD%2CEAGC%3BAAHD%2CEAGI%2CEAAC%3BEACH%2CYAAA%3BEACA%2CqBAAA%3B%3BAALF%2CEAQC%2CEAAC%3BEACA%2C0BAAA%3B%3B%3B%3BAAQF%3BEACC%2CgBAAA%3B%3B%3BAAID%2CaAAc%3BEACb%2CaAAA%22%7D */ \ No newline at end of file +/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22lib%2FGUI%2Fcss%2Fmain.less%22%2C%22node_modules%2Fhelpers.less%2Fhelpers.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22%3BAAGA%3BEACC%2CSAAA%3BEACA%2CaAAa%2CiBAAiB%2C8CAA9B%3B%3BAAGD%3BEACC%2CkBAAA%3B%3BAADD%2CEAGC%3BAAHD%2CEAGI%2CEAAC%3BEACH%2CYAAA%3BEACA%2CqBAAA%3B%3BAALF%2CEAQC%2CEAAC%3BEACA%2C0BAAA%3B%3BAAIF%3BEACC%2CkBAAA%3B%3BAAGD%3BEACC%2CcAAA%3BEACA%2CgBAAA%3BEACA%2CaAAA%3B%3B%3BAAID%3BEACC%2CmBAAA%3BEACA%2CkBAAA%3BEACA%2CqBAAA%3BEClBG%2C0BAAA%3BEACA%2CuBAAA%3BEACA%2CkBAAA%3BEDkBH%2CgBAAA%3BEACA%2CWAAA%3B%3BAAND%2CMAQC%3BEACC%2CwCAAA%3B%3B%3BAAKF%3BEACC%2CgBAAA%3B%3B%3BAAID%2CaAAc%3BEACb%2CaAAA%22%7D */ \ No newline at end of file diff --git a/lib/static/main.js b/lib/static/main.js index ea6e5f435..1991776a2 100644 --- a/lib/static/main.js +++ b/lib/static/main.js @@ -28,7 +28,7 @@ var $ = require('unopinionate').selector, $(function() { var $form = $('#search-form'), - $input = $form.find('[type="search"]'), + $input = $form.find('input'), $searchResults = $("#search-results"), $body = $('body'), request; @@ -65,6 +65,12 @@ $(function() { $body.removeClass('state-search'); } }); + + $form.find('.clear').click(function(e) { + e.preventDefault(); + $input.val(''); + $form.keyup(); + }); }); },{"../entry.handlebars":1,"unopinionate":10}],3:[function(require,module,exports){