This file contains hidden or 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
| import React, { PropTypes } from 'react'; | |
| import { StyleSheet, css } from 'aphrodite/no-important'; | |
| import { tagMapping, fontSize, fontWeight, lineHeight } from '../styles/base/typography'; |
This file contains hidden or 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
| export const styles = StyleSheet.create({ | |
| displayLarge: { | |
| fontSize: fontSize.displayLarge, | |
| fontWeight: fontWeight.bold, | |
| lineHeight: lineHeight.displayLarge, | |
| }, | |
| ... | |
| }); |
This file contains hidden or 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
| ... | |
| export const tagMapping = { | |
| h1: 'displayLarge', | |
| h2: 'displayMedium', | |
| h3: 'displaySmall', | |
| h4: 'heading', | |
| h5: 'subheading', | |
| }; |
This file contains hidden or 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
| import React, { PropTypes } from 'react'; | |
| import { StyleSheet, css } from 'aphrodite/no-important'; | |
| import { tagMapping, fontSize, fontWeight, lineHeight } from '../styles/base/typography'; | |
| function Heading(props) { | |
| const { children, tag: Tag } = props; | |
| return <Tag className={css(styles[tagMapping[Tag]])}>{children}</Tag>; | |
| } | |
| export default Heading; |
This file contains hidden or 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
| export const fontSize = { | |
| // heading | |
| displayLarge: '32px', | |
| displayMedium: '26px', | |
| displaySmall: '20px', | |
| heading: '18px', | |
| subheading: '16px', | |
| // body | |
| body: '17px', |
This file contains hidden or 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
| var express = require('express'); | |
| var path = require('path'); | |
| var bodyParser = require('body-parser'); | |
| var subscribe = require('./subscribe'); | |
| var app = new express(); | |
| var port = 8000; | |
| // middleware |
This file contains hidden or 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
| var nodemailer = require('nodemailer'); | |
| const subscribe = { | |
| send: function(name, service) { | |
| const transporter = nodemailer.createTransport({ | |
| service: 'Gmail', | |
| auth: { | |
| user: 'your gmail username', | |
| pass: 'your gmail password' | |
| }, |