Skip to content
This repository was archived by the owner on Nov 2, 2021. It is now read-only.

Commit d8f0131

Browse files
Juliette PretotJ
authored andcommitted
defer greeting scripts
1 parent 7ad6fcb commit d8f0131

File tree

1 file changed

+74
-74
lines changed

1 file changed

+74
-74
lines changed

src/html.tsx

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const GREETING = `/*
5151
5252
*/`
5353

54-
const CONSOLE_GREETING = "console.log('🟥🟥🟥🟥🟥🟥🟥\n🟧🟧🟧🟧🟧🟧🟧\n⬜️⬜️⬜️⬜️⬜️⬜️⬜️\n🌸🌸🌸🌸🌸🌸🌸\n🟪🟪🟪🟪🟪🟪🟪')"
54+
const CONSOLE_GREETING = "console.log('🟥🟥🟥🟥🟥🟥🟥\\n🟧🟧🟧🟧🟧🟧🟧\\n⬜️⬜️⬜️⬜️⬜️⬜️⬜️\\n🌸🌸🌸🌸🌸🌸🌸\\n🟪🟪🟪🟪🟪🟪🟪')"
5555

5656
const HTML: React.FunctionComponent<{
5757
htmlAttributes: any
@@ -68,78 +68,78 @@ const HTML: React.FunctionComponent<{
6868
bodyAttributes,
6969
postBodyComponents
7070
}) => (
71-
<html lang="en" {...htmlAttributes}>
72-
<head>
73-
<meta charSet="utf-8" />
74-
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
75-
<title>Juliette Pretot</title>
76-
<meta
77-
name="description"
78-
content="Creative, ambitious, and enterprising software engineer"
79-
/>
80-
<meta
81-
name="viewport"
82-
content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
83-
/>
84-
<link
85-
rel="preload"
86-
href={FONTS.regular}
87-
as="font"
88-
type="font/woff2"
89-
crossOrigin="anonymous"
90-
/>
91-
<link
92-
rel="preload"
93-
href={FONTS.bold}
94-
as="font"
95-
type="font/woff2"
96-
crossOrigin="anonymous"
97-
/>
98-
<link
99-
rel="preload"
100-
href={FONTS.sans}
101-
as="font"
102-
type="font/woff2"
103-
crossOrigin="anonymous"
104-
/>
105-
<meta name="theme-color" content="#101722" />
106-
<link rel="manifest" href="/manifest.json" />
107-
<meta name="apple-mobile-web-app-capable" content="yes" />
108-
<meta
109-
name="apple-mobile-web-app-status-bar-style"
110-
content="black-translucent"
111-
/>
112-
<link
113-
rel="apple-touch-icon"
114-
sizes="180x180"
115-
href="/favicons/apple-touch-icon-180x180.png"
116-
/>
117-
<link
118-
rel="icon"
119-
type="image/png"
120-
sizes="32x32"
121-
href="/favicons/favicon-32x32.png"
122-
/>
123-
<link rel="shortcut icon" href="/favicons/favicon.ico" />
124-
<style
125-
dangerouslySetInnerHTML={{
126-
__html: WEBFONTS
127-
}}
128-
/>
129-
<script
130-
dangerouslySetInnerHTML={{
131-
__html: GREETING
132-
}}
133-
/>
134-
{headComponents}
135-
</head>
136-
<body {...bodyAttributes}>
137-
{preBodyComponents}
138-
<div id="___gatsby" dangerouslySetInnerHTML={{ __html: body }} />
139-
{postBodyComponents}
140-
</body>
141-
<script dangerouslySetInnerHTML={{ __html: CONSOLE_GREETING }} />
142-
</html>
143-
)
71+
<html lang="en" {...htmlAttributes}>
72+
<head>
73+
<meta charSet="utf-8" />
74+
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
75+
<title>Juliette Pretot</title>
76+
<meta
77+
name="description"
78+
content="Creative, ambitious, and enterprising software engineer"
79+
/>
80+
<meta
81+
name="viewport"
82+
content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
83+
/>
84+
<link
85+
rel="preload"
86+
href={FONTS.regular}
87+
as="font"
88+
type="font/woff2"
89+
crossOrigin="anonymous"
90+
/>
91+
<link
92+
rel="preload"
93+
href={FONTS.bold}
94+
as="font"
95+
type="font/woff2"
96+
crossOrigin="anonymous"
97+
/>
98+
<link
99+
rel="preload"
100+
href={FONTS.sans}
101+
as="font"
102+
type="font/woff2"
103+
crossOrigin="anonymous"
104+
/>
105+
<meta name="theme-color" content="#101722" />
106+
<link rel="manifest" href="/manifest.json" />
107+
<meta name="apple-mobile-web-app-capable" content="yes" />
108+
<meta
109+
name="apple-mobile-web-app-status-bar-style"
110+
content="black-translucent"
111+
/>
112+
<link
113+
rel="apple-touch-icon"
114+
sizes="180x180"
115+
href="/favicons/apple-touch-icon-180x180.png"
116+
/>
117+
<link
118+
rel="icon"
119+
type="image/png"
120+
sizes="32x32"
121+
href="/favicons/favicon-32x32.png"
122+
/>
123+
<link rel="shortcut icon" href="/favicons/favicon.ico" />
124+
<style
125+
dangerouslySetInnerHTML={{
126+
__html: WEBFONTS
127+
}}
128+
/>
129+
<script defer
130+
dangerouslySetInnerHTML={{
131+
__html: GREETING
132+
}}
133+
/>
134+
{headComponents}
135+
</head>
136+
<body {...bodyAttributes}>
137+
{preBodyComponents}
138+
<div id="___gatsby" dangerouslySetInnerHTML={{ __html: body }} />
139+
{postBodyComponents}
140+
</body>
141+
<script defer dangerouslySetInnerHTML={{ __html: CONSOLE_GREETING }} />
142+
</html>
143+
)
144144

145145
export default HTML

0 commit comments

Comments
 (0)