Added favicons, and script to generate them from the svg
21
index.html
@ -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>
|
||||
|
BIN
resources/favicon/favicon-120.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/favicon/favicon-144.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
resources/favicon/favicon-152.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
resources/favicon/favicon-180.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
resources/favicon/favicon-32.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
resources/favicon/favicon-60.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
resources/favicon/favicon-72.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
resources/favicon/favicon-76.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
resources/favicon/favicon.ico
Normal file
After Width: | Height: | Size: 17 KiB |
51
resources/favicon/generate-favicon.sh
Executable 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
|