commit 146cce33457fd5d678136ae96a3f65628aa47f36
parent ad6afb03461081e310183ffcaeecbdfbea8c78c7
Author: Alex Balgavy <alex@balgavy.eu>
Date: Sun, 8 Oct 2023 20:26:50 +0200
Lazy load images
Diffstat:
5 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/content/sysarch-notes/Numeric representations of data types/index.md b/content/sysarch-notes/Numeric representations of data types/index.md
@@ -34,6 +34,8 @@ Division is a pain in the ass, exactly the same as decimal long division. Just w
## Floats
+Useful website: [https://float.exposed/](https://float.exposed)
+
float in binary: sign for number, significant bits, signed scale factor exponent for implied base 2
IEEE standard (32 bit floats) — sign bit, 8-bit signed exponent in excess-127, 23-bit mantissa (fractional)
diff --git a/templates/index.html b/templates/index.html
@@ -26,7 +26,7 @@
{% endblock sidebar %}
{% block content %}
-{{ section.content | safe }}
+{{ section.content | replace(from="<img ", to="<img loading=lazy ") | safe }}
<!--
Q29uZ3JhdHMsIHlvdSBmb3VuZCBzb21ldGhpbmcgZXh0cmEuCgpIZXJlIGFyZSBhIGZldyAnbGlmZWhhY2tzJyBmcm9tIG15IDUgeWVhcnMgYXQgdGhlIFZVOgotIEdldCB0aGUgU1BBUiBhcHA6CiAgICAtIHRoZXkgaGF2ZSByZWFsbHkgZ29vZCBkaXNjb3VudHMgZHVyaW5nIHRoZSBkYXkKICAgIC0gWW91IGdldCBhIGZyZWUgY29mZmVlIGV2ZXJ5IHNvIG9mdGVuLgogICAgLSBZb3UgY2FuIGJ1eSAnemVybyB3YXN0ZSBiYWdzJywgd2hpY2ggY29zdCAzIGV1ciBhbmQgY29udGFpbiBzdHVmZiB0aGF0IHdvdWxkIGV4cGlyZSBzb29uLiBJZiB5b3UgcHV0IGl0IGluIHRoZSBmcmlkZ2UsIGl0IGNhbiBsYXN0IHR3byBkYXlzLiBBbmQgdXN1YWxseSB0aGUgc3R1ZmYgaW4gdGhlIGJhZ3Mgd291bGQgY29zdCB5b3UgMTAtMTUgZXVyLgotIERvIHdlbGwgaW4geW91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tIG9uIHRoZSB0aGlyZCBmbG9vciBvZiBXJk4sIHJvb20gbnVtYmVyIE4zMjguIEl0IGhhcyB3aW5kb3dzIHRoYXQgeW91IGNhbiBvcGVuLCBwbGVudHkgb2YgZWxlY3RyaWNpdHkgb3V0bGV0cywgYW5kIG5vdCBtYW55IHBlb3BsZSBrbm93IGFib3V0IGl0LiBJZiB5b3UncmUgcmVhZGluZyB0aGlzLCBwbGVhc2Uga2VlcCBpdCBhIHNlY3JldC4K
diff --git a/templates/page-math.html b/templates/page-math.html
@@ -52,5 +52,5 @@
{% endblock %}
{% block content %}
-{{ page.content | safe }}
+{{ page.content | replace(from="<img ", to="<img loading=lazy ") | safe }}
{% endblock content %}
diff --git a/templates/page.html b/templates/page.html
@@ -35,5 +35,5 @@
{% endblock sidebar %}
{% block content %}
-{{ page.content | safe }}
+{{ page.content | replace(from="<img ", to="<img loading=lazy ") | safe }}
{% endblock content %}
diff --git a/templates/section.html b/templates/section.html
@@ -10,5 +10,5 @@
{% endblock sidebar %}
{% block content %}
-{{ section.content | safe }}
+{{ section.content | replace(from="<img ", to="<img loading=lazy ") | safe }}
{% endblock content %}