Skip to content

Commit

Permalink
feat(icons): add phone and smartphone icons (#131)
Browse files Browse the repository at this point in the history
* feat(icons): add smartphone icon

* docs(icons): add smartphone to storybook

* feat(icons): add phone icon

* docs(icons): add phone to storybook
  • Loading branch information
guastallaigor authored and abdallahalsamman committed Dec 9, 2018
1 parent abc30e1 commit 35469c4
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/icons.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ stories.add('icon', () => {
'icon youtube': 'icon youtube',
'icon close': 'icon close',
pokeball: 'pokeball',
smartphone: 'smartphone',
phone: 'phone',
'octocat animate': 'octocat animate',
'icon trophy': 'icon trophy',
'nes-logo': 'nes-logo',
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h3 class="title">SNS</h3>
<i class="icon twitch"></i>
<i class="icon twitch is-medium"></i>
<i class="icon twitch is-large"></i>

<i class="icon reddit"></i>
<i class="icon reddit is-medium"></i>
<i class="icon reddit is-large"></i>
Expand All @@ -244,6 +244,8 @@ <h3 class="title">Others</h3>
<i class="icon trophy is-large"></i>

<i class="pokeball"></i>
<i class="smartphone"></i>
<i class="phone"></i>
</div>
</section>

Expand Down
6 changes: 3 additions & 3 deletions scss/icons/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@

&.medium::before {
@include pixelize($icon-medium, $icon-medium-colors, $px);
}
}

&.twitch::before {
@include pixelize($icon-twitch, $icon-twitch-colors, $px);
}

&.reddit::before {
@include pixelize($icon-reddit, $icon-reddit-colors, $px);
}
Expand Down
2 changes: 2 additions & 0 deletions scss/pixel-arts/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
@import "bcrikko.scss";
@import "octocat.scss";
@import "pokeball.scss";
@import "phone.scss";
@import "smartphone.scss";
43 changes: 43 additions & 0 deletions scss/pixel-arts/phone.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.phone {
$px: 6px;
$phone-colors: (#596985, #3c4665, #000);
// prettier-ignore
$phone: (
(0,0,3,3,3,3,3,3),
(0,3,3,2,2,2,1,3),
(3,3,2,2,2,2,1,3),
(3,2,2,2,2,2,1,3),
(3,2,2,2,2,2,1,3),
(3,2,2,2,2,2,1,3),
(3,2,2,3,3,3,3,3),
(3,2,2,3,0,0,0,0),
(3,2,2,3,0,0,0,0),
(3,2,2,3,0,0,0,0),
(3,2,2,3,0,0,0,0),
(3,2,2,3,0,0,0,0),
(3,2,2,3,0,0,0,0),
(3,2,2,3,0,0,0,0),
(3,2,2,3,3,3,3,3),
(3,2,2,2,2,2,1,3),
(3,2,2,2,2,2,1,3),
(3,2,2,2,2,2,1,3),
(3,3,2,2,2,2,1,3),
(0,3,3,2,2,2,1,3),
(0,0,3,3,3,3,3,3)
);

position: relative;
display: inline-block;
width: $px * 8;
height: $px * 21;

&::before {
position: absolute;
top: $px * -1;
left: $px * -1;
content: "";
background: transparent;

@include pixelize($phone, $phone-colors, $px);
}
}
49 changes: 49 additions & 0 deletions scss/pixel-arts/smartphone.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.smartphone {
$px: 6px;
$smartphone-colors: (#fff, #060606);
// prettier-ignore
$smartphone: (
(0,2,2,2,2,2,2,2,2,2,2,2,2,2),
(2,2,1,1,1,1,1,1,1,1,1,1,1,2,2),
(2,1,1,1,2,2,2,2,2,2,2,1,1,1,2),
(2,1,1,1,1,1,1,1,1,1,1,1,1,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,2,2,2,2,2,2,2,2,2,2,2,1,2),
(2,1,1,1,1,1,1,1,1,1,1,1,1,1,2),
(2,1,1,1,1,1,1,2,2,1,1,1,1,1,2),
(2,1,1,1,1,1,1,2,2,1,1,1,1,1,2),
(2,2,1,1,1,1,1,1,1,1,1,1,1,2,2),
(0,2,2,2,2,2,2,2,2,2,2,2,2,2)
);

position: relative;
display: inline-block;
width: $px * 16;
height: $px * 27;

&::before {
position: absolute;
top: $px * -1;
left: $px * -1;
content: "";
background: transparent;

@include pixelize($smartphone, $smartphone-colors, $px);
}
}

0 comments on commit 35469c4

Please sign in to comment.