add logo and play to toolbar, with no functionality

This commit is contained in:
catarak 2016-05-11 15:31:17 -04:00
parent 60364f6213
commit d1c353fc26
8 changed files with 86 additions and 2 deletions

14
images/p5js-logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -1,13 +1,17 @@
import React from 'react'; import React from 'react';
var playUrl = require('../../../images/play.svg'); var playUrl = require('../../../images/play.svg');
var logoUrl = require('../../../images/p5js-logo.svg');
class Toolbar extends React.Component { class Toolbar extends React.Component {
render() { render() {
return ( return (
<div className="toolbar"> <div className="toolbar">
<img className="toolbar__logo" src={logoUrl}/>
<div className="toolbar__play-button">
<img src={playUrl}/> <img src={playUrl}/>
</div> </div>
</div>
); );
} }
} }

View file

@ -0,0 +1,12 @@
%toolbar-button {
background-color: $light-button-background-color;
color: $light-button-color;
display: inline-block;
height: #{44 / $base-font-size}rem;
width: #{44 / $base-font-size}rem;
text-align: center;
border-radius: 100%;
line-height: #{50 / $base-font-size}rem;
cursor: pointer;
}

View file

@ -1 +1,36 @@
$base-font-size: 16; $base-font-size: 16;
//colors
$p5js-pink: #ed225d;
$white: #fff;
$black: #000;
$light-primary-text-color: #333;
$light-secondary-text-color: #6b6b6b;
$light-inactive-text-color: #b5b5b5;
$light-background-color: #fdfdfd;
$light-button-background-color: #f4f4f4;
$light-button-color: $black;
$light-toolbar-button-color: $p5js-pink;
$light-button-background-hover-color: $p5js-pink;
$light-button-background-active-color: #f10046;
$light-button-hover-color: $white;
$light-button-active-color: $white;
$dark-primary-text-color: $white;
$dark-secondary-text-color: #c2c2c2;
$dark-inactive-color: #7d7d7d;
$dark-background-color: #333;
$dark-button-background-color: $white;
$dark-button-color: $black;
$dark-toolbar-button-color: $p5js-pink;
$dark-button-background-hover-color: $p5js-pink;
$dark-button-background-active-color: #f10046;
$dark-button-hover-color: $white;
$dark-button-active-color: $white;
$editor-border-color: #f4f4f4;

View file

@ -1,3 +1,7 @@
* {
box-sizing: border-box;
}
html { html {
font-size: #{$base-font-size}px; font-size: #{$base-font-size}px;
} }

View file

@ -1,6 +1,7 @@
.CodeMirror { .CodeMirror {
font-family: Inconsolata, monospace; font-family: Inconsolata, monospace;
height: 100%; height: 100%;
border: 1px solid $editor-border-color;
} }
.CodeMirror-linenumbers { .CodeMirror-linenumbers {

View file

@ -0,0 +1,12 @@
.toolbar__play-button {
@extend %toolbar-button;
}
.toolbar__logo {
margin-right: #{30 / $base-font-size}rem;
}
.toolbar {
padding: #{20 / $base-font-size}rem #{60 / $base-font-size}rem;
display: flex;
}

View file

@ -1,4 +1,5 @@
@import 'abstracts/variables'; @import 'abstracts/variables';
@import 'abstracts/placeholders';
@import 'base/reset'; @import 'base/reset';
@import 'base/base'; @import 'base/base';
@ -7,5 +8,6 @@
@import 'components/p5-widget-codemirror-theme'; @import 'components/p5-widget-codemirror-theme';
@import 'components/editor'; @import 'components/editor';
@import 'components/toolbar';
@import 'layout/ide'; @import 'layout/ide';