diff --git a/src/app/app.component.css b/src/app/app.component.css
index ec3d57f..b7bec94 100644
--- a/src/app/app.component.css
+++ b/src/app/app.component.css
@@ -1,285 +1,106 @@
:host {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
- font-size: 14px;
+ font-size: 12px;
color: #333;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- margin: 8px 0;
- }
-
- p {
- margin: 0;
- }
-
- .spacer {
- flex: 1;
- }
-
- .toolbar {
- height: 60px;
- margin: -8px;
- display: flex;
- align-items: center;
- background-color: #1976d2;
- color: white;
- font-weight: 600;
- }
-
- .toolbar img {
- margin: 0 16px;
- }
-
- .toolbar #twitter-logo {
- height: 40px;
- margin: 0 16px;
- }
-
- .toolbar #twitter-logo:hover {
- opacity: 0.8;
- }
-
- .content {
- display: flex;
- margin: 32px auto;
- padding: 0 16px;
- max-width: 960px;
- flex-direction: column;
- align-items: center;
- }
-
- svg.material-icons {
- height: 24px;
- width: auto;
- }
-
- svg.material-icons:not(:last-child) {
- margin-right: 8px;
- }
-
- .card svg.material-icons path {
- fill: #888;
- }
-
- .card-container {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- margin-top: 16px;
- }
-
- .card {
- border-radius: 4px;
- border: 1px solid #eee;
- background-color: #fafafa;
- height: 40px;
- width: 200px;
- margin: 0 8px 16px;
- padding: 16px;
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- transition: all 0.2s ease-in-out;
- line-height: 24px;
- }
-
- .card-container .card:not(:last-child) {
- margin-right: 0;
- }
-
- .card.card-small {
- height: 16px;
- width: 168px;
- }
-
- .card-container .card:not(.highlight-card) {
- cursor: pointer;
- }
-
- .card-container .card:not(.highlight-card):hover {
- transform: translateY(-3px);
- box-shadow: 0 4px 17px rgba(black, 0.35);
- }
-
- .card-container .card:not(.highlight-card):hover .material-icons path {
- fill: rgb(105, 103, 103);
- }
-
- .card.highlight-card {
- background-color: #1976d2;
- color: white;
- font-weight: 600;
- border: none;
- width: auto;
- min-width: 30%;
- position: relative;
- }
-
- .card.card.highlight-card span {
- margin-left: 60px;
- }
-
- svg#rocket {
- width: 80px;
- position: absolute;
- left: -10px;
- top: -24px;
- }
-
- svg#rocket-smoke {
- height: 100vh;
- position: absolute;
- top: 10px;
- right: 180px;
- z-index: -10;
- }
-
- a,
- a:visited,
- a:hover {
- color: #1976d2;
- text-decoration: none;
- }
-
- a:hover {
- color: #125699;
- }
-
- .terminal {
- position: relative;
- width: 80%;
- max-width: 600px;
- border-radius: 6px;
- padding-top: 45px;
- margin-top: 8px;
- overflow: hidden;
- background-color: rgb(15, 15, 16);
- }
-
- .terminal::before {
- content: "\2022 \2022 \2022";
- position: absolute;
- top: 0;
- left: 0;
- height: 4px;
- background: rgb(58, 58, 58);
- color: #c2c3c4;
- width: 100%;
- font-size: 2rem;
- line-height: 0;
- padding: 14px 0;
- text-indent: 4px;
- }
-
- .terminal pre {
- font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
- color: white;
- padding: 0 1rem 1rem;
- margin: 0;
- }
-
- .circle-link {
- height: 40px;
- width: 40px;
- border-radius: 40px;
- margin: 8px;
- background-color: white;
- border: 1px solid #eeeeee;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
- transition: 1s ease-out;
- }
-
- .circle-link:hover {
- transform: translateY(-0.25rem);
- box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
- }
-
- footer {
- margin-top: 8px;
- display: flex;
+ .header {
+ background-color: beige;
+ text-align: center;
+ border-bottom: none;
+ padding: 10px;
+ margin-bottom: 0.2;
+}
+
+.footer {
+background-color: beige;
+text-align: center;
+border-bottom: none;
+padding: 10px;
+margin-bottom: 0;
+}
+ .column {
+ float: left;
+ width: 27.28%;
+ height: 61vh;
+ padding: 50px;
+ text-align: center;
+ font-size: 25px;
+ cursor: pointer;
+ color: black;
+ }
+
+ .column:hover {
+ border: 1px solid black;
+ }
+
+ .row:after {
+ content: "";
+ display: table;
+ clear: both;
+ }
+
+ .closebtn {
+ float: right;
+ color: black;
+ font-size: 35px;
+ cursor: pointer;
+ }
+
+ h1 {
+ text-align: center;
+ font: Helvetica;
+ font-size: 40px;
+ }
+
+ h2 {
+ text-align: center;
+ font: Helvetica;
+ font-size: 20px;
+ font-style: italic;
+ background-color: beige;
+ }
+
+ h3 {
+ background-color: pink;
+ }
+
+ .button {
+ background-color: beige; /* Green */
+ border: none;
+ color: black;
+ padding: 15px 32px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 16px;
+ align-self: center;
+}
+
+ .image1 {
align-items: center;
- line-height: 20px;
+ content:url(/images/char.jpg);
}
- footer a {
- display: flex;
+ .image2 {
align-items: center;
+ content:url(/images/jig.jpg);
}
- .github-star-badge {
- color: #24292e;
- display: flex;
+ .image3 {
align-items: center;
- font-size: 12px;
- padding: 3px 10px;
- border: 1px solid rgba(27,31,35,.2);
- border-radius: 3px;
- background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);
- margin-left: 4px;
- font-weight: 600;
- font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
- }
-
- .github-star-badge:hover {
- background-image: linear-gradient(-180deg,#f0f3f6,#e6ebf1 90%);
- border-color: rgba(27,31,35,.35);
- background-position: -.5em;
- }
-
- .github-star-badge .material-icons {
- height: 16px;
- width: 16px;
- margin-right: 4px;
+ content:url(/images/odd.jpg);
}
- svg#clouds {
- position: fixed;
- bottom: -160px;
- left: -230px;
- z-index: -10;
- width: 1920px;
+ p {
+ font: Helvetica;
+ font-size: 25px;
+ font-style: italic;
}
-
- /* Responsive Styles */
- @media screen and (max-width: 767px) {
-
- .card-container > *:not(.circle-link) ,
- .terminal {
- width: 100%;
- }
-
- .card:not(.highlight-card) {
- height: 16px;
- margin: 8px 0;
- }
-
- .card.highlight-card span {
- margin-left: 72px;
- }
-
- svg#rocket-smoke {
- right: 120px;
- transform: rotate(-5deg);
- }
+ .spacer {
+ flex: 1;
}
-
- @media screen and (max-width: 575px) {
- svg#rocket-smoke {
- display: none;
- visibility: hidden;
- }
- }
\ No newline at end of file
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 258196c..92e6839 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -7,238 +7,28 @@
-
-
-
-
-
-
-
-
-
-
-
{{ title }} app is running!
-
-
-
-
-
-
-
-
-
Resources
-
Here are some links to help you get started:
-
-
-
-
-
Next Steps
-
What do you want to do next with your app?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Run and Watch Tests
-
-
-
-
+
-
Build for Production
-
+
+
-
-
-
-
ng generate component xyz
-
ng add @angular/material
-
ng add _____
-
ng test
-
ng build --prod
+
-
-
-
-
-
-
-
-
+
@@ -247,5 +37,3 @@
Next Steps
-
-
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts
index 20de901..bc3599d 100644
--- a/src/app/app.component.spec.ts
+++ b/src/app/app.component.spec.ts
@@ -1,6 +1,6 @@
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
-import { ExchangeRatesComponent } from './exchange-rates/exchange-rates.component';
+import { EvolutionsComponent } from './evolutions/evolutions.component';
import { GraphQLModule } from './graphql.module';
import { HttpClientModule } from '@angular/common/http';
@@ -9,7 +9,7 @@ describe('AppComponent', () => {
TestBed.configureTestingModule({
imports: [GraphQLModule, HttpClientModule],
declarations: [
- AppComponent, ExchangeRatesComponent,
+ AppComponent, EvolutionsComponent,
],
}).compileComponents();
}));
@@ -20,16 +20,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});
- it(`should have as title 'bill-learning-app'`, () => {
+ it(`should have as title 'Pokémon Potpourri'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
- expect(app.title).toEqual('bill-learning-app');
+ expect(app.title).toEqual('Pokémon Potpourri');
});
- it('should render title', () => {
+ it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
- expect(compiled.querySelector('.content span').textContent).toContain('bill-learning-app app is running!');
+ expect(compiled.querySelector('.content span').textContent).toContain('Pokémon Potpourri app is running!');
});
});
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index b2aecee..19899a1 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -6,5 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css']
})
export class AppComponent {
- title = 'bill-learning-app';
+ title = 'Pokémon Potpourri';
+ next = '- version one -'
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 9ff817c..b9928a0 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -4,12 +4,16 @@ import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { GraphQLModule } from './graphql.module';
import { HttpClientModule } from '@angular/common/http';
-import { ExchangeRatesComponent } from './exchange-rates/exchange-rates.component';
+import { EvolutionsComponent } from './evolutions/evolutions.component';
+import { JigComponent } from './jig/jig.component';
+import { OddComponent } from './odd/odd.component';
@NgModule({
declarations: [
AppComponent,
- ExchangeRatesComponent
+ EvolutionsComponent,
+ JigComponent,
+ OddComponent,
],
imports: [
BrowserModule,
diff --git a/src/app/evolution.ts b/src/app/evolution.ts
new file mode 100644
index 0000000..fd89596
--- /dev/null
+++ b/src/app/evolution.ts
@@ -0,0 +1,4 @@
+export class Evolution {
+ evo1: string;
+ evo2: string;
+}
diff --git a/src/app/evolutions/evolutions.component.css b/src/app/evolutions/evolutions.component.css
new file mode 100644
index 0000000..29f5fa3
--- /dev/null
+++ b/src/app/evolutions/evolutions.component.css
@@ -0,0 +1,5 @@
+p {
+ font-family: "Comic Sans MS", "Comic Sans", cursive;
+ font-size: 40px;
+ font-style: italic;
+}
diff --git a/src/app/evolutions/evolutions.component.html b/src/app/evolutions/evolutions.component.html
new file mode 100644
index 0000000..eac5cdf
--- /dev/null
+++ b/src/app/evolutions/evolutions.component.html
@@ -0,0 +1,11 @@
+
+ Loading...
+
+
+ Error :(
+
+
+
Class: {{evos.classification}}
+
MaxHP: {{evos.maxHP}}
+
MaxCP: {{evos.maxCP}}
+
diff --git a/src/app/evolutions/evolutions.component.spec.ts b/src/app/evolutions/evolutions.component.spec.ts
new file mode 100644
index 0000000..503cf5a
--- /dev/null
+++ b/src/app/evolutions/evolutions.component.spec.ts
@@ -0,0 +1,38 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { EvolutionsComponent } from './evolutions.component';
+
+describe('EvolutionsComponent', () => {
+ let component: EvolutionsComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ EvolutionsComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(EvolutionsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
+describe('findCP', () => {
+ it('should return a maxCP', () => {
+ const cp = 841
+ let response;
+ spyOn(EvolutionsComponent, 'findCP').and.returnValue(of(cp));
+
+ EvolutionsComponent.findCP().subscribe(res => {
+ cp = res;
+ });
+
+ expect(response).toEqual(cp);
+ });
+});
diff --git a/src/app/evolutions/evolutions.component.ts b/src/app/evolutions/evolutions.component.ts
new file mode 100644
index 0000000..cd8d2f7
--- /dev/null
+++ b/src/app/evolutions/evolutions.component.ts
@@ -0,0 +1,45 @@
+import { Component, OnInit } from '@angular/core';
+import {Apollo} from 'apollo-angular';
+import { ApolloQueryResult } from 'apollo-client';
+import gql from 'graphql-tag';
+import { Evolution } from '../evolution';
+
+@Component({
+ selector: 'app-evolutions',
+ templateUrl: './evolutions.component.html',
+ styleUrls: ['./evolutions.component.css']
+})
+export class EvolutionsComponent implements OnInit {
+ evos: any[];
+ loading = true;
+ error: any;
+
+ constructor(private apollo: Apollo) { }
+
+ ngOnInit() {
+ this.apollo
+ .watchQuery({
+ query: gql`
+ {
+ pokemon(name: "Charmander") {
+ name
+ classification
+ maxHP
+ maxCP
+ }
+ }
+ `,
+ })
+ .valueChanges.subscribe((result: ApolloQueryResult) => {
+ this.evos = result.data && result.data.pokemon;
+ console.log("data: " + JSON.stringify(this.evos));
+ this.loading = result.loading;
+ this.error = result.errors;
+ });
+ }
+
+ findCP(): Observable