From 82371e351a35363a8b493d0063e925dce1d27008 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Tue, 5 May 2015 01:12:44 -0700 Subject: handle navigation button and favicons Note that I'm using an tag with the svg because if wrapped in , the svg won't render on Safari. After using the tag, the svg renders on all four major browsers on OS X (Chrome, Safari, Firefox, Opera), and it looks nice on all three but Firefox, in which case it's crappy as fuck. --- source/img/README.rst | 11 ++++ source/img/favicon-144.png | Bin 0 -> 10140 bytes source/img/favicon-152.png | Bin 0 -> 10697 bytes source/img/icon.svg | 134 +++++++++++++++++++++++++++++++++++++++++++++ source/img/icon.tex | 21 +++++++ 5 files changed, 166 insertions(+) create mode 100644 source/img/README.rst create mode 100644 source/img/favicon-144.png create mode 100644 source/img/favicon-152.png create mode 100644 source/img/icon.svg create mode 100644 source/img/icon.tex (limited to 'source/img') diff --git a/source/img/README.rst b/source/img/README.rst new file mode 100644 index 00000000..cb7a633c --- /dev/null +++ b/source/img/README.rst @@ -0,0 +1,11 @@ +The icon and favicon files are generated via the following commands: :: + + cd source/img + xelatex icon.tex + convert icon.pdf icon.svg + for size in 16 32 48 144 152; do convert icon.pdf -density 400 -resize ${size}x${size} favicon-${size}.png; done + optipng favicon-16.png favicon-32.png favicon-48.png favicon-144.png favicon-152.png + convert favicon-16.png favicon-32.png favicon-48.png ../favicon.ico + rm favicon-16.png favicon-32.png favicon-48.png + +Credit to `audreyr/favicon-cheat-sheet `_ for favicon handling tips. diff --git a/source/img/favicon-144.png b/source/img/favicon-144.png new file mode 100644 index 00000000..dec50e02 Binary files /dev/null and b/source/img/favicon-144.png differ diff --git a/source/img/favicon-152.png b/source/img/favicon-152.png new file mode 100644 index 00000000..d4ce37f2 Binary files /dev/null and b/source/img/favicon-152.png differ diff --git a/source/img/icon.svg b/source/img/icon.svg new file mode 100644 index 00000000..e74fd042 --- /dev/null +++ b/source/img/icon.svg @@ -0,0 +1,134 @@ + + + + diff --git a/source/img/icon.tex b/source/img/icon.tex new file mode 100644 index 00000000..c4efccc3 --- /dev/null +++ b/source/img/icon.tex @@ -0,0 +1,21 @@ +%%% Local Variables: +%%% coding: utf-8 +%%% mode: latex +%%% TeX-engine: xetex +%%% End: + +\documentclass{standalone} +\usepackage{xltxtra} +\usepackage{tikz} + +\setmainfont{Helvetica Neue} + +\begin{document} + +\tikz { + \fill[fill=none](0,0) circle (10); + \draw[draw=none,fill=black!20!white] (0,0) circle (10); + \node[text=white,scale=20.0] at (0,0) {ZW}; +} + +\end{document} -- cgit v1.2.1