From eefd173d9a20b0470b7a0dee1ecf9cebecab062f Mon Sep 17 00:00:00 2001 From: zeke Date: Tue, 9 Aug 2011 16:24:37 -0700 Subject: [PATCH] Built a fresh version --- build/index.html | 22 +++++++--- build/javascripts/swagger-ui.js | 25 ++++++----- build/stylesheets/screen.css | 70 +++++++++++++++++------------- source/stylesheets/screen.css.sass | 2 +- 4 files changed, 70 insertions(+), 49 deletions(-) diff --git a/build/index.html b/build/index.html index 4112b56c..c37b4987 100644 --- a/build/index.html +++ b/build/index.html @@ -13,15 +13,17 @@ -
-
-
- -
+
-
-

+

+ Enter the base URL of the API that you wish to explore, or try + swagr.api.wordnik.com/v4 + or + petstore.swagger.wordnik.com/api. +
+ diff --git a/build/javascripts/swagger-ui.js b/build/javascripts/swagger-ui.js index 2ecc5a7c..c93d7bd1 100644 --- a/build/javascripts/swagger-ui.js +++ b/build/javascripts/swagger-ui.js @@ -1,7 +1,9 @@ jQuery(function($) { - // this.baseUrl = "http://swagr.api.wordnik.com/v4"; - // this.apiKey = "my-api-key"; + // this.baseUrl = "http://swagr.api.wordnik.com/v4"; + + // this.baseUrl = "http://petstore.swagger.wordnik.com/api"; + // this.apiKey = "special-key"; var ApiSelectionController = Spine.Controller.create({ proxied: ["showApi"], @@ -33,17 +35,19 @@ jQuery(function($) { }, adaptToScale: function() { - var form_width = $('form#api_selector').width(); - var inputs_width = 0; - $('form#api_selector div.input').each( function(){ inputs_width += $(this).outerWidth(); }); - - // Update with of baseUrl input - var free_width = form_width - inputs_width; - $('#input_baseUrl').width($('#input_baseUrl').width() + free_width - 50); + // var form_width = $('form#api_selector').width(); + // var inputs_width = 0; + // $('form#api_selector div.input').each( function(){ inputs_width += $(this).outerWidth(); }); + // + // // Update with of baseUrl input + // var free_width = form_width - inputs_width; + // $('#input_baseUrl').width($('#input_baseUrl').width() + free_width - 50); }, slapOn: function() { - messageController.showMessage("Please enter the base URL of the API that you wish to explore."); + // messageController.showMessage("Please enter the base URL of the API that you wish to explore."); + $("#content_message").show(); + $("#resources_container").hide(); this.showApi(); }, @@ -174,6 +178,7 @@ jQuery(function($) { render: function() { $(this.templateName).tmpl(this.item).appendTo(this.container); + $('#colophon').fadeIn(); }, renderApi: function(api) { diff --git a/build/stylesheets/screen.css b/build/stylesheets/screen.css index 8bd11677..8ee568e1 100644 --- a/build/stylesheets/screen.css +++ b/build/stylesheets/screen.css @@ -283,41 +283,49 @@ body { margin: 10px 15px; font-style: italic; color: #999999; } - body form#api_selector { + body #header { background-color: #89bf04; - padding: 15px; - float: none; - clear: both; - overflow: hidden; - display: block; } - body form#api_selector .input { + padding: 14px; } + body #header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(http://swagger.wordnik.com/images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 40px; + color: white; } + body #header form#api_selector { display: block; clear: none; - float: left; - margin: 0 10px 0 0; } - body form#api_selector .input input { - font-size: 1em; - padding: 3px; } - body form#api_selector .input input#input_baseUrl { - width: 500px; } - body form#api_selector .input input#input_apiKey { - width: 250px; } - body form#api_selector .input a#explore { + float: right; } + body #header form#api_selector .input { display: block; - text-decoration: none; - font-weight: bold; - padding: 8px 8px; - font-size: 0.9em; - color: white; - background-color: #547f00; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -o-border-radius: 4px; - -ms-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; } - body form#api_selector .input a#explore:hover { - background-color: #547f00; } + clear: none; + float: left; + margin: 0 10px 0 0; } + body #header form#api_selector .input input { + font-size: 0.9em; + padding: 3px; + margin: 0; } + body #header form#api_selector .input input#input_baseUrl { + width: 400px; } + body #header form#api_selector .input input#input_apiKey { + width: 200px; } + body #header form#api_selector .input a#explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; } + body #header form#api_selector .input a#explore:hover { + background-color: #547f00; } body p#colophon { margin: 0 15px 40px 15px; padding: 10px 0; diff --git a/source/stylesheets/screen.css.sass b/source/stylesheets/screen.css.sass index 64617909..3d3fbd6b 100644 --- a/source/stylesheets/screen.css.sass +++ b/source/stylesheets/screen.css.sass @@ -38,7 +38,7 @@ body font-size: 1.5em font-weight: bold text-decoration: none - background: transparent image_url('http://local.wordnik.com:3000/images/logo_small.png') no-repeat left center + background: transparent image_url('http://swagger.wordnik.com/images/logo_small.png') no-repeat left center padding: 20px 0 20px 40px color: white