diff --git a/build.sh b/build.sh index 06c308b..5d7e653 100755 --- a/build.sh +++ b/build.sh @@ -3,6 +3,8 @@ set -e rm -rf build mkdir build +ln -s $(realpath res) build/res + git_rev=$(git rev-parse --short=12 HEAD) git_commit_date=$(date -d @$(git log -1 --format=%at) +'%d. %B %Y %H:%M') diff --git a/core-page-style.typ b/core-page-style.typ index b977982..1ab4906 100644 --- a/core-page-style.typ +++ b/core-page-style.typ @@ -4,8 +4,18 @@ #let small-font-size = if is-web { 14pt } else { 9pt } #let default-font-size = if is-web { 17pt } else { 10pt } -#let core-page-style(content) = {[ +#let core-page-style(content) = {context html-opt-elem("html", (:))[ +#context if is-html() { + html.elem("head",[ + #html.elem("meta", attrs:(charset:"utf-8")) + #html.elem("meta", attrs:(name:"viewport", content:"width=device-width, initial-scale=1")) + #let ico = res-path()+"favicon.png" + #html.elem("link", attrs:(rel:"icon", sizes:"512x512", href:ico)) + #html.elem("link", attrs:(rel:"image_src", type:"image/png", href:ico)) + ]) +} +#context html-opt-elem("body", (:))[ #show: x => context { set page(width: auto, height: auto) if is-web and not is-html() @@ -112,5 +122,5 @@ html.elem("style", " #content -] +]] } diff --git a/res/favicon.png b/res/favicon.png new file mode 100644 index 0000000..2a0022b Binary files /dev/null and b/res/favicon.png differ