From 1a017d46a5809c09637cdc9cd1ea7dd764fb23fe Mon Sep 17 00:00:00 2001 From: Pepijn de Geus Date: Wed, 27 Feb 2013 16:37:40 +0100 Subject: [PATCH 1/4] Update to Handlebars 1.0.10+, CoffeeScript 1.5 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0ef5fd75..62f0b455 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "license": "Apache", "readmeFilename": "README.md", "dependencies": { - "coffee-script": "~1.4.0", + "coffee-script": "~1.5.0", "swagger-client": "1.0.1", - "handlebars": "~1.0.8" + "handlebars": "~1.0.10" } } From d20575304497b794edb09d4a6722a4da150182b1 Mon Sep 17 00:00:00 2001 From: Pepijn de Geus Date: Wed, 27 Feb 2013 17:01:25 +0100 Subject: [PATCH 2/4] UI improvements for parameters (input and read-only) and model description. Uses changes to swagger.js (swagger-client). --- src/main/html/css/screen.css | 83 +++++++++++++++---- src/main/html/index.html | 38 ++------- src/main/template/operation.handlebars | 2 +- src/main/template/param.handlebars | 4 +- src/main/template/param_list.handlebars | 2 +- src/main/template/param_readonly.handlebars | 6 +- .../param_readonly_required.handlebars | 6 +- src/main/template/param_required.handlebars | 6 +- 8 files changed, 91 insertions(+), 56 deletions(-) diff --git a/src/main/html/css/screen.css b/src/main/html/css/screen.css index d6525749..c6a5ff7e 100644 --- a/src/main/html/css/screen.css +++ b/src/main/html/css/screen.css @@ -133,9 +133,15 @@ div.heading_with_menu ul { margin-top: 10px; } +input.parameter { + width: 300px; + border: 1px solid #aaa; +} + .body-textarea { width: 300px; height: 100px; + border: 1px solid #aaa; } p { @@ -1509,12 +1515,24 @@ body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operatio font-size: 1em; line-height: 1.5em; } -.model-signature .description span { + +.model-signature .description div { font-size: 0.9em; line-height: 1.5em; + margin-left: 1em; } -.model-signature .description span:nth-child(odd) { color:#333; } -.model-signature .description span:nth-child(even) { color:#C5862B; } + +.model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} + +.model-signature .description .stronger { + font-weight: bold; + color: #000; +} + .model-signature .signature-nav a { text-decoration: none; color: #AAA; @@ -1551,24 +1569,16 @@ body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operatio } .model-signature ul.signature-nav { - float: none; - clear: both; - overflow: hidden; + display: block; margin: 0; padding: 0; - display: block; - clear: none; - float: right; - margin-right: 5px; - margin-bottom: 5px; } .model-signature ul.signature-nav li { float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; } .model-signature ul.signature-nav li:last-child { @@ -1576,10 +1586,29 @@ body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operatio border-right: none; } +.model-signature .propName { + font-weight: bold; +} +.model-signature .propType { + color: #5555aa; +} +.model-signature .propOptKey { + font-style: italic; +} +.model-signature .propOpt { + color: #555; +} + pre code { background: none; } +.content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} + .content > .content-type > div > label { clear: both; display: block; @@ -1588,3 +1617,27 @@ pre code { margin: 0; padding: 15px 0 5px 0px; } + +.swagger-ui-wrap { + max-width: 960px; + margin-left: auto; + margin-right: auto; +} + +.icon-btn { + cursor: pointer; +} + +#message-bar { + min-height: 30px; + text-align: center; + padding-top: 10px; +} + +.message-success { + color: #89BF04; +} + +.message-fail { + color: #cc0000; +} \ No newline at end of file diff --git a/src/main/html/index.html b/src/main/html/index.html index 6b9929ad..e2693aab 100644 --- a/src/main/html/index.html +++ b/src/main/html/index.html @@ -13,38 +13,12 @@ - - - - - - + + +