Use markdown for response description (fixes #158)

This commit is contained in:
Roman Hotsiy 2016-12-13 08:08:37 +02:00
parent a3786847d2
commit bba35337e6
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<h2 class="responses-list-header" *ngIf="responses.length"> Responses </h2> <h2 class="responses-list-header" *ngIf="responses.length"> Responses </h2>
<zippy *ngFor="let response of responses;trackBy:trackByCode" title="{{response.code}} {{response.description || marked}}" <zippy *ngFor="let response of responses;trackBy:trackByCode" [title]="response.code + ' ' + response.description | marked"
[type]="response.type" [empty]="response.empty" (open)="lazySchema.load()"> [type]="response.type" [empty]="response.empty" (open)="lazySchema.load()">
<div *ngIf="response.headers" class="response-headers"> <div *ngIf="response.headers" class="response-headers">
<header> <header>

View File

@ -5,7 +5,7 @@
<polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "/> <polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "/>
</svg> </svg>
</span> </span>
{{title}} <span class="zippy-title-content" [innerHtml]="title"> </span>
</div> </div>
<div class="zippy-content"> <div class="zippy-content">
<ng-content></ng-content> <ng-content></ng-content>

View File

@ -45,11 +45,15 @@ $zippy-redirect-bg-color: rgba($zippy-redirect-color, .08);
color: $zippy-info-color; color: $zippy-info-color;
background-color: $zippy-info-bg-color; background-color: $zippy-info-bg-color;
} }
/deep/ p {
font-weight: normal;
}
} }
.zippy-indicator svg { .zippy-indicator svg {
height: 1.2em; height: 1.2em;
vertical-align: middle; vertical-align: top;
transition: all 0.3s ease; transition: all 0.3s ease;
transform: rotateZ(-180deg); transform: rotateZ(-180deg);
} }
@ -81,6 +85,8 @@ span.zippy-indicator {
font-size: 1.2em; font-size: 1.2em;
text-align: center; text-align: center;
display: inline-block; display: inline-block;
float: left;
margin-right: 5px;
} }
.zippy-content { .zippy-content {