|
84 | 84 |
|
85 | 85 | <!-- Feeds and Sitemap --> |
86 | 86 | <link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" /> |
87 | | - <link rel="alternate" type="application/rss+xml" title="Latest Tips" href="/feed.rss" /> |
88 | | - <!-- Fonts and External CSS --> |
| 87 | + <link rel="alternate" type="application/rss+xml" title="Latest Tips" href="/feed.rss" /> <!-- Fonts and External CSS --> |
89 | 88 | <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@800&display=swap" rel="stylesheet" /> |
90 | | - <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> |
91 | | - < link rel= "stylesheet" href= "https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" /> |
92 | | - <link id="prism-theme" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" /> <!-- Site CSS --> |
| 89 | + |
| 90 | + <!-- Preload critical CSS for faster loading --> |
| 91 | + <link rel="preload" href="~/lib/bootstrap/dist/css/bootstrap.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> |
| 92 | + <noscript><link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css"></noscript> |
| 93 | + |
| 94 | + < link rel= "preload" href= "https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" as= "style" onload= "this.onload=null;this.rel='stylesheet'"> |
| 95 | + < noscript>< link rel= "stylesheet" href= "https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"></ noscript> |
| 96 | + |
| 97 | + <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> |
| 98 | + <noscript><link id="prism-theme" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"></noscript> |
| 99 | + |
| 100 | + <!-- Site CSS --> |
93 | 101 | <environment exclude="Development"> |
94 | 102 | <link rel="stylesheet" href="~/css/bundle.min.css" asp-append-version="true" /> |
95 | 103 | </environment> |
|
230 | 238 | } |
231 | 239 | } |
232 | 240 | }); |
233 | | - }); |
| 241 | + }); </script> |
| 242 | + |
| 243 | + <!-- CSS loading polyfill for better browser support --> |
| 244 | + <script> |
| 245 | + /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ |
| 246 | + (function(w){ |
| 247 | + "use strict"; |
| 248 | + if(!w.loadCSS){ |
| 249 | + w.loadCSS = function(){}; |
| 250 | + } |
| 251 | + var rp = loadCSS.relpreload = {}; |
| 252 | + rp.support = (function(){ |
| 253 | + var ret; |
| 254 | + try { |
| 255 | + ret = w.document.createElement("link").relList.supports("preload"); |
| 256 | + } catch (e) { |
| 257 | + ret = false; |
| 258 | + } |
| 259 | + return function(){ |
| 260 | + return ret; |
| 261 | + }; |
| 262 | + })(); |
| 263 | + rp.bindMediaToggle = function(link){ |
| 264 | + var finalMedia = link.media || "all"; |
| 265 | + function enableStylesheet(){ |
| 266 | + if(link.addEventListener){ |
| 267 | + link.removeEventListener("load", enableStylesheet); |
| 268 | + } |
| 269 | + link.media = finalMedia; |
| 270 | + } |
| 271 | + if(link.addEventListener){ |
| 272 | + link.addEventListener("load", enableStylesheet); |
| 273 | + } |
| 274 | + link.onloadcssdefined = enableStylesheet; |
| 275 | + }; |
| 276 | + rp.poly = function(){ |
| 277 | + if(rp.support()){ |
| 278 | + return; |
| 279 | + } |
| 280 | + var links = w.document.getElementsByTagName("link"); |
| 281 | + for(var i = 0; i < links.length; i++){ |
| 282 | + var link = links[i]; |
| 283 | + if(link.rel === "preload" && link.getAttribute("as") === "style" && !link.getAttribute("data-loadcss")){ |
| 284 | + link.setAttribute("data-loadcss", true); |
| 285 | + rp.bindMediaToggle(link); |
| 286 | + } |
| 287 | + } |
| 288 | + }; |
| 289 | + if(!rp.support()){ |
| 290 | + rp.poly(); |
| 291 | + var run = w.setInterval(rp.poly, 500); |
| 292 | + if(w.addEventListener){ |
| 293 | + w.addEventListener("load", function(){ |
| 294 | + rp.poly(); |
| 295 | + w.clearInterval(run); |
| 296 | + }); |
| 297 | + } |
| 298 | + } |
| 299 | + })(this); |
234 | 300 | </script> |
235 | 301 |
|
236 | 302 | @await RenderSectionAsync("Scripts", required: false) |
|
0 commit comments