Skip to content

Commit

Permalink
Merge pull request webpack#225 from webpack/feature/fonts-n-styles
Browse files Browse the repository at this point in the history
Design Updates and Fixes
  • Loading branch information
bebraw authored Oct 15, 2016
2 parents f6c8761 + e995296 commit 4ad61fa
Show file tree
Hide file tree
Showing 57 changed files with 408 additions and 433 deletions.
6 changes: 0 additions & 6 deletions antwar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ module.exports = {
title: 'webpack',
file: path.join(__dirname, 'template.ejs')
},
assets: [
{
from: './fonts',
to: 'assets'
}
],
output: 'build',
title: 'webpack',
keywords: ['webpack', 'javascript', 'web development', 'programming'],
Expand Down
Binary file added assets/cube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicon.ico
Binary file not shown.
Binary file added assets/geomanist-medium.woff
Binary file not shown.
Binary file added assets/geomanist-medium.woff2
Binary file not shown.
Binary file added assets/geomanist-regular.woff
Binary file not shown.
Binary file added assets/geomanist-regular.woff2
Binary file not shown.
Binary file added assets/icons.woff
Binary file not shown.
Binary file added assets/icons.woff2
Binary file not shown.
4 changes: 0 additions & 4 deletions components/container/container-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@
width: 100%;
max-width: map-get($screens, large);
margin: 0 auto;

@include break(large) {
padding-right: 40px;
}
}
14 changes: 2 additions & 12 deletions components/contributors/contributors-style.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
.contributor {
display: inline-block;
margin-top:1em;
margin-right: 1em;

&:last-of-type {
margin-right: 0;
}

img {
height: 80px;
border-radius: 3px;
}

span {
display: block;
text-align: center;
font-size: 0.8em;
height: 50px;
}
}
5 changes: 2 additions & 3 deletions components/contributors/contributors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import './contributors-style';
export default ({contributors}) => {
return (
<div className="contributors">
<h4>Contributors</h4>
<h3>Contributors:</h3>
<div className="contributors__list">
{
(contributors || []).map((contributor) => (
<a key={ contributor }
className="contributor"
href={ `https://github.com/${contributor}` }>
<img src={ `https://github.com/${contributor}.png?size=80` } />
<span>{ contributor }</span>
<img src={ `https://github.com/${contributor}.png?size=50` } />
</a>
))
}
Expand Down
8 changes: 4 additions & 4 deletions components/cube/cube-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@

&--light {
.cube__outer .cube__face:after {
background:transparentize(map-get($colors, concrete), 0.8);
background:transparentize(map-get($colors, malibu), 0.6);
}

.cube__inner .cube__face:after {
background:transparentize(map-get($colors, tussock), 0.4);
background:transparentize(map-get($colors, denim), 0.2);
}

&:hover {
.cube__outer .cube__face:after {
background:transparentize(map-get($colors, white), 0.8);
background:transparentize(map-get($colors, malibu), 0.7);
}

.cube__inner .cube__face:after {
background:transparentize(map-get($colors, lynch), 0.6);
background:map-get($colors, denim);
}
}
}
Expand Down
20 changes: 11 additions & 9 deletions components/footer/footer-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
flex-wrap: wrap;
justify-content: space-between;
align-content: center;
padding-top: 0.3em;
padding-bottom: 0.3em;
padding: 0.4em 0;

@include break {
flex-direction: initial;
Expand All @@ -26,9 +25,12 @@
flex: 0 0 auto;
display: flex;
margin: auto;
align-items: center;
padding: 0.25em 0;

@include break {
margin: 0;
padding: 0;
}
}

Expand All @@ -50,20 +52,20 @@
@include break {
flex: 0 0 auto;
display: block;

.cube {
margin-top: 5px;
}
}
}

.footer__icon {
display:block;
height:35px;

img { height:100%; width:auto; }
}

.footer__link {
padding: 1em 0;
font-size: getFontSize(-2);
text-decoration: none;
text-transform: uppercase;
color: map-get($colors, dusty-grey);
transition: color 250ms;

&:not(:last-child) {
margin-right: 1.5em;
Expand Down
6 changes: 3 additions & 3 deletions components/footer/footer.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Link from '../link/link';
import Cube from '../cube/cube';
import Container from '../container/container';
import CubeImg from '../../assets/cube.png';
import './footer-style';

export default (props) => {
Expand All @@ -15,8 +15,8 @@ export default (props) => {
</section>

<section className="footer__middle">
<Link to="/">
<Cube depth={ 18 } hover />
<Link to="/" className="footer__icon">
<img src={ CubeImg } />
</Link>
</section>

Expand Down
46 changes: 24 additions & 22 deletions components/logo/logo-style.scss
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
@import 'vars';

@import url(https://fonts.googleapis.com/css?family=Averia+Sans+Libre:300);

.logo {
position:relative;
display:inline-block;
display:flex;
float:left;
align-items:middle;

&__icon {
width:auto;
height:35px;
opacity:0.9;
transition:opacity 250ms;
}

&__text {
font-family:'Geomanist', 'Century Gothic', sans-serif;
font-size:1.3em;
font-family:'Averia Sans Libre';
margin-left:1.75em;
line-height:1.4;
font-weight:500;
text-rendering: geometricPrecision;
letter-spacing:0.5px;
margin-left:0.25em;
margin-top:3px;
color:map-get($colors, emperor);
transition:color 250ms;
}

&__cube {
position:absolute;
}

&--dark {
.logo__text {
color:map-get($colors, dove-grey);
}

&:hover .logo__text {
color:map-get($colors, mine-shaft);
}
&:hover {
.logo__icon { opacity:1; }
.logo__text { color:map-get($colors, mine-shaft); }
}

&--light {
.logo__text {
color:map-get($colors, concrete);
color:map-get($colors, concrete);
//color:rgb(246, 250, 251);
}

&:hover .logo__text {
color:map-get($colors, parchment);
color:map-get($colors, white);
}
}
}
}
65 changes: 10 additions & 55 deletions components/logo/logo.jsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,14 @@
import React from 'react';
import Cube from '../cube/cube';
import CubeImg from '../../assets/cube.png';
import './logo-style';

export default class Logo extends React.Component {
constructor(props) {
super(props);
export default props => {
let { light } = props;

this.listeners = {
spin: this._triggerSpin.bind(this),
reset: this._triggerReset.bind(this)
};
}

render() {
let { theme = 'dark' } = this.props;

return (
<span
ref={ ref => this.container = ref }
className={ `logo logo--${theme}` }>
<Cube
ref={ ref => this.icon = ref }
className="logo__cube"
theme={ theme }
depth={ 20 } />
<span className="logo__text">webpack</span>
</span>
);
}

componentDidMount() {
this.container.addEventListener('mouseenter', this.listeners.spin);
this.container.addEventListener('mouseleave', this.listeners.reset);
}

componentWillUnmount() {
this.container.removeEventListener('mouseenter', this.listeners.spin);
this.container.removeEventListener('mouseleave', this.listeners.reset);
}

/**
* Proxy to Cube's spin method
*
* @param {object} e - Native event
*/
_triggerSpin(e) {
this.icon.spin(e);
}

/**
* Proxy to Cube's reset method
*
* @param {object} e - Native event
*/
_triggerReset(e) {
this.icon.reset(e);
}
}
return (
<span className={ `logo${light ? ' logo--light' : ''}` }>
<img className="logo__icon" src={ CubeImg } />
<span className="logo__text">webpack</span>
</span>
);
};
Loading

0 comments on commit 4ad61fa

Please sign in to comment.