Skip to content

Commit

Permalink
Merge pull request #1002 from cvan/cherrypick-font-fixes-for-examples…
Browse files Browse the repository at this point in the history
…-index-page

defer loading of web font on Examples
  • Loading branch information
ngokevin committed Feb 19, 2016
2 parents 6a812d6 + ac99ae1 commit c88fac4
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<title>A-Frame Examples</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://cvan.io/Fira/fira.css">
<style type="text/css">

html {
font: normal 500 1.2em/1em 'Fira Mono', sans-serif;
}
Expand Down Expand Up @@ -63,7 +61,7 @@
color: white;
border-bottom: 1px solid rgba(255,255,255,0.2);
display: block;
font-family: 'Fira Sans';
font-family: 'Fira Sans', sans-serif;
font-size: 1rem;
font-weight: 300;
letter-spacing: 0.01em;
Expand Down Expand Up @@ -189,5 +187,22 @@ <h2>Tests</h2>

<img src="_images/logo-mozilla-white.svg" id="logo-moz" alt="Mozilla">

<script>
(function () {
window.requestAnimationFrame(function () {
// Defer loading of web fonts.
var fonts = [
'https://code.cdn.mozilla.net/fonts/fira.css'
];
var link;
fonts.forEach(function (url) {
link = document.createElement('link');
link.rel = 'stylesheet';
link.href = url;
document.head.appendChild(link);
});
});
})();
</script>
</body>
</html>

0 comments on commit c88fac4

Please sign in to comment.