mirror of
https://github.com/Floriansylvain/portfolio.git
synced 2026-08-19 11:43:20 +02:00
⚡️ Added lazy loading for css
This commit is contained in:
@@ -5,7 +5,9 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<noscript>
|
||||||
<link rel="stylesheet" type="text/css" href="stylesheet.css">
|
<link rel="stylesheet" type="text/css" href="stylesheet.css">
|
||||||
|
</noscript>
|
||||||
|
|
||||||
<title>Florian Sylvain</title>
|
<title>Florian Sylvain</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -17,6 +17,17 @@ const projectsIDs = Array.from(projectsContentList)
|
|||||||
|
|
||||||
let lastScrollTop = window.pageYOffset;
|
let lastScrollTop = window.pageYOffset;
|
||||||
|
|
||||||
|
function loadCSS() {
|
||||||
|
"use strict";
|
||||||
|
const stylesheet = document.createElement('link');
|
||||||
|
stylesheet.href = 'stylesheet.css';
|
||||||
|
stylesheet.rel = 'stylesheet';
|
||||||
|
stylesheet.type = 'text/css';
|
||||||
|
document.querySelector('head').appendChild(stylesheet);
|
||||||
|
}
|
||||||
|
|
||||||
|
loadCSS();
|
||||||
|
|
||||||
function toAddClass(toClass, inClass) {
|
function toAddClass(toClass, inClass) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user