X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=include%2Fchrome.pm;fp=include%2Fchrome.pm;h=e27fb5b7d25c74580bb4f133e2aaa9e056a665bc;hp=0000000000000000000000000000000000000000;hb=3364d219ce6156f74854698a7ecda95c6d45c00d;hpb=7a52825ce5f25653945b6f1ba8f1aa0098f95863 diff --git a/include/chrome.pm b/include/chrome.pm new file mode 100644 index 0000000..e27fb5b --- /dev/null +++ b/include/chrome.pm @@ -0,0 +1,52 @@ +#!/usr/bin/perl +# $Id$ +# +# customizable class to generate html around the gallery index + +package Chrome; + +use strict; + +# Boilerplate. Do not change this (unless you know better). + +sub new { + my $this=shift; + my $self; + my $parm=shift; + if (ref($this)) { + die "$this::new should not be called as instance method"; + } else { + $self={ + -title => $parm->{-title}, + -depth => $parm->{-depth}, + -breadcrumbs => $parm->{-breadcrumbs}, + }; + } + bless $self,$this; + return $self; +} + +# Public methods. Replace this with what suits you. + +sub header { + my $self=shift; + return $self{-depth}? + "
UP
": + "". + "

$self{-title}

"; +} + +sub axheader { + my $self=shift; + return "

Albums

"; +} + +sub ixheader { + my $self=shift; + return "

Images

"; +} + +sub footer { + my $self=shift; + return "
"; +}