JSONSchema tree and table

This commit is contained in:
Cesar 2016-03-14 15:29:27 -04:00
parent 2e53b9fa50
commit a0a209820f
8 changed files with 131 additions and 99 deletions

View File

@ -1,8 +1,28 @@
body { body {
margin: 0; margin: 0;
padding-top: 50px; padding-top: 50px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-moz-tap-highlight-color: rgba(0,0,0,0);
-ms-tap-highlight-color: rgba(0,0,0,0);
-o-tap-highlight-color: rgba(0,0,0,0);
tap-highlight-color: rgba(0,0,0,0);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
font-smoothing: antialiased;
-webkit-osx-font-smoothing: grayscale;
-moz-osx-font-smoothing: grayscale;
osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
text-size-adjust: 100%;
-webkit-text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
-ms-text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
text-rendering: optimizeSpeed!important;
font-smooth: always;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
} }
nav input, nav button { nav input, nav button {

View File

@ -61,7 +61,7 @@ $samples-panel-width: 40%;
$sample-panel-headers-color: lighten($black, 50%); $sample-panel-headers-color: lighten($black, 50%);
$sample-panel-color: lighten($black, 80%); $sample-panel-color: lighten($black, 80%);
$tree-lines-color: #7D97CE; $tree-lines-color: rgba($primary-color, .5);
$side-menu-mobile-breakpoint: 1000px; $side-menu-mobile-breakpoint: 1000px;

View File

@ -1,6 +1,6 @@
@import '../../common/styles/variables'; @import '../../common/styles/variables';
$lines-width: 1px; $lines-width: 1px;
$bullet-size: 7px; $bullet-size: 1px;
$cell-spacing: 25px; $cell-spacing: 25px;
$cell-padding: 10px; $cell-padding: 10px;
$bullet-margin: 10px; $bullet-margin: 10px;
@ -46,6 +46,10 @@ $sub-schema-offset: ($bullet-size/2) + $bullet-margin;
width: 75%; width: 75%;
} }
.param-description {
font-size: 13px;
}
.param-required { .param-required {
color: red; color: red;
font-weight: bold; font-weight: bold;
@ -93,8 +97,8 @@ $sub-schema-offset: ($bullet-size/2) + $bullet-margin;
content: ""; content: "";
display: inline-block; display: inline-block;
width: $bullet-size; width: $bullet-size;
height: $bullet-size; height: $bullet-size + 6;
background-color: $tree-lines-color; background-color: $primary-color;
margin: 0 $bullet-margin; margin: 0 $bullet-margin;
vertical-align: middle; vertical-align: middle;
} }
@ -142,7 +146,8 @@ $sub-schema-offset: ($bullet-size/2) + $bullet-margin;
} }
.param-enum { .param-enum {
color: #666; color: $text-color;
font-size: 13px;
&:before { &:before {
content: "Values: {" content: "Values: {"

View File

@ -13,9 +13,10 @@ $array-marker-line-height: 1.5;
} }
json-schema.nested-schema { json-schema.nested-schema {
background-color: #F1F1F1; background-color: $side-menu-active-bg-color;
padding: 10px 20px; padding: 10px 20px;
position: relative; position: relative;
border-radius: $border-radius;
&:before, &:after { &:before, &:after {
content: ""; content: "";

View File

@ -165,7 +165,7 @@ api-logo {
} }
p:last-of-type { p:last-of-type {
margin-bottom: 1em; margin-bottom: 0;
} }
blockquote { blockquote {

View File

@ -20,6 +20,7 @@ header {
color: $sample-panel-headers-color; color: $sample-panel-headers-color;
&.hover { &.hover {
background-color: rgba(white, .1);
color: #ffffff; color: #ffffff;
} }

View File

@ -1,4 +1,4 @@
<header *ngIf="data.responses.length"> Responses samples </header> <header *ngIf="data.responses.length"> Response samples </header>
<tabs *ngIf="data.responses.length"> <tabs *ngIf="data.responses.length">
<tab *ngFor="#response of data.responses" tabTitle="{{response.code}} {{response.description}}" <tab *ngFor="#response of data.responses" tabTitle="{{response.code}} {{response.description}}"
[tabStatus]="response.type"> [tabStatus]="response.type">

View File

@ -27,6 +27,11 @@ header {
color: $sample-panel-headers-color; color: $sample-panel-headers-color;
line-height: 1.25; line-height: 1.25;
&:hover {
color: #ffffff;
background-color: rgba(white, .1);
}
&.active { &.active {
background-color: white; background-color: white;
color: $black; color: $black;