some fixes and theme descriptions

This commit is contained in:
Jaromil 2013-08-26 14:50:17 +02:00
parent fd73f341d4
commit d39dcf240b
5 changed files with 32 additions and 12 deletions

15
convert
View File

@ -28,17 +28,19 @@ CMD=`basename $0`
source ${DIR}/utils
DEBUG=1
{ test "$3" = "" } && {
error "usage: remaster [destination dir] [images dir] [commands]";
error "usage: $0 [destination dir] [images dir] [commands]";
act "commands are imagemagick's convert commands"
return 1 }
dst="$1"; shift
src="$1"; shift
dst="$1"; shift 1
src="$1"; shift 1
act "source: $src"
act "destination: $dst"
act "convert args: ${=@}"
act "convert args: ${@}"
images=()
@ -53,8 +55,9 @@ for i in $images; do
destfile=`basename $i`
# escape all weird characters in filenames
destfile_sane=`print $destfile | sed -e "s@'@@g"`
act -n "resizing $destfile_sane ... "
convert $i ${=@} $dst/$destfile_sane
func "convert $i ${@} $dst/$destfile_sane (was $destfile)"
act -n "convert $destfile_sane ... "
convert $i ${@} $dst/$destfile_sane
if [ $? = 0 ]; then
results+=($dst/$destfile_sane)
print " done"

1
css/custom.css Normal file
View File

@ -0,0 +1 @@
/* Custom changes to stylesheet below */

3
init
View File

@ -30,7 +30,8 @@ CMD=`basename $0`
source $DIR/utils
mkdir -p views
mkdir -p views/js
mkdir -p views/css
{ test -r views/index.html } || {
cat <<EOF > views/index.html
<h1>Hello world</h1>

7
render
View File

@ -68,9 +68,9 @@ render_header() {
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" />
EOF
{ test -r views/css/style.css } && {
{ test -r views/css/custom.css } && {
cat <<EOF
<link href="css/style.css" rel="stylesheet" />
<link href="css/custom.css" rel="stylesheet" />
EOF
}
@ -229,13 +229,12 @@ blueimp.Gallery(slides, {
carousel: true,
fullscreen: true,
closeOnEscape: true,
closeOnSlideClick: true,
closeOnSwipeUpOrDown: true,
startSlideshow: true,
slideshowInterval: 4500,
});
EOF
# closeOnSlideClick: true,
includejs=(js/jquery.min.js)
includejs+=(js/bootstrap.min.js)

18
theme
View File

@ -36,10 +36,26 @@ source ${DIR}/utils
####################################
typeset -A themedesc
themedesc[amelia]="colorful, blue background, red menu"
themedesc[cerulean]="light, white background, blue menu"
themedesc[readable]="light, white background, serif"
themedesc[journal]="light, white background, uppercase sans"
themedesc[cyborg]="dark, almost black, background"
themedesc[slate]="dark gray background"
themedesc[superhero]="dark blue background"
themedesc[simplex]="light, white background, sans, red links"
themedesc[spacelab]="light, white background, sans, gray widget menus"
themedesc[spruce]="dark, gray background, serif"
themedesc[united]="light, white background, sans, orange block menus"
{ test -z $1 } && {
notice "List of available themes:"
for i in `ls ${DIR}/themes`; do
act "$i"
act "$i : ${themedesc[$i]}"
done
exit 0
}