This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from btroncone/operator-section
feat(operators): operator browser page
- Loading branch information
Showing
131 changed files
with
1,937 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@import '~@angular/material/theming'; | ||
|
||
$operator-border: #f3f3f3; | ||
$operator-active: #62757f; | ||
$link-color: #2196F3; | ||
|
||
@mixin operator-theme($theme) { | ||
$primary: mat-color(map-get($theme, primary)); | ||
$accent: mat-color(map-get($theme, accent)); | ||
$operator-active-background: rgba($operator-active, .7); | ||
|
||
rx-marbles > div { | ||
text-align: center; | ||
min-width: 840px; | ||
|
||
circle { | ||
// temp fix: current broken on marble component | ||
filter: none !important; | ||
} | ||
} | ||
|
||
app-operator a { | ||
text-decoration: none; | ||
color: $link-color; | ||
} | ||
|
||
.operator-list { | ||
a { | ||
border-bottom: 1px solid $operator-border; | ||
&.active-operator { | ||
background-color: $operator-border; | ||
// color: white; | ||
&:hover { | ||
background-color: $operator-border; | ||
} | ||
} | ||
&:last-child { | ||
border-bottom: none; | ||
} | ||
} | ||
} | ||
|
||
.section-list { | ||
padding: 1px; | ||
list-style-type: none; | ||
margin-top: 0; | ||
|
||
li { | ||
padding-bottom: 5px; | ||
&:last-child { | ||
padding-bottom: 0; | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/app/operators/components/additional-resources/additional-resources.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h2> Additional Resources </h2> | ||
<ul class="section-list"> | ||
<li> | ||
<a [href]="sourceUrl" target="_blank"> Source Code </a> | ||
</li> | ||
<li> | ||
<a [href]="specsUrl" target="_blank"> Specs </a> | ||
</li> | ||
<li *ngFor="let resource of additionalResources"> | ||
<a [href]="resource.url" target="_blank"> {{ resource.description }} </a> | ||
</li> | ||
</ul> |
Empty file.
13 changes: 13 additions & 0 deletions
13
src/app/operators/components/additional-resources/additional-resources.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { OperatorReference } from '../../../../operator-docs'; | ||
|
||
@Component({ | ||
selector: 'app-additional-resources', | ||
templateUrl: './additional-resources.component.html', | ||
styleUrls: ['./additional-resources.component.scss'] | ||
}) | ||
export class AdditionalResourcesComponent { | ||
@Input() additionalResources: OperatorReference[]; | ||
@Input() sourceUrl: string; | ||
@Input() specsUrl: string; | ||
} |
9 changes: 9 additions & 0 deletions
9
src/app/operators/components/marble-diagram/marble-diagram.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div | ||
*ngIf="!useInteractiveMarbles" | ||
class="marble-wrapper mat-elevation-z2"> | ||
<img class="marble-diagram" [src]="url" *ngIf="url"/> | ||
</div> | ||
<rx-marbles | ||
*ngIf="useInteractiveMarbles" | ||
[attr.key]="operatorName"> | ||
</rx-marbles> |
14 changes: 14 additions & 0 deletions
14
src/app/operators/components/marble-diagram/marble-diagram.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@import '../../../../styles/media-helpers'; | ||
|
||
.marble-wrapper { | ||
background-color: white; | ||
text-align: center; | ||
} | ||
|
||
.marble-diagram { | ||
max-width: 640px; | ||
|
||
@media #{$mat-sm-down} { | ||
max-width: 100%; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/app/operators/components/marble-diagram/marble-diagram.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { OperatorParameters } from '../../../../operator-docs'; | ||
|
||
@Component({ | ||
selector: 'app-marble-diagram', | ||
templateUrl: './marble-diagram.component.html', | ||
styleUrls: ['./marble-diagram.component.scss'] | ||
}) | ||
export class MarbleDiagramComponent { | ||
@Input() operatorName: string; | ||
@Input() useInteractiveMarbles: boolean; | ||
@Input() url: string; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/app/operators/components/operator-examples/operator-examples.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<h2> Examples </h2> | ||
<div | ||
class="code-example" | ||
*ngFor="let example of operatorExamples" | ||
appHighlightJs> | ||
<div class="code-block mat-elevation-z2"> | ||
<div class="example-header"> | ||
<div class="header-title" [innerHTML]="example.name"></div> | ||
<button | ||
mat-icon-button | ||
ngxClipboard | ||
[cbContent]="example.code" | ||
matTooltip="Copy"> | ||
<mat-icon>content_copy</mat-icon> | ||
</button> | ||
</div> | ||
<div class="bin-wrapper"> | ||
<iframe [src]="example.externalLink.url | safeUrl"></iframe> | ||
</div> | ||
</div> | ||
</div> |
42 changes: 42 additions & 0 deletions
42
src/app/operators/components/operator-examples/operator-examples.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.code-block { | ||
position: relative; | ||
|
||
pre { | ||
margin-top: 0; | ||
padding-top: 0; | ||
} | ||
} | ||
|
||
.menu-button { | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
} | ||
|
||
.example-options { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
} | ||
|
||
.example-header { | ||
align-content: center; | ||
align-items: center; | ||
display: flex; | ||
justify-content: center; | ||
padding: 8px 6px 8px 18px; | ||
color: rgba(0, 0, 0, 0.692); | ||
background: #fafafa; | ||
|
||
.header-title { | ||
flex: 1 1 auto; | ||
} | ||
} | ||
|
||
.bin-wrapper { | ||
iframe { | ||
border: none; | ||
width:100%; | ||
height: 350px; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/app/operators/components/operator-examples/operator-examples.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { OperatorExample } from '../../../../operator-docs'; | ||
|
||
@Component({ | ||
selector: 'app-operator-examples', | ||
templateUrl: './operator-examples.component.html', | ||
styleUrls: ['./operator-examples.component.scss'] | ||
}) | ||
export class OperatorExamplesComponent { | ||
@Input() operatorExamples: OperatorExample[]; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/app/operators/components/operator-extras/operator-extras.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div | ||
class="extra-tip" | ||
*ngFor="let tip of tips"> | ||
<mat-icon class="tip-info">info</mat-icon> | ||
<h3 [innerHTML]="tip.text"></h3> | ||
</div> | ||
<div | ||
class="extra-tip" | ||
*ngFor="let warning of warnings"> | ||
<mat-icon class="tip-warning">warning</mat-icon> | ||
<h3 [innerHTML]="warning.text"></h3> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
src/app/operators/components/operator-extras/operator-extras.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
h3 { | ||
display: inline-block; | ||
vertical-align: middle; | ||
padding-left: 10px; | ||
} | ||
|
||
.tip-warning { | ||
color: rgb(244, 67, 54); | ||
} | ||
|
||
.tip-info { | ||
color: rgb(33, 150, 243); | ||
} |
19 changes: 19 additions & 0 deletions
19
src/app/operators/components/operator-extras/operator-extras.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { OperatorExtra } from '../../../../operator-docs'; | ||
|
||
@Component({ | ||
selector: 'app-operator-extras', | ||
templateUrl: './operator-extras.component.html', | ||
styleUrls: ['./operator-extras.component.scss'] | ||
}) | ||
export class OperatorExtrasComponent { | ||
@Input() operatorExtras: OperatorExtra[] = []; | ||
|
||
get tips() { | ||
return this.operatorExtras.filter(e => e.type === 'Tip'); | ||
} | ||
|
||
get warnings() { | ||
return this.operatorExtras.filter(e => e.type === 'Warning'); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/app/operators/components/operator-header/operator-header.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<mat-toolbar class="operator-name"> | ||
{{ operatorName }} | ||
</mat-toolbar> | ||
<mat-toolbar class="signature"> | ||
{{ operatorSignature }} | ||
</mat-toolbar> |
15 changes: 15 additions & 0 deletions
15
src/app/operators/components/operator-header/operator-header.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@import '../../operator-theme'; | ||
|
||
.operator-name { | ||
font-size:30px; | ||
} | ||
|
||
.signature { | ||
margin-bottom: 24px; | ||
} | ||
|
||
mat-toolbar { | ||
background: $operator-active !important; | ||
color: rgba(255, 255, 255, 0.87); | ||
font-weight: normal; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/app/operators/components/operator-header/operator-header.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Component, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-operator-header', | ||
templateUrl: './operator-header.component.html', | ||
styleUrls: ['./operator-header.component.scss'] | ||
}) | ||
export class OperatorHeaderComponent { | ||
@Input() operatorName: string; | ||
@Input() operatorSignature: string; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/app/operators/components/operator-parameters/operator-parameters.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h2> Parameters </h2> | ||
<table class="parameter-table mat-elevation-z2"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Type</th> | ||
<th>Attribute</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let parameter of operatorParameters"> | ||
<td> {{parameter.name}} </td> | ||
<td> {{parameter.type}} </td> | ||
<td> {{parameter.attribute}} </td> | ||
<td> {{parameter.description}} </td> | ||
</tr> | ||
</tbody> | ||
</table> |
Oops, something went wrong.