Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add special rendering for deprecated operations #290

Merged
merged 2 commits into from
Jul 4, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change styling of deprecated operation header
  • Loading branch information
pgolm committed Jul 4, 2017
commit 901178e48bd74d4f4bfc28e4258162e2cd7f83ae
5 changes: 1 addition & 4 deletions lib/components/Operation/operation.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<div class="operation" *ngIf="operation">
<div class="operation-content">
<h2 class="operation-header sharable-header">
<h2 class="operation-header sharable-header" [ngClass]="{deprecated: operation.deprecated}">
<a class="share-link" href="#{{operation.anchor}}"></a>{{operation.summary}}
</h2>
<endpoint-link *ngIf="pathInMiddlePanel"
[verb]="operation.verb" [path]="operation.path"> </endpoint-link>
<div class="operation-deprecated" *ngIf="operation.deprecated">
Warning: Deprecated
</div>
<div class="operation-tags" *ngIf="operation.info.tags.length">
<a *ngFor="let tag of operation.info.tags" attr.href="#tag/{{tag}}"> {{tag}} </a>
</div>
Expand Down
14 changes: 11 additions & 3 deletions lib/components/Operation/operation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@

.operation-header {
margin-bottom: calc(1em - 6px);
}

.operation-deprecated {
font-weight: bold;
&.deprecated {
&:after {
content: 'Deprecated';
color: $black;
background: $yellow;
padding: 3px 10px;
text-transform: uppercase;
display: inline-block;
margin: 0;
}
}
}

.operation-tags {
Expand Down