diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..389e635 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "icons/feather"] + path = icons/feather + url = https://github.com/feathericons/feather/ diff --git a/Makefile b/Makefile index ff72380..cbb4758 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ BASE_URL_WWW ?= https://monotremata.xyz BASE_URL_ONION ?= http://zswm576cm7wgmgcwluy4l4ixkfasj25taqbn2r5pnrrj552l263ff2qd.onion SASS_FILES=$(shell find sass -name \*.scss) -ICON_FILES=$(shell find icons -name \*.svg) +FEATHER_ICONS=$(shell find icons/feather/icons -name \*.svg) PAGES=$(shell find pages -maxdepth 1 -mindepth 1 -type d -printf "%f\n") ASSETS=$(shell find assets -mindepth 1) @@ -45,7 +45,7 @@ define tidy_html tidy --show-info no -output $@ $< endef -page_deps = pages/%/*.j2 config.yaml header.j2 footer.j2 style.css $(ICON_FILES) +page_deps = pages/%/*.j2 config.yaml header.j2 footer.j2 style.css $(FEATHER_ICONS) untidy_www_%.html: $(page_deps) $(call build_html,$(BASE_URL_WWW)) diff --git a/README.md b/README.md index 710b58f..cec51f5 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ My site is simple enough that using a proper static site generator would have been overkill, but I still wanted something easier to maintain than directly writing HTML by hand. So a templating system like Jinja2 is a nice compromise. +## Icons + +I'm using the [feather icons](https://feathericons.com/) for the website +navigation bar. The repo with the icons is cloned as sub-module and the needed +SVGs are embedded into the HTML when the website is built. + ## Build dependencies There's a zero chance than anyone other than me would want to build this, and diff --git a/config.yaml b/config.yaml index eb8e381..9b96606 100644 --- a/config.yaml +++ b/config.yaml @@ -18,3 +18,5 @@ nav: - name: buy me a coffee icon: coffee endpoint: donate + +icon_path: icons/feather/icons diff --git a/header.j2 b/header.j2 index 105faa0..90d98bb 100644 --- a/header.j2 +++ b/header.j2 @@ -16,7 +16,7 @@ class="nav-link" href="{% if x.url is defined %}{{ x.url }}{% else %}{{ "BASE_URL" | env }}/{{ x.endpoint }}{% endif %}" > - {% include "icons/" + x.icon + ".svg" %}{{ x.name }} + {% include icon_path + "/" + x.icon + ".svg" %}{{ x.name }} {% endfor %} diff --git a/icons/code.svg b/icons/code.svg deleted file mode 100644 index c4954b5..0000000 --- a/icons/code.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icons/coffee.svg b/icons/coffee.svg deleted file mode 100644 index 32905e5..0000000 --- a/icons/coffee.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icons/dollar-sign.svg b/icons/dollar-sign.svg deleted file mode 100644 index 1a124d2..0000000 --- a/icons/dollar-sign.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icons/feather b/icons/feather new file mode 160000 index 0000000..f81cd40 --- /dev/null +++ b/icons/feather @@ -0,0 +1 @@ +Subproject commit f81cd40fdcdd5e94f3f97eb670a5058e3aac528d diff --git a/icons/file-text.svg b/icons/file-text.svg deleted file mode 100644 index 4197ddd..0000000 --- a/icons/file-text.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icons/info.svg b/icons/info.svg deleted file mode 100644 index a09fa5f..0000000 --- a/icons/info.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icons/mail.svg b/icons/mail.svg deleted file mode 100644 index 2af169e..0000000 --- a/icons/mail.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file