2021-01-08 17:15:45 +00:00
|
|
|
#+title: Pile Theme
|
2021-04-17 05:19:51 +00:00
|
|
|
#+property: header-args:shell :tangle build.sh :shebang "#!/usr/bin/env bash" :comments none
|
2020-07-15 10:27:33 +00:00
|
|
|
|
2021-01-08 17:15:45 +00:00
|
|
|
A sass-based set of styles to be used by Org when exporting to HTML.
|
|
|
|
=main.scss= is compiled to =main.css= which is then inserted into the ~<head>~ of
|
|
|
|
generated HTML documents.
|
2020-07-15 10:27:33 +00:00
|
|
|
|
2021-01-08 17:15:45 +00:00
|
|
|
This is a modified version of [[https://lepisma.xyz/][lepisma]]'s lovely [[https://github.com/lepisma/pile-theme][pile-theme]].
|
|
|
|
|
|
|
|
A little non-essential JS has been added to provide:
|
|
|
|
+ Functionality for copy-to-clipboard buttons
|
|
|
|
+ Have the table of contents auto-expand based on the current scroll position
|
|
|
|
|
|
|
|
* Development
|
|
|
|
To build =main.css= and =main.js=, I simply run
|
|
|
|
|
|
|
|
#+begin_src shell
|
2020-07-16 18:42:14 +00:00
|
|
|
sassc main.scss main.css
|
2021-01-08 17:15:45 +00:00
|
|
|
#+end_src
|
2020-07-15 10:27:33 +00:00
|
|
|
|
2021-04-17 05:19:51 +00:00
|
|
|
A minified CSS file would be nice to have too.
|
|
|
|
#+begin_src shell
|
|
|
|
sassc --style compressed main.scss main.min.css
|
|
|
|
if command -v csso &> /dev/null; then
|
|
|
|
csso main.min.css -o main.min.css
|
|
|
|
fi
|
|
|
|
#+end_src
|
|
|
|
|
2021-01-08 17:15:45 +00:00
|
|
|
Then for combining the JS
|
2020-07-17 18:43:52 +00:00
|
|
|
|
2021-01-08 17:15:45 +00:00
|
|
|
#+begin_src shell
|
2021-04-17 04:33:46 +00:00
|
|
|
ls _*.js | sort -V | xargs cat > main.js
|
2021-01-08 17:15:45 +00:00
|
|
|
#+end_src
|