lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

commit 690606941cfffd9a092e410f56a065cacb25c0e0
parent 7c5734e59397c532952a529f0ac24a894fab3525
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Wed, 28 Jul 2021 16:02:56 +0200

Change noscript notices

Shorten the overall notice. Then on every page using Katex, show a
message about it.

Diffstat:
Mtemplates/base.html | 5+----
Mtemplates/page-math.html | 8++++++++
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/templates/base.html b/templates/base.html @@ -37,10 +37,7 @@ {% endblock sidebar %} <noscript> <p> - I see you have JavaScript disabled. - Wise choice, this site designed for all content to be accessible without JS, or even through a terminal browser. - However, in GUI browsers, I have this page themed dynamically, so when it's dark outside, you'll get a dark theme. - Apart from math equation rendering with Katex, it's also the only part of this website that uses JavaScript. + In GUI browsers, I have this page themed dynamically, so when it's dark outside, you'll get a dark theme. You need JS enabled if you want the dynamic theme; I have no reason to track you, I don't run analytics of any kind. </p> </noscript> diff --git a/templates/page-math.html b/templates/page-math.html @@ -6,6 +6,14 @@ {% set parent_section = get_section(path=page.ancestors | last) %} <h1><a href="{{ parent_section.permalink }}">{{ parent_section.title }}</a></h1> +<noscript> + <p> + This page uses a local copy of <a href="https://katex.org/">KaTeX</a> to render math notation. + Without JavaScript, some math notation may be difficult to read. + PS, if someone knows how to render math server-side with the <a href="http://getzola.org/">Zola</a> SSG, let me know. + </p> +</noscript> + <h2>Table of Contents</h2> <ul> {% for h1 in page.toc %}