aboutsummaryrefslogtreecommitdiffstats
path: root/assets/js/loads.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/loads.js')
-rw-r--r--assets/js/loads.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/assets/js/loads.js b/assets/js/loads.js
index 71e0173..c8a03a7 100644
--- a/assets/js/loads.js
+++ b/assets/js/loads.js
@@ -1,4 +1,4 @@
-function load_js(url) {
+function load_css(url) {
let link = document.createElement("link");
link.rel = "stylesheet";
link.type = "text/css";
@@ -9,6 +9,16 @@ function load_js(url) {
addEventListener("load", function () {
if (document.querySelector(".highlight .chroma")) {
- load_js("/css/syntax.css");
+ load_css("/css/syntax.css");
}
+
+ if (document.querySelector(".ai")) {
+ load_css(
+ "https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css",
+ );
+ }
+ if (document.querySelectorAll(".fa,.fab,.fas,.far"))
+ load_css(
+ "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css",
+ );
});