Skip to content

Commit

Permalink
change the way we include Typekit to avoid unexpected error. See anti…
Browse files Browse the repository at this point in the history
  • Loading branch information
gido committed Sep 23, 2020
1 parent aafa336 commit 155130a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ EHNV Styleguide.

First of all, you need to have the following tools installed globally on your environment:

* node
* node v9
* yarn
* gulp

## Typography
The fonts `Proxima` is currently served by Typekit's Antistatique account.

Don't forget to include the fonts:


```html
<link rel="stylesheet" href="https://use.typekit.net/xld7vod.css">
```

## Install

````shell
Expand Down
2 changes: 0 additions & 2 deletions assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
@import 'helpers';
@import 'webform';

@import url("https://use.typekit.net/xld7vod.css");

// atoms:
@import 'atoms/portraits';
@import 'atoms/contact-infos';
Expand Down
12 changes: 1 addition & 11 deletions assets/templates/views/layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,7 @@
{{/if}}
<link rel="stylesheet" href="{{#if fabricator}}./{{else}}./../{{/if}}build/css/vendors.min.css">
<link rel="stylesheet" href="{{#if fabricator}}./{{else}}./../{{/if}}build/css/main.css">

<script>
(function(d) {
var config = {
kitId: 'xld7vod',
scriptTimeout: 3000,
async: true
},
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
})(document);
</script>
<link rel="stylesheet" href="https://use.typekit.net/xld7vod.css">

<!--[if lt IE 9]>
<script src="{{#if fabricator}}./{{else}}./../{{/if}}build/js/polyfills.min.js"></script>
Expand Down

0 comments on commit 155130a

Please sign in to comment.