Added webp images for faster home load

This commit is contained in:
vjrj 2018-05-08 11:12:48 +02:00
parent 6e82e2813b
commit b4afa820ab
29 changed files with 309 additions and 88 deletions

View file

@ -1,6 +1,8 @@
/* global */
import React from 'react';
import { render } from 'react-dom';
import { Meteor } from 'meteor/meteor';
import '/imports/startup/client/modernizr';
import App from '../../ui/layouts/App/App';
import '../../ui/stylesheets/app.scss';
@ -9,4 +11,9 @@ import '../../ui/stylesheets/app.scss';
const isIE9OrBelow = () => /MSIE\s/.test(navigator.userAgent) && parseFloat(navigator.appVersion.split('MSIE')[1]) < 10;
if (isIE9OrBelow()) window.alert('You are using an outdated browser. Please use Chrome or Firefox to display this site.');
else Meteor.startup(() => render(<App />, document.getElementById('react-root')));
else {
Modernizr.on('webp', (result) => {
if (Meteor.isDevelopment) console.log(`webp ${result ? '' : 'not '}supported`);
});
Meteor.startup(() => render(<App />, document.getElementById('react-root')));
}

File diff suppressed because one or more lines are too long