SEO optimizations and fixes #163

Merged
sb10q merged 7 commits from esavkin/web2019:161-seo into master 2025-01-23 22:23:32 +08:00
3 changed files with 10 additions and 21 deletions
Showing only changes of commit 037cadbe6d - Show all commits

View File

@ -42,6 +42,11 @@
<link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="shortcut icon" type="image/x-icon">
<link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="{{ get_url(path='css/bootstrap-5.3.0.min.css', cachebust=true) }}" as="style">
<link rel="stylesheet" href="{{ get_url(path='css/styles.css', cachebust=true) }}" as="style">
{% block links %}{% endblock %}
{% block styles %}{% endblock %}
</head>
@ -126,25 +131,6 @@
{% endblock %}
<!-- ./MAIN CONTENT -->
<noscript id="deferred-main-styles">
<link rel="stylesheet" href="{{ get_url(path='css/bootstrap-5.3.0.min.css', cachebust=true) }}">
<link rel="stylesheet" href="{{ get_url(path='css/styles.css', cachebust=true) }}">
{% block deferred_styles %}{% endblock %}
</noscript>
<script>
var loadDeferredMainStyles = function() {
var addStylesNode = document.getElementById("deferred-main-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(loadDeferredMainStyles, 0); });
else window.addEventListener('load', loadDeferredMainStyles);
</script>
<!-- FOOTER -->
{% block footer %}
@ -186,7 +172,7 @@
<!-- <script src="{{ get_url(path='js/as.js', cachebust=true) }}"></script> -->
<script src="{{ get_url(path='js/jquery-3.7.0.min.js', cachebust=true) }}"></script>
<script src="{{ get_url(path='js/bootstrap-5.3.0.bundle.min.js', cachebust=true) }}"></script>
<script src="{{ get_url(path='js/bootstrap-5.3.0.bundle.min.js', cachebust=true) }}" defer></script>
<script>

View File

@ -1,5 +1,8 @@
{% extends '_base.html' %}
{% block links %}
<link rel="preload" href="images/hero@2x.png" as="image" >
{% endblock %}
{% block hero %}

View File

@ -1,7 +1,7 @@
{% extends 'section.html' %}
{% block deferred_styles %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ get_url(path='css/order-hardware.css', cachebust=true) }}">
{% endblock %}