Added favicons, and script to generate them from the svg

This commit is contained in:
archshift 2014-10-05 15:02:08 -07:00
parent 4a2326b4e3
commit 5675a963ad
11 changed files with 70 additions and 2 deletions

View File

@ -5,8 +5,25 @@
<title>Citra - Experimental 3DS Emulator</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="resources/smooth-scroll/dist/js/bind-polyfill.js"></script>
<script src="resources/smooth-scroll/dist/js/smooth-scroll.js"></script>
<!-- Windows Phone -->
<meta name="msapplication-TileColor" content="#099" />
<meta name="msapplication-TileImage" content="/resources/favicon/favicon-144.png" />
<!-- Android, iOS -->
<link rel="apple-touch-icon" sizes="180x180" href="/resources/favicon/favicon-180.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/resources/favicon/favicon-152.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/resources/favicon/favicon-120.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/resources/favicon/favicon-76.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/resources/favicon/favicon-72.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/resources/favicon/favicon-60.png" />
<link rel="apple-touch-icon" href="/resources/favicon/favicon-60.png" />
<!-- General -->
<link rel="icon" href="/resources/favicon/favicon-32.png" sizes="32x32" />
<link rel="icon" href="/resources/favicon/favicon.ico" />
<link rel="shortcut icon" href="/resources/favicon/favicon.ico" />
<!-- Smooth Scroll script -->
<script src="/resources/smooth-scroll/dist/js/bind-polyfill.js"></script>
<script src="/resources/smooth-scroll/dist/js/smooth-scroll.js"></script>
</head>
<body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,51 @@
#!/bin/bash
## REQUIRES: librsvg, imagemagick
#### On OS X: `brew install librsvg imagemagick`
#### On Debian: `apt-get install librsvg2-bin imagemagick`
#### On Arch: `pacman -S librsvg imagemagick`
if [ -z $1 ]; then
echo "You must specify an svg file to generate favicon images from!"
exit 1
fi
SVG_PATH=$1
FAVICON_NAME="./favicon"
PRE_FAVICON_NAME="/tmp/pre-favicon"
PRE_FAVICON_GLOB="${PRE_FAVICON_NAME}-*"
ICO_PATH="${FAVICON_NAME}.ico"
FAVICON_ICO_SIZES=(
16 24 32 48
)
FAVICON_PNG_SIZES=(
32 60 72 76 120 144 152 180
)
function svg2png {
OUTPUT_NAME=$1
SIZE=$2
SILENT=$3
OUTPUT_PNG="${OUTPUT_NAME}-${SIZE}.png"
rsvg-convert $SVG_PATH -w $SIZE -o $OUTPUT_PNG 1>/dev/null
if ! $SILENT; then
echo "Created PNG: ${OUTPUT_PNG}"
fi
}
for SIZE in ${FAVICON_PNG_SIZES[@]}; do
svg2png $FAVICON_NAME $SIZE false
done
for SIZE in ${FAVICON_ICO_SIZES[@]}; do
svg2png $PRE_FAVICON_NAME $SIZE true
done
convert $PRE_FAVICON_GLOB $ICO_PATH
echo "Created ICO: $ICO_PATH..."
rm $PRE_FAVICON_GLOB