From 9b243c81dac2a08e3cc1436d28903433b7c6f1da Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 8 Apr 2021 11:59:16 +0200 Subject: add optional HTML include header --- lib/App/Dthumb.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/App/Dthumb.pm') diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index 0223016..74face3 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -7,7 +7,7 @@ use 5.010; use App::Dthumb::Data; use Cwd; use File::Copy qw(copy); -use File::Slurp qw(read_dir write_file); +use File::Slurp qw(read_dir read_file write_file); use Image::Imlib2; our $VERSION = '0.2'; @@ -45,6 +45,10 @@ sub new { $ref->{html} = $ref->{data}->get('html_start.dthumb'); + if ( $conf{header} ) { + $ref->{html} .= read_file( $conf{header} ); + } + return bless( $ref, $obj ); } -- cgit v1.2.3