Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit 73a724e

Browse files
authored
Merge pull request #34 from btroncone/operator-section
feat(operators): operator browser page
2 parents b6344d9 + f454d49 commit 73a724e

File tree

131 files changed

+1937
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1937
-46
lines changed

ngsw-manifest.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
"external": {
33
"urls": [
44
{"url": "https://fonts.googleapis.com/icon?family=Material+Icons"},
5-
{"url": "https://fonts.googleapis.com/css?family=Roboto"},
5+
{"url": "https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"},
66
{"url": "https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"},
7-
{"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"}
7+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"},
8+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css"},
9+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"},
10+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/languages/typescript.min.js"},
11+
{"url": "http://reactivex.io/rxjs/img/combineAll.png"},
12+
{"url": "http://reactivex.io/rxjs/img/combineLatest.png"}
813
]
914
}
1015
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@types/hammerjs": "2.0.35",
3434
"core-js": "2.4.1",
3535
"hammerjs": "2.0.8",
36+
"ngx-clipboard": "8.1.0",
3637
"rxjs": "5.4.2",
3738
"zone.js": "0.8.14"
3839
},

src/app/app.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
<mat-sidenav-container>
1313
<mat-sidenav #sidenav role="navigation">
1414
<mat-nav-list (click)="sidenav.toggle()">
15-
<a *ngFor="let menu of menus" mat-list-item routerLinkActive="active"
16-
[routerLinkActiveOptions]="menu.options"
15+
<a *ngFor="let menu of menus" mat-list-item routerLinkActive="active"
16+
[routerLinkActiveOptions]="menu.options"
1717
[routerLink]="menu.link">
1818
{{menu.title}}
1919
</a>
2020
</mat-nav-list>
2121
</mat-sidenav>
22-
<main class="body-margin">
22+
<main class="app-content">
2323
<router-outlet></router-outlet>
2424
</main>
2525
</mat-sidenav-container>

src/app/app.component.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,38 @@
22
padding: 0 16px;
33
font-weight: 600;
44
}
5+
6+
.app-fullpage {
7+
position: absolute;
8+
top: 0;
9+
bottom: 0;
10+
left: 0;
11+
right: 0;
12+
display: flex;
13+
flex-direction: column;
14+
15+
header {
16+
z-index: 10;
17+
}
18+
}
19+
20+
mat-sidenav-container {
21+
flex: 1 1 auto;
22+
width: 100%;
23+
height: 100%;
24+
}
25+
26+
mat-sidenav {
27+
width: 200px;
28+
}
29+
30+
.app-content {
31+
min-height: 100%;
32+
overflow: auto;
33+
display: flex;
34+
flex-direction: column;
35+
}
36+
37+
38+
39+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
@import '~@angular/material/theming';
2+
3+
$operator-border: #f3f3f3;
4+
$operator-active: #62757f;
5+
$link-color: #2196F3;
6+
7+
@mixin operator-theme($theme) {
8+
$primary: mat-color(map-get($theme, primary));
9+
$accent: mat-color(map-get($theme, accent));
10+
$operator-active-background: rgba($operator-active, .7);
11+
12+
rx-marbles > div {
13+
text-align: center;
14+
min-width: 840px;
15+
16+
circle {
17+
// temp fix: current broken on marble component
18+
filter: none !important;
19+
}
20+
}
21+
22+
app-operator a {
23+
text-decoration: none;
24+
color: $link-color;
25+
}
26+
27+
.operator-list {
28+
a {
29+
border-bottom: 1px solid $operator-border;
30+
&.active-operator {
31+
background-color: $operator-border;
32+
// color: white;
33+
&:hover {
34+
background-color: $operator-border;
35+
}
36+
}
37+
&:last-child {
38+
border-bottom: none;
39+
}
40+
}
41+
}
42+
43+
.section-list {
44+
padding: 1px;
45+
list-style-type: none;
46+
margin-top: 0;
47+
48+
li {
49+
padding-bottom: 5px;
50+
&:last-child {
51+
padding-bottom: 0;
52+
}
53+
}
54+
}
55+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<h2> Additional Resources </h2>
2+
<ul class="section-list">
3+
<li>
4+
<a [href]="sourceUrl" target="_blank"> Source Code </a>
5+
</li>
6+
<li>
7+
<a [href]="specsUrl" target="_blank"> Specs </a>
8+
</li>
9+
<li *ngFor="let resource of additionalResources">
10+
<a [href]="resource.url" target="_blank"> {{ resource.description }} </a>
11+
</li>
12+
</ul>

src/app/operators/components/additional-resources/additional-resources.component.scss

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Component, Input } from '@angular/core';
2+
import { OperatorReference } from '../../../../operator-docs';
3+
4+
@Component({
5+
selector: 'app-additional-resources',
6+
templateUrl: './additional-resources.component.html',
7+
styleUrls: ['./additional-resources.component.scss']
8+
})
9+
export class AdditionalResourcesComponent {
10+
@Input() additionalResources: OperatorReference[];
11+
@Input() sourceUrl: string;
12+
@Input() specsUrl: string;
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div
2+
*ngIf="!useInteractiveMarbles"
3+
class="marble-wrapper mat-elevation-z2">
4+
<img class="marble-diagram" [src]="url" *ngIf="url"/>
5+
</div>
6+
<rx-marbles
7+
*ngIf="useInteractiveMarbles"
8+
[attr.key]="operatorName">
9+
</rx-marbles>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@import '../../../../styles/media-helpers';
2+
3+
.marble-wrapper {
4+
background-color: white;
5+
text-align: center;
6+
}
7+
8+
.marble-diagram {
9+
max-width: 640px;
10+
11+
@media #{$mat-sm-down} {
12+
max-width: 100%;
13+
}
14+
}

0 commit comments

Comments
 (0)