theme dependent & imagemagickally created loading.gif
This commit is contained in:
parent
8bb599748f
commit
ed30e37537
|
@ -175,7 +175,6 @@ a.nav-button:hover {
|
|||
}
|
||||
|
||||
.loading {
|
||||
background-image: url('../loading.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
|
|
@ -69,3 +69,7 @@ a.nav-button:hover {
|
|||
border: 1px solid gray;
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
.loading {
|
||||
background-image: url('../img/loading_dark.gif');
|
||||
}
|
||||
|
|
|
@ -69,3 +69,7 @@ a.nav-button:hover {
|
|||
border: 1px solid gray;
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
.loading {
|
||||
background-image: url('../img/loading_light.gif');
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
loading.gif
BIN
loading.gif
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -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
|
Loading…
Reference in New Issue