Skip to content

Commit

Permalink
feat(dex): boxes base!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Ami Wang committed Mar 20, 2016
1 parent 8229dbf commit ea668cd
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 10 deletions.
3 changes: 3 additions & 0 deletions app/components/box.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Component } from 'angular2/core';

import { PokemonComponent } from './pokemon';

const HTML = require('../views/box.html');

@Component({
directives: [PokemonComponent],
selector: 'box',
template: HTML
})
Expand Down
9 changes: 9 additions & 0 deletions app/components/pokemon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Component } from 'angular2/core';

const HTML = require('../views/pokemon.html');

@Component({
selector: 'pokemon',
template: HTML
})
export class PokemonComponent {}
72 changes: 65 additions & 7 deletions app/styles/tracker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ info {
dex {
@include flex-grow(1);

padding: 100px;
padding: 100px 0;
overflow-y: scroll;
}

header {
margin: 0 auto;
max-width: 600px;
width: 6 * $pokemon-box-size + 2;

h1 {
margin: 0;
Expand All @@ -132,7 +132,7 @@ header {

padding: 10px;
text-align: center;
background-color: #f1f1f1;
background-color: $light-gray;
font-family: $font-secondary;
font-size: 11px;
font-weight: 700;
Expand All @@ -148,7 +148,7 @@ header {
}

&:hover:not(.active) {
background-color: darken(#f1f1f1, 5%);
background-color: darken($light-gray, 5%);
}
}
}
Expand All @@ -159,7 +159,7 @@ header {
h3 {
margin: 10px 0;
font-family: $font-secondary;
font-size: 13px;
font-size: 12px;
font-weight: 400;
text-transform: uppercase;
letter-spacing: 1px;
Expand All @@ -180,8 +180,66 @@ header {

box {
display: block;
margin: 100px auto 0;
max-width: 600px;
margin: 60px auto 0;
width: 6 * $pokemon-box-size + 2;

h1 {
margin: 0 0 10px;
font-family: $font-secondary;
font-size: 25px;
font-weight: 700;
text-transform: uppercase;
}

.box-container {
@include flexbox();
@include flex-wrap(wrap);

border: 1px solid $light-gray;
}

pokemon {
@include flexbox();
@include flex-direction(column);
@include align-items(center);
@include justify-content(center);
@include transition(all .1s ease-out);

width: $pokemon-box-size;
height: $pokemon-box-size;
border: 1px solid $light-gray;

h4 {
margin: 0;
font-size: 17px;
font-weight: 400;
}

p {
margin: 0;
font-family: $font-secondary;
font-size: 12px;
font-weight: 400;
text-transform: uppercase;
}

&:hover {
cursor: pointer;
}

&.captured {
background-color: $brand-primary-light;
border-color: darken($brand-primary-light, 5%);
}

&.disabled {
opacity: .1;

&:hover {
cursor: default;
}
}
}
}

@media (max-width: 1100px) {
Expand Down
6 changes: 5 additions & 1 deletion app/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
$font-primary: 'Alegreya Sans', 'Helvetica', sans-serif;
$font-secondary: 'Montserrat', 'Helvetica', sans-serif;

$brand-primary: #ffcb05;
$brand-primary: #ffd924;
$brand-primary-light: lighten($brand-primary, 20%);
$brand-secondary: #18447d;
$brand-secondary-dark: darken($brand-secondary, 7%);
$light-gray: #f1f1f1;

$pokemon-box-size: 110px;
35 changes: 33 additions & 2 deletions app/views/box.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
<hr>
<p>this is a dex box</p>
<h1>001 - 030</h1>
<div class="box-container">
<pokemon class="disabled"></pokemon>
<pokemon class="captured disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="captured disabled"></pokemon>
<pokemon class="captured disabled"></pokemon>
<pokemon class="captured disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon class="disabled"></pokemon>
<pokemon></pokemon>
<pokemon class="captured"></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon class="captured"></pokemon>
<pokemon class="captured"></pokemon>
<pokemon class="captured"></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon></pokemon>
<pokemon class="captured"></pokemon>
<pokemon class="captured"></pokemon>
</div>
3 changes: 3 additions & 0 deletions app/views/pokemon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h4>Fletchinder</h4>
<img src="http://cdn.bulbagarden.net/upload/e/ec/001MS.png">
<p>#001</p>

0 comments on commit ea668cd

Please sign in to comment.