Commit Graph

5 Commits

Author SHA1 Message Date
George 1a7fddecf8
Fix code blocks not changing to plots and others (#2497)
For some unknown reason, all the `document.onreadystatechange = () => {`
checks stopped working. Thankfully, replacing them with
`document.addEventListener("readystatechange", () => {` fixed the
issues.

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
2024-06-11 14:06:38 -03:00
George ba53f89965
Added support for Google Typograms (#2379)
Google [Typograms](https://github.com/google/typograms/) is a
lightweight image format (text/typogram) useful for defining simple
diagrams in technical documentation.


![image](https://github.com/alshedivat/al-folio/assets/31376482/715ba10b-c75d-492b-8869-4ec83d380e50)


![image](https://github.com/alshedivat/al-folio/assets/31376482/935f6ef8-1977-41d0-8797-d226594b82a9)

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
2024-04-30 11:26:56 -03:00
George 08d562a104
Offline mode (closes #1181) (#2312)
Created a plugin to tackle #1181. Currently have an issue with tikzjax
since it imports some wasm file from its javascript. The rest should
work as expected.

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
2024-04-08 14:51:28 -03:00
Sam Adam-Day c788a30202
Added "follow system" option to theme toggle (#2261)
The theme toggle button now has a third option, which follows the user's
system preferences.

- In the code there's now a distinction between the theme setting (which
can be "dark", "light" or "system") and the computed theme.
- The theme setting is now stored as the "theme-setting" local storage
variable. Since this is different from the old variable ("theme"), this
will effectively reset all current user themes to the default "system".
Maybe this is not what you want.
- The "system" theme icon is currently a half circle symbol.
- The toggle button now displays the current theme setting, rather than
the next theme setting (as far as I know this is consistent with other
sites which have three theme options).
- `theme.js` is now loaded regardless of `site.enable_darkmode`. This is
because other scripts which were always loaded relied on being able to
determine the theme. `theme.js` no longer initialises the theme itself
though; this only happens when `site.enable_darkmode`.
- When the theme setting is "system", the theme will change immediately
whenever the user changes their system theme.

#2261

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
Co-authored-by: George Araujo <george.gcac@gmail.com>
2024-03-13 22:42:46 -03:00
George 06bc36762d
Move libs versions to config (#2139)
Moved libs versions and hashes to `_config.yml`.

Fixes #2067.

Deferring everything possible to keep pages loads fast.

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
2024-01-28 19:10:42 -03:00