Album
view release on metacpan or search on metacpan
script/album view on Meta::CPAN
$fmt;
}
################ Style Sheets ################
my %css_for;
sub init_stylesheets {
my $css_fontfam = "font-family: Verdana, Arial, Helvetica";
my $WHITE = "#FFFFFF";
my $BLACK = "#000000";
my $RED = "#FF0000";
my $LGREY = "#E0E0E0";
my $MGREY = "#D0D0D0";
my $DGREY = "#C0C0C0";
my $DDGREY = "#B0B0B0";
my $BLUE = "#0000FF";
# Grey variants for index table borders.
my $GR245 = "#F5F5F5";
my $GR232 = "#E8E8E8";
my $GR124 = "#7C7C7C";
my $GR114 = "#727272";
my $helper = $thumb + 4;
my $did = 0;
my $load = sub {
my ($req, $data) = @_;
my $css = d_css($req.".css");
if ( -r $css ) {
my $major = $css_major;
my $minor = $css_minor;
my $orig;
if ( open(my $orig, "<", d_fmt("$req.fmt")) ) {
my $line = <$orig>;
close($orig);
if ( $line =~ m;/\*\s*album-fmt-version:\s*(\d+)\.(\d+)\s*\*/;i ) {
($major, $minor) = ($1, $2);
}
}
# Check stylesheet compatibility.
open($orig, "<", $css);
my $line = <$orig>;
close($orig);
if ( $line =~ m;/\*\s*album-css-version:\s*(\d+)\.(\d+)\s*\*/;i ) {
if ( $1 == $major ) {
return "";
}
}
print STDERR "\n" if $did;
die(heredoc(<<" EOD", 8));
*************************************************************************
Existing style sheet $req.css is not compatible with this version.
It has probably been created by an older version of this program, or it
has been modified manually.
If you did not change any style sheets, just remove the css directory and
try again.
If you did modify the style sheets move them away to a backup location,
run the program with '--extcss', and apply your changes to the new style
sheets.
*************************************************************************
EOD
}
elsif ( $externalize_css ) {
unless ( $did ) {
my $fdir = d_css("");
$fdir =~ s/\/+$//;
unless ( -d $fdir ) {
print STDERR ("mkdir $fdir\n");
mkdir(d_css(""));
}
}
print STDERR ("Creating stylesheets: ") if $verbose > 1 && !$did++;
print STDERR ("$req ") if $verbose > 1;
open (my $fh, '>', $css) || die("$css: $!\n");
print { $fh } $data;
close($fh);
}
$data =~ s/^([ \t]+)/detab($1)/gem;
$data;
};
my $css_for_common = heredoc(<<" EOD", 0);
body {
$css_fontfam;
font-size: 80%;
text: $BLACK;
}
a:link {
color: $BLACK; text-decoration: none;
}
a:visited {
color: $BLACK; text-decoration: none;
}
a:active {
color: $RED; text-decoration: none;
}
img.image {
border: 2px solid $BLACK;
}
img.button {
border: 0;
vertical-align: top;
}
table.vb {
border: 0;
border-spacing: 0 0;
}
table.vb td {
padding: 0 0 0 0;
}
table.hb {
border: 0;
( run in 0.672 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )