Skip to content
Permalink
Browse files

Deferring css, downloaded google fonts

  • Loading branch information...
puremana committed Mar 16, 2019
1 parent 0e4b130 commit 443521760632ae437fc3e773ff52e630b1c81619
Showing with 32 additions and 4 deletions.
  1. +18 −2 public/index.html
  2. +14 −2 src/App.css
@@ -9,8 +9,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">

<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png">

@@ -30,5 +28,23 @@
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>

<!-- Deferred CSS -->
<noscript id="deferred-styles">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<script defer>
var loadDeferredStyles = function() {
var addStylesNode = document.getElementById("deferred-styles");
var replacement = document.createElement("div");
replacement.innerHTML = addStylesNode.textContent;
document.body.appendChild(replacement)
addStylesNode.parentElement.removeChild(addStylesNode);
};
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (raf) raf(function() { window.setTimeout(loadDeferredStyles, 0); });
else window.addEventListener('load', loadDeferredStyles);
</script>
</body>
</html>
@@ -2,9 +2,22 @@
* {
margin: 0px;
padding: 0px;
font-family: 'Open Sans', sans-serif;
font-family: 'Open Sans', 'Trebuchet MS', Helvetica, sans-serif;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-display: swap;
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVZ0e.ttf) format('truetype');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-display: swap;
font-weight: 600;
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UNirkOUuhs.ttf) format('truetype');
}
a {
color: rgb(0, 110, 255);
text-decoration: inherit;
@@ -71,7 +84,6 @@ li:hover {
width: 100%;
height: 100%;
border-radius: 300px;
/* background: url("images/profile.png"); */
background-size: cover;
vertical-align: top;
}

0 comments on commit 4435217

Please sign in to comment.
You can’t perform that action at this time.