mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-28 03:23:44 +03:00
Merge commit '79678332549e3343c53fb585e670f600f3f00503' into releases
This commit is contained in:
commit
68b466e034
|
@ -7,7 +7,7 @@
|
||||||
<tab *ngFor="let sample of data.samples" [tabTitle]="sample.lang">
|
<tab *ngFor="let sample of data.samples" [tabTitle]="sample.lang">
|
||||||
<div class="code-sample">
|
<div class="code-sample">
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
<span copy-button [copyText]="sample.source" class="hint--top hint--inversed"> <a>Copy</a> </span>
|
<span copy-button [copyText]="sample.source" class="hint--top-left hint--inversed"><a>Copy</a></span>
|
||||||
</div>
|
</div>
|
||||||
<pre [innerHtml]="sample.source | prism:sample.lang"></pre>
|
<pre [innerHtml]="sample.source | prism:sample.lang"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
@import '../../shared/styles/variables';
|
@import '../../shared/styles/variables';
|
||||||
|
|
||||||
|
:host {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.action-buttons {
|
.action-buttons {
|
||||||
display: block;
|
display: block;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
@import '../../shared/styles/variables';
|
@import '../../shared/styles/variables';
|
||||||
|
|
||||||
|
:host {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
tab, tabs {
|
tab, tabs {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,12 @@ pre {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
clear: both;
|
clear: both;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
// hide top-level collapser
|
||||||
|
.redoc-json > .collapser {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-buttons {
|
.action-buttons {
|
||||||
|
@ -12,9 +18,15 @@ pre {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
|
z-index: 1;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
|
&:last-child > a:before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> span > a {
|
> span > a {
|
||||||
|
@ -28,11 +40,6 @@ pre {
|
||||||
transform: translateX(-10px);
|
transform: translateX(-10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child:before {
|
|
||||||
display: none;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ export class SchemaSample extends BaseComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.fromCache()) {
|
if (this.fromCache()) {
|
||||||
|
this.initButtons();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -78,8 +79,11 @@ export class SchemaSample extends BaseComponent {
|
||||||
}
|
}
|
||||||
this.cache(sample);
|
this.cache(sample);
|
||||||
this.data.sample = sample;
|
this.data.sample = sample;
|
||||||
|
this.initButtons();
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof sample === 'object') {
|
initButtons() {
|
||||||
|
if (typeof this.data.sample === 'object') {
|
||||||
this.enableButtons = true;
|
this.enableButtons = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "redoc",
|
"name": "redoc",
|
||||||
"description": "Swagger-generated API Reference Documentation",
|
"description": "Swagger-generated API Reference Documentation",
|
||||||
"version": "0.16.0",
|
"version": "0.16.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/Rebilly/ReDoc"
|
"url": "git://github.com/Rebilly/ReDoc"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user