mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 06:49:18 +01:00
Added vendor prefixes
This commit is contained in:
parent
cddc26d082
commit
b8fb3c75ee
@ -1,11 +1,15 @@
|
|||||||
var rucksack = require('rucksack-css')
|
var rucksack = require('rucksack-css')
|
||||||
|
var autoprefixer = require('autoprefixer')
|
||||||
var lost = require("lost")
|
var lost = require("lost")
|
||||||
|
|
||||||
exports.modifyWebpackConfig = function(config, env) {
|
exports.modifyWebpackConfig = function(config, env) {
|
||||||
config.merge({
|
config.merge({
|
||||||
postcss: [
|
postcss: [
|
||||||
lost(),
|
lost(),
|
||||||
rucksack()
|
rucksack(),
|
||||||
|
autoprefixer({
|
||||||
|
browsers: ['>1%', 'ie >= 10', 'safari >= 6', 'last 3 versions']
|
||||||
|
})
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
19
html.js
19
html.js
@ -12,20 +12,7 @@ module.exports = React.createClass({
|
|||||||
render() {
|
render() {
|
||||||
const {body, route} = this.props
|
const {body, route} = this.props
|
||||||
const title = DocumentTitle.rewind()
|
const title = DocumentTitle.rewind()
|
||||||
|
const font = <link href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,700&subset=latin,cyrillic' rel='stylesheet' type='text/css' />
|
||||||
const font = `
|
|
||||||
WebFontConfig = {
|
|
||||||
google: { families: [ 'Roboto:400,500,700:latin,cyrillic' ] }
|
|
||||||
};
|
|
||||||
(function() {
|
|
||||||
var wf = document.createElement('script');
|
|
||||||
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
|
|
||||||
wf.type = 'text/javascript';
|
|
||||||
wf.async = 'true';
|
|
||||||
var s = document.getElementsByTagName('script')[0];
|
|
||||||
s.parentNode.insertBefore(wf, s);
|
|
||||||
})();
|
|
||||||
`
|
|
||||||
let css
|
let css
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
css = <style dangerouslySetInnerHTML={ { __html: require('!raw!postcss!./public/styles.css')} } />
|
css = <style dangerouslySetInnerHTML={ { __html: require('!raw!postcss!./public/styles.css')} } />
|
||||||
@ -40,11 +27,11 @@ module.exports = React.createClass({
|
|||||||
<title>
|
<title>
|
||||||
{ title }
|
{ title }
|
||||||
</title>
|
</title>
|
||||||
|
{ font }
|
||||||
|
{ css }
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="react-mount" dangerouslySetInnerHTML={ { __html: this.props.body} } />
|
<div id="react-mount" dangerouslySetInnerHTML={ { __html: this.props.body} } />
|
||||||
<script dangerouslySetInnerHTML={ { __html: font} } />
|
|
||||||
{ css }
|
|
||||||
<script src={ prefixLink(`/bundle.js?t=${BUILD_TIME}`) } />
|
<script src={ prefixLink(`/bundle.js?t=${BUILD_TIME}`) } />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user