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>
This PR adds an "award" button to publications.
It takes the `award` value from the bibtex entry and displays(incl.
Markdown rendering) the text in a box similarly to abstract and bibtex.
User can set the entry `award_name` to configure the value. See example
config with `award_name: Nobel Prize`.
The color of the award box can be configured in `_base.scss`.
Note, there is a similar PR #2175, it I saw to issues with:
1. There was no progress
2. The award button just prints the text directly in the button,
similarly to `award_name`. Long award names could clutter the webpage.
3. IMHO, it brokes the current al-folio design, since butons do have a
fixed size/text. However, variable prize names are also possible with
this PR.
***
Pictures:
Default. Text are hidden:
<img width="708" alt="grafik"
src="https://github.com/alshedivat/al-folio/assets/1998723/1221c82c-c384-4297-807e-39385e2ce4fd">
Additional info is shown when the button is clicked. Markdown supported.
<img width="684" alt="grafik"
src="https://github.com/alshedivat/al-folio/assets/1998723/2354aeee-12b0-4d32-b194-5d2ea80d8363">
Only one text box shown at the same time, like it is with "ABS" and
"BIB":
<img width="691" alt="grafik"
src="https://github.com/alshedivat/al-folio/assets/1998723/d3937bb9-d9c2-47ac-b819-b92aec3d916a">
***
Feedback welcome.
You can also check [my
website](https://christianmainka.de/publications/awarded), which was the
base for this PR.
The blog archive page tables have `table-borderless`, but
bootstrap-table JS adds `table-bordered` by default and this forces an
`!important` border.
Since these tables are also supposed to be borderless, this PR excludes
them from bootstrap-table, just like the news and CV table are.
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>
summary:
- adds prettier formatter configuration
- formats the entire repo using prettier, ignoring minified files
(`*.min.css`) and heavy generated html
- changes extensions of all `.html` files to `.liquid`, which is more
correct and necessary for prettier to work correctly
- replaces "%-" and "-%" with just "%" — manual liquid formatting using
minus signs is superfluous since we are compressing and minifying the
code anyway
- adds CI action for running prettier check on PR and pushes to master
Fixes#1952 by updating font awesome version. Also updated icons names
to newest font awesome style.
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
Tackled #1329 with [PurgeCSS](https://purgecss.com/).
Being talking with @varuniyer about using
[jekyll-uncss](https://github.com/episource/jekyll-uncss) to reduce css
file sizes by ditching unused classes. This approach have 3 main
problems:
1 - have some limitations as pointed
[here](https://github.com/alshedivat/al-folio/issues/1329#issuecomment-1546517327)
2 - last update to
[jekyll-uncss](https://github.com/episource/jekyll-uncss) was about 3
years ago, so it might have a few issues
3 - [uncss](https://github.com/uncss/uncss) haven't seem a new release
in a while, currently [lacking
maintenance](https://github.com/uncss/uncss/issues/459), and using some
deprecated libraries as seem here:
```
npm install -g uncss
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
```
I thought about giving PurgeCSS a go, since it has been more [actively
maintaned](https://github.com/FullHuman/purgecss), but
[jekyll-purgecss](https://github.com/mhanberg/jekyll-purgecss) haven't.
For this, I needed to change to use some local libraries instead of
getting them via CDN. The good news is that it is quite effective in
reducing css file sizes. Comparing dir sizes with `du -hs
_site/assets/css/`:
| current | minify | PurgeCSS | PurgeCSS + minify |
| ------- | ------ | -------- | ----------------- |
| 1,1M | 988K | 456K | 420K |
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
When the dark mode is default, or if you set the page to dark mode and
then refresh, the content in "General Information" can't be seen.
This PR fixes the problem.
* updating distill post to show fixes done
* fix for colors in numerated lists and tables
* fixing blockquotes
* fixing colors in math, footnotes, references, hover boxes, code highlights
* Add example distill overrides
* reverted back changes in distill template.v2.js
Co-authored-by: Maruan Al-Shedivat <alshedivat.maruan@gmail.com>
* Dark Mode + Theming
* Themes scss file created with default color scheme and dark color scheme.
* Logic for managing dark mode toggle added.
* Modified existing scss/html to work with theme toggling.
* Fixed hover issues
* Added enable_darkmode to configs.
* Added the requested option of disabling/enabling dark mode via config files.