diff --git a/build/index.html b/build/index.html index 1ccab3e6..b5dc0d87 100644 --- a/build/index.html +++ b/build/index.html @@ -14,9 +14,9 @@
-
  • -
  • -
  • Explore
  • +
    +
    +
    Explore
    @@ -136,5 +136,9 @@ ${description} +

    + Sexy API documentation from + Swagger. +

    diff --git a/build/javascripts/swagger-ui.js b/build/javascripts/swagger-ui.js index 5d0894ff..82b94cbc 100644 --- a/build/javascripts/swagger-ui.js +++ b/build/javascripts/swagger-ui.js @@ -24,6 +24,22 @@ jQuery(function($) { } $("a#explore").click(this.showApi); + + this.adaptToScale(); + $(window).resize(function() { + apiSelectionController.adaptToScale(); + }); + + }, + + 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); }, slapOn: function() { @@ -315,8 +331,9 @@ jQuery(function($) { }); - + // Attach controller to window window.apiSelectionController = ApiSelectionController.init(); + if (this.baseUrl) { window.resourceListController = ResourceListController.init({ baseUrl: this.baseUrl, diff --git a/build/stylesheets/screen.css b/build/stylesheets/screen.css index 4b1c8992..8bd11677 100644 --- a/build/stylesheets/screen.css +++ b/build/stylesheets/screen.css @@ -278,46 +278,59 @@ form.fullwidth ol li.string input, form.fullwidth ol li.url input, form.fullwidt width: 500px !important; } body { - font-family: "Droid Sans", sans-serif; - margin: 20px; } + font-family: "Droid Sans", sans-serif; } body #content_message { - margin: 10px 0; + margin: 10px 15px; font-style: italic; color: #999999; } body form#api_selector { + background-color: #89bf04; + padding: 15px; float: none; clear: both; overflow: hidden; display: block; } - body form#api_selector li { + body form#api_selector .input { display: block; clear: none; float: left; margin: 0 10px 0 0; } - body form#api_selector li input { + body form#api_selector .input input { font-size: 1em; padding: 3px; } - body form#api_selector li input#input_baseUrl { + body form#api_selector .input input#input_baseUrl { width: 500px; } - body form#api_selector li input#input_apiKey { - width: 150px; } - body form#api_selector li a#explore { + body form#api_selector .input input#input_apiKey { + width: 250px; } + body form#api_selector .input a#explore { display: block; text-decoration: none; font-weight: bold; padding: 8px 8px; font-size: 0.9em; color: white; - background-color: #89bf04; + 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 li a#explore:hover { + body form#api_selector .input a#explore:hover { background-color: #547f00; } + body p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; + font-style: italic; } + body p#colophon a { + text-decoration: none; + color: #547f00; } body ul#resources { + padding: 0 15px; font-family: "Droid Sans", sans-serif; font-size: 0.9em; } body ul#resources li.resource {