diff --git a/.gitignore b/.gitignore index ee99d31..a7f1e60 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,8 @@ site NOTES.md theme/*.html -theme/*.min +theme/*.min.* + +theme/favicon.* +theme/favicon-ex.png +!theme/favicon.svg diff --git a/Makefile b/Makefile index e0cf271..076e7d3 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,43 @@ # $@ : rule name (output) # Build the website -site/index.html: docs/** theme/** theme/main.html theme/style.css.min theme/gruvbox-dark.css.min mkdocs.yml +site/index.html: docs/** \ + theme/** \ + theme/main.html \ + theme/style.min.css \ + theme/gruvbox-dark.min.css \ + mkdocs.yml mkdocs build build: site/index.html +# HTML theme/main.html: haml/main.haml haml render $< > $@.tmp cat $@.tmp > $@ rm $@.tmp -theme/style.css.min: theme/style.css +# CSS +theme/style.min.css: theme/style.css python3 -m csscompressor -o $@ $< -theme/gruvbox-dark.css.min: theme/gruvbox-dark.css +theme/gruvbox-dark.min.css: theme/gruvbox-dark.css python3 -m csscompressor -o $@ $< +# Favicons +theme/favicon-ex.png: theme/favicon.svg + inkscape theme/favicon.svg --export-filename=theme/favicon-ex.png + +theme/favicon.png: theme/favicon-ex.png + magick theme/favicon-ex.png -compress Zip -quality 1 -resize 144x144 theme/favicon.png + +theme/favicon.ico: theme/favicon-ex.png + magick theme/favicon-ex.png -compress Zip -quality 1 -resize 144x144 theme/favicon.ico + +favicon_all: theme/favicon.png theme/favicon.ico + +# Scripts + # Serve the website at http://127.0.0.1:8000/~tasiaiso/ serve: theme/main.html mkdocs serve -w theme @@ -40,6 +61,10 @@ purge: clean format build clean: rm -r site/ rm theme/main.html - rm theme/style.css.min - rm theme/gruvbox-dark.css.min + rm theme/style.min.css + rm theme/gruvbox-dark.min.css + rm theme/favicon-ex.png + rm theme/favicon.min.svg + rm theme/favicon.png + rm theme/favicon.ico \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 5767d2a..18332ff 100644 --- a/docs/index.md +++ b/docs/index.md @@ -77,6 +77,11 @@ If you like my posts, please consider supporting me on [Liberapay](https://liber ## changelog +## v1.0.3 (2024-06-xx) + +- minify css files +- compress favicons + ### v1.0.2 (2024-05-26) - add tea badge diff --git a/haml/main.haml b/haml/main.haml index fb22e34..a6d92cb 100644 --- a/haml/main.haml +++ b/haml/main.haml @@ -5,9 +5,10 @@ %meta(name="viewport" content="width=device-width, initial-scale=1.0") %link(rel="icon" type="image/png" href="/~tasiaiso/favicon.png") %link(rel="icon" type="image/x-icon" href="/~tasiaiso/favicon.ico") + %link(rel="icon" type="image/svg+xml" href="/~tasiaiso/favicon.svg" sizes="any") - %link(rel="stylesheet" href="/~tasiaiso/gruvbox-dark.css") - %link(rel="stylesheet" href="/~tasiaiso/style.css.min") + %link(rel="stylesheet" href="/~tasiaiso/gruvbox-dark.min.css") + %link(rel="stylesheet" href="/~tasiaiso/style.min.css") %title {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }} diff --git a/theme/favicon.ico b/theme/favicon.ico deleted file mode 100644 index 633e9e4..0000000 Binary files a/theme/favicon.ico and /dev/null differ diff --git a/theme/favicon.png b/theme/favicon.png deleted file mode 100644 index 7cb615a..0000000 Binary files a/theme/favicon.png and /dev/null differ diff --git a/theme/favicon.svg b/theme/favicon.svg index 22dfecc..64622aa 100644 --- a/theme/favicon.svg +++ b/theme/favicon.svg @@ -1,59 +1,10 @@ - - - - - - - + width="512" + height="512" + version="1.1" + xmlns="http://www.w3.org/2000/svg"> + diff --git a/theme/gruvbox-dark.css b/theme/gruvbox-dark.css index 5506776..145d556 100644 --- a/theme/gruvbox-dark.css +++ b/theme/gruvbox-dark.css @@ -1,34 +1,34 @@ /* yv31.github.io/gruvbox-css */ :root { --bg_h: #1d2021; - --bg: #282828; - --bg_s: #32302f; + /* --bg: #282828; */ + /* --bg_s: #32302f; */ --bg1: #3c3836; - --bg2: #504945; - --bg3: #665c54; - --bg4: #7c6f64; + /* --bg2: #504945; */ + /* --bg3: #665c54; */ + /* --bg4: #7c6f64; */ --fg: #fbf1c7; - --fg1: #ebdbb2; - --fg2: #d5c4a1; - --fg3: #bdae93; - --fg4: #a89984; + /* --fg1: #ebdbb2; */ + /* --fg2: #d5c4a1; */ + /* --fg3: #bdae93; */ + /* --fg4: #a89984; */ - --red: #fb4934; - --green: #b8bb26; + /* --red: #fb4934; */ + /* --green: #b8bb26; */ --yellow: #fabd2f; - --blue: #83a598; - --purple: #d3869b; - --aqua: #8ec07c; - --gray: #928374; - --orange: #fe8019; + /* --blue: #83a598; */ + /* --purple: #d3869b; */ + /* --aqua: #8ec07c; */ + /* --gray: #928374; */ + /* --orange: #fe8019; */ - --red-dim: #cc2412; - --green-dim: #98971a; - --yellow-dim: #d79921; + /* --red-dim: #cc2412; */ + /* --green-dim: #98971a; */ + /* --yellow-dim: #d79921; */ --blue-dim: #458588; --purple-dim: #b16286; - --aqua-dim: #689d6a; - --gray-dim: #a89984; - --orange-dim: #d65d0e; + /* --aqua-dim: #689d6a; */ + /* --gray-dim: #a89984; */ + /* --orange-dim: #d65d0e; */ }