Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 78e3002

Browse files
committed
Moved slow stuff to window.load event 🚀
1 parent 50b2354 commit 78e3002

25 files changed

+710
-386
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log
22
All changes to Chicio coding will be documented in this file.
33

4+
## [1.11.0](https://github.com/chicio/chicio.github.io/releases/tag/1.11.0)
5+
Release date: 2019-05-12.
6+
7+
#### Added
8+
9+
- moved scene3d home animation and cookie consent to the window.load event
10+
411
## [1.10.0](https://github.com/chicio/chicio.github.io/releases/tag/1.10.0)
512
Release date: 2019-05-11.
613

_includes/cookieconsent-style.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_includes/critical.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_includes/dependencies-js-blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
</script>
1717
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_SVG"></script>
1818
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
19-
<script type="text/javascript" src="/assets/js/index.blog.min.js?rev=4cf7c24ac2d16dffc40892b910ef3743"></script>
19+
<script type="text/javascript" src="/assets/js/index.blog.min.js?rev=6761317c421166a2ffbbb0ce8143149d"></script>
2020
{%include service-worker.html %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
2-
<script type="text/javascript" src="/assets/js/index.home.min.js?rev=e190a19e359e446cffc462672ea01b90"></script>
2+
<script type="text/javascript" src="/assets/js/index.home.min.js?rev=49ecb6ed0ea35d65f40e68c2e1fae317"></script>
33
{%include service-worker.html %}

_includes/head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
{% include icons.html %}
1313
{% include analytics.html %}
1414
<style type="text/css">{% include {{ include.critical-css }} %}</style>
15+
<style type="text/css">{% include cookieconsent-style.css %}</style>
1516
{% seo %}
1617
{% if include.content-type %}
1718
<meta property="og:type" content="{{ include.content-type }}"/>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"/assets/js/index.blog.min.js?rev=4cf7c24ac2d16dffc40892b910ef3743",
1+
"/assets/js/index.blog.min.js?rev=6761317c421166a2ffbbb0ce8143149d",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"/assets/js/index.home.min.js?rev=e190a19e359e446cffc462672ea01b90",
1+
"/assets/js/index.home.min.js?rev=49ecb6ed0ea35d65f40e68c2e1fae317",

_includes/style.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<noscript id="deferred-styles">
2-
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
32
{% include {{ include.styleInclude }} %}
43
</noscript>
54
<script>

_js/common/cookie-consent.js

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
/* @flow */
22
const cookieConsent = (): void => {
3-
window.addEventListener('load', () => {
4-
window.cookieconsent.initialise({
5-
'palette': {
6-
'popup': {
7-
'background': '#9fa8da',
8-
'text': '#ffffff'
9-
},
10-
'button': {
11-
'background': '#448aff',
12-
'text': '#ffffff'
13-
}
3+
window.cookieconsent.initialise({
4+
palette: {
5+
popup: {
6+
background: '#9fa8da',
7+
text: '#ffffff'
148
},
15-
'theme': 'classic',
16-
'content': {
17-
'dismiss': 'Ok',
18-
'href': window.location.protocol + '//' + window.location.host + '/cookie-policy.html',
19-
'message': 'This website uses cookies to ensure you get the best experience.',
20-
'link': 'Learn more about cookie policy'
9+
button: {
10+
background: '#448aff',
11+
text: '#ffffff'
2112
}
22-
})
13+
},
14+
theme: 'classic',
15+
content: {
16+
dismiss: 'Ok',
17+
href: window.location.protocol + '//' + window.location.host + '/cookie-policy.html',
18+
message: 'This website uses cookies to ensure you get the best experience.',
19+
link: 'Learn more about cookie policy'
20+
}
2321
})
2422
}
2523

0 commit comments

Comments
 (0)