Skip to content

Commit be28d83

Browse files
committed
Improve website
1 parent dde7617 commit be28d83

File tree

5 files changed

+89
-70
lines changed

5 files changed

+89
-70
lines changed

website/docusaurus.config.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
title: 'GraphQL Inspector',
33
tagline:
4-
'Compare schemas, validate documents, find breaking changes, find similar types, schema coverage',
4+
'Validate schemas, detect changes, receive schema change notifications on Slack and Discord. Validate documents, find similar types, get schema coverage.',
55

66
url: 'https://graphql-inspector.com',
77
baseUrl: '/',
@@ -159,16 +159,14 @@ module.exports = {
159159
scripts: [
160160
{
161161
src: '/js/scroll-to.js',
162-
async: true,
163-
defer: true,
164162
},
165163
{
166164
src: '/js/drift.js',
167-
async: true,
168-
defer: true,
169165
},
170166
],
171-
stylesheets: ['https://fonts.googleapis.com/css?family=Lato:300,400,700,900'],
167+
stylesheets: [
168+
'https://fonts.googleapis.com/css?family=Lato:300,400,700,900&display=swap',
169+
],
172170
presets: [
173171
[
174172
'@docusaurus/preset-classic',
@@ -191,4 +189,15 @@ module.exports = {
191189
},
192190
],
193191
],
192+
plugins: [
193+
[
194+
'@docusaurus/plugin-ideal-image',
195+
{
196+
size: 800,
197+
max: 800,
198+
min: 200,
199+
quality: 100,
200+
},
201+
],
202+
],
194203
};

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"dependencies": {
1111
"@docusaurus/core": "2.0.0-alpha.50",
1212
"@docusaurus/preset-classic": "2.0.0-alpha.50",
13+
"@docusaurus/plugin-ideal-image": "2.0.0-alpha.50",
1314
"@graphql-inspector/core": "1.30.4",
1415
"classnames": "2.2.6",
1516
"fetch-ponyfill": "6.1.0",

website/src/pages/index.js

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from '@docusaurus/Link';
33
import Head from '@docusaurus/Head';
44
import BrowserOnly from '@docusaurus/BrowserOnly';
55
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
6+
import Image from '@theme/IdealImage';
67
import Footer from '@theme/Footer';
78
import ContactForm from '../components/contact';
89
import {Loading} from '../components/loading';
@@ -108,25 +109,15 @@ const Header = () => {
108109
<span>Bulletproof</span> your GraphQL API
109110
</h1>
110111
<h2>
111-
Detects every change, finds similar or duplicated types, validates
112-
documents against a schema and looks for deprecated usage.
112+
Validate schemas and detect changes. Receive schema change notifications. Keep
113+
Operations and Fragments consistent.
113114
</h2>
114115
<Link to="/docs">Start to Inspect</Link>
115116
</div>
116117
</div>
117118
);
118119
};
119120

120-
const Hightlight = (props) => {
121-
return (
122-
<div className="highlight">
123-
<img src={props.image} alt={props.title} />
124-
<div className="title">{props.title}</div>
125-
<div className="description">{props.description}</div>
126-
</div>
127-
);
128-
};
129-
130121
function Index() {
131122
const context = useDocusaurusContext();
132123
const {siteConfig = {}} = context;
@@ -211,9 +202,10 @@ function Index() {
211202

212203
<Feature
213204
img={
214-
<img
215-
src="/img/ui/features/annotations.png"
205+
<Image
206+
img={require('../../static/img/ui/features/annotations.png')}
216207
alt="Annotations"
208+
loading="lazy"
217209
/>
218210
}
219211
title="In-Code Annotations"
@@ -234,7 +226,11 @@ function Index() {
234226
<Feature
235227
reversed={true}
236228
img={
237-
<img src="/img/ui/features/notifications.png" alt="Notifications" />
229+
<Image
230+
img={require('../../static/img/ui/features/notifications.png')}
231+
alt="Notifications"
232+
loading="lazy"
233+
/>
238234
}
239235
title="Notifications"
240236
text={
@@ -250,7 +246,13 @@ function Index() {
250246
/>
251247

252248
<Feature
253-
img={<img src="/img/ui/features/schema-check.png" alt="Schema Check" />}
249+
img={
250+
<Image
251+
img={require('../../static/img/ui/features/schema-check.png')}
252+
alt="Schema Validation"
253+
loading="lazy"
254+
/>
255+
}
254256
title="Detect Changes"
255257
text={
256258
<>
@@ -268,7 +270,12 @@ function Index() {
268270

269271
<Feature
270272
reversed={true}
271-
img={<img src="/img/ui/features/intercept.svg" alt="Intercept changes via HTTP" />}
273+
img={
274+
<Image
275+
img={require('../../static/img/ui/features/intercept.png')}
276+
alt="Intercept changes via HTTP"
277+
loading="lazy"
278+
/>}
272279
title="Intercept via HTTP"
273280
text={
274281
<>
63.8 KB
Loading

website/static/js/drift.js

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
11
'use strict';
22

3-
!(function() {
4-
var t = (window.driftt = window.drift = window.driftt || []);
5-
if (!t.init) {
6-
if (t.invoked)
7-
return void (
8-
window.console &&
9-
console.error &&
10-
console.error('Drift snippet included twice.')
11-
);
12-
(t.invoked = !0),
13-
(t.methods = [
14-
'identify',
15-
'config',
16-
'track',
17-
'reset',
18-
'debug',
19-
'show',
20-
'ping',
21-
'page',
22-
'hide',
23-
'off',
24-
'on',
25-
]),
26-
(t.factory = function(e) {
27-
return function() {
28-
var n = Array.prototype.slice.call(arguments);
29-
return n.unshift(e), t.push(n), t;
30-
};
31-
}),
32-
t.methods.forEach(function(e) {
33-
t[e] = t.factory(e);
34-
}),
35-
(t.load = function(t) {
36-
var e = 3e5,
37-
n = Math.ceil(new Date() / e) * e,
38-
o = document.createElement('script');
39-
(o.type = 'text/javascript'),
40-
(o.async = !0),
41-
(o.crossorigin = 'anonymous'),
42-
(o.src = 'https://js.driftt.com/include/' + n + '/' + t + '.js');
43-
var i = document.getElementsByTagName('script')[0];
44-
i.parentNode.insertBefore(o, i);
45-
});
46-
}
47-
})();
48-
drift.SNIPPET_VERSION = '0.3.1';
49-
drift.load('w2kysd78n3g2');
3+
window.addEventListener('load', () => {
4+
!(function () {
5+
const t = (window.driftt = window.drift = window.driftt || []);
6+
if (!t.init) {
7+
if (t.invoked)
8+
return void (
9+
window.console &&
10+
console.error &&
11+
console.error('Drift snippet included twice.')
12+
);
13+
(t.invoked = !0),
14+
(t.methods = [
15+
'identify',
16+
'config',
17+
'track',
18+
'reset',
19+
'debug',
20+
'show',
21+
'ping',
22+
'page',
23+
'hide',
24+
'off',
25+
'on',
26+
]),
27+
(t.factory = function (e) {
28+
return function () {
29+
var n = Array.prototype.slice.call(arguments);
30+
return n.unshift(e), t.push(n), t;
31+
};
32+
}),
33+
t.methods.forEach(function (e) {
34+
t[e] = t.factory(e);
35+
}),
36+
(t.load = function (t) {
37+
var e = 3e5,
38+
n = Math.ceil(new Date() / e) * e,
39+
o = document.createElement('script');
40+
(o.type = 'text/javascript'),
41+
(o.async = !0),
42+
(o.crossorigin = 'anonymous'),
43+
(o.src = 'https://js.driftt.com/include/' + n + '/' + t + '.js');
44+
var i = document.getElementsByTagName('script')[0];
45+
i.parentNode.insertBefore(o, i);
46+
});
47+
}
48+
})();
49+
drift.SNIPPET_VERSION = '0.3.1';
50+
drift.load('w2kysd78n3g2');
51+
});

0 commit comments

Comments
 (0)