web2019/templates/page-place-order.html
Egor Savkin 3ccbd41ef2 Fix and optimize shop styles and remove jquery
Reduce bootstrap bundle, replace jquery dependant code and remove jquery. Optimize style loading.
Overall the lighthouse metrics are far better now.

Signed-off-by: Egor Savkin <es@m-labs.hk>
2025-01-23 16:04:31 +08:00

59 lines
1.5 KiB
HTML

{% extends 'section.html' %}
{% block 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) }}">
<link rel="stylesheet" href="{{ get_url(path='css/order-hardware.css', cachebust=true) }}">
{% endblock %}
{% block hero %}{% endblock %}
{% block main %}
<main id="root-shop"></main>
{% endblock %}
{% block footer %}{% endblock %}
{% block js %}
<script>
(function () {
function deviceIsMobile() {
// Do not rely on User-Agent: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
// Be in sync with css/order-hardware.css
return window.innerWidth < 768;
}
function isTouchEnabled() {
return ('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0);
}
window.deviceIsMobile = deviceIsMobile;
window.isTouchEnabled = isTouchEnabled;
})();
</script>
<!-- Load Data -->
<script src="{{ get_url(path='js/shop_data.js', cachebust=true) }}"></script>
<script>
window.DOMAIN = "{{get_env(name="DOMAINNAME", default="m-labs.hk")}}";
window.API_RFQ = `https://hooks.${window.DOMAIN}/rfq`;
</script>
<!-- Load our React component. -->
<!-- <script type="text/babel" src="{{ get_url(path='js/shop.jsx', cachebust=true) }}"></script> -->
<script src="{{ get_url(path='js/shop.bundle.js', cachebust=true) }}"></script>
{% endblock %}