Added webp images for faster home load
This commit is contained in:
parent
6e82e2813b
commit
b4afa820ab
29 changed files with 309 additions and 88 deletions
|
|
@ -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')));
|
||||
}
|
||||
|
|
|
|||
3
imports/startup/client/modernizr.js
Normal file
3
imports/startup/client/modernizr.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue