-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Added initial infrastructure for CSS Modules. 2. Created logo React component 3. Fixing flow type errors
- Loading branch information
Showing
12 changed files
with
126 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"javascript.validate.enable": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
loader: 'style-loader!css-loader?modules&camelCase&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!sass-loader', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// @flow | ||
import React from 'react'; | ||
import css from './Logo.scss'; | ||
|
||
type Props = { | ||
onClick?: () => any; | ||
size?: string; // Future Task: Use ScreenSize enum | ||
} | ||
|
||
export default class Logo extends React.Component<Props, {}> { | ||
render() { | ||
const { onClick, size = '' } = this.props; | ||
const linkClass = onClick ? 'link' : ''; | ||
const containerClass = `${css.container} ${css[size] || ''} ${linkClass}`; | ||
|
||
return ( | ||
<div className={containerClass} onClick={onClick}> | ||
<span className={css.if}>if</span> | ||
<span className={css.me}>me</span> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@import "base.scss"; | ||
|
||
.container { | ||
display: inline-block; | ||
width: 3em; | ||
height: 3em; | ||
box-sizing: border-box; | ||
|
||
background-color: $container-color; | ||
|
||
font-family: 'Lato', sans-serif; | ||
font-size: $font30; | ||
line-height: $font30; | ||
font-weight: 300; | ||
text-transform: lowercase; | ||
|
||
margin: 0; | ||
padding: 0.8em 0.4em 0; | ||
outline: 0; | ||
|
||
@media screen and (max-width: $small) { | ||
font-size: $font20; | ||
line-height: $font20; | ||
} | ||
|
||
&.small { | ||
font-size: $font20; | ||
line-height: $font20; | ||
} | ||
|
||
.if { | ||
color: $header-text-color; | ||
} | ||
|
||
.me { | ||
display: inline-block; | ||
border-bottom: 0.05em solid $highlight-text-color; | ||
border-top: 0.05em solid $highlight-text-color; | ||
color: $highlight-text-color; | ||
margin: 0 0 0 0.3em; | ||
padding: 0 0 0.25em; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@import "../../../../../app/assets/stylesheets/base/_breakpoints.scss"; | ||
@import "../../../../../app/assets/stylesheets/base/_colors.scss"; | ||
@import "../../../../../app/assets/stylesheets/base/_fonts.scss"; | ||
@import "../../../../../app/assets/stylesheets/base/_values.scss"; | ||
|
||
:global(.link) { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters