theme dependent & imagemagickally created loading.gif

This commit is contained in:
fagga 2011-01-02 15:36:42 +01:00
parent 8bb599748f
commit ed30e37537
7 changed files with 59 additions and 1 deletions

View File

@ -175,7 +175,6 @@ a.nav-button:hover {
}
.loading {
background-image: url('../loading.gif');
background-repeat: no-repeat;
background-position: center center;
}

View File

@ -69,3 +69,7 @@ a.nav-button:hover {
border: 1px solid gray;
color: darkblue;
}
.loading {
background-image: url('../img/loading_dark.gif');
}

View File

@ -69,3 +69,7 @@ a.nav-button:hover {
border: 1px solid gray;
color: darkblue;
}
.loading {
background-image: url('../img/loading_light.gif');
}

BIN
img/loading_dark.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
img/loading_light.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

51
make_loading_gif.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/sh
fg=${1:-'#acffac'}
bg=${2:-'transparent'}
dstfile=${3:-'loading.gif'}
size=64x64
framenum=20
delay=5
blur=50
swirl=150
echo "Creating $dstfile with:"
echo " Foreground color: $fg"
echo " Background color: $bg"
echo " Size: $size"
echo " Number of frames: $framenum"
echo "Delay between frames: $delay"
echo
set -e
convert -size 500x500 xc:"$bg" -draw \
"fill none
stroke-width 80
stroke $fg
ellipse 250,250 200,200 0,80" \
loading_base.png
stepsize=$((360/$framenum))
for i in $(seq $framenum); do
rotation=$(($i*$stepsize))
framename="frame_$(printf %03d $i)of${framenum}_${size}_r${rotation}"
echo "Creating frame $framename ..."
# rotate
filename=
if [ ! -e "$framename.png" ]; then
convert loading_base.png \
-matte \( +clone -background "$bg" -rotate $rotation \) \
-gravity center -compose Src -composite "$framename.png"
fi
if [ ! -e "$framename.gif" ]; then
convert "$framename.png" -filter triangle -resize $size \
-radial-blur $blur -swirl $swirl "$framename.gif"
fi
done
gifsicle --disposal bg --delay=$delay --loop frame_*of${framenum}_${size}_*.gif > "$dstfile"
rm frame_* loading_base.png