diff --git a/Build.PL b/Build.PL index a5d59fb5ccb..f15b42def4e 100755 --- a/Build.PL +++ b/Build.PL @@ -12,18 +12,19 @@ my $build = Module::Build->new( dist_author => 'Divinum Officium', dist_abstract => 'Generates texts for the traditional Roman liturgy.', requires => { - 'perl' => '5.10.1', - 'CGI' => 0, - 'CGI::Carp' => 0, - 'CGI::Cookie' => 0, - 'Encode' => 0, - 'File::Basename' => 0, - 'FindBin' => 0, - 'Time::Local' => 0, - 'Test::Cmd' => 0, - 'Test::Carp' => 0, - 'DateTime' => 0, - 'List::MoreUtils' => 0, + 'perl' => '5.10.1', + 'CGI' => 0, + 'CGI::Carp' => 0, + 'CGI::Cookie' => 0, + 'Encode' => 0, + 'File::Basename' => 0, + 'FindBin' => 0, + 'Time::Local' => 0, + 'Test::Cmd' => 0, + 'Test::Carp' => 0, + 'DateTime' => 0, + 'List::MoreUtils' => 0, + 'Template::Semantic' => 0, }, ); diff --git a/Dockerfile b/Dockerfile index 1d442bfe051..c50f3d7e2fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM perl:5.28-slim +FROM perl:5.28 MAINTAINER Ben Yanke # Set envs @@ -32,6 +32,10 @@ RUN mkdir -p /var/run/apache2 /var/lock/apache2 /var/log/apache2 ; chown -R www- WORKDIR /var/www COPY --chown=www-data:www-data web /var/www/web +# Update dependencies +COPY --chown=www-data:www-data Build.PL /var/www/Build.PL +RUN cpanm . + # Write build info to be available at $url/buildinfo RUN echo "Build date: `date`" > /var/www/web/buildinfo diff --git a/web/cgi-bin/horas/horascommon.pl b/web/cgi-bin/horas/horascommon.pl index cc0db1290a4..c67a3e2c34a 100644 --- a/web/cgi-bin/horas/horascommon.pl +++ b/web/cgi-bin/horas/horascommon.pl @@ -272,7 +272,7 @@ sub getrank { if (-e "$datafolder/Latin/$tn.txt" || $dayname[0] =~ /Epi0/i || ($transfer{$nday}) =~ /tempora/i) { $dofw = $dayofweek; - if ($hora =~ /(vespera|completorium)/i && $testmode !~ /(Saint|Common)/i) { + if ($hora =~ /(Vespera|Completorium)/i && $testmode !~ /(Saint|Common)/i) { my $a = getweek(1); my @a = split('=', $a); $dn[0] = $a[0]; @@ -427,7 +427,7 @@ sub getrank { if (exists($transfer{$cday}) && $transfer{$cday} !~ /Tempora/i) { $cday = $transfer{$cday}; } if ($tname =~ /Nat/ && $cday =~ /Nat/) { $cday = 'none'; } - if ($hora =~ /(vespera|completorium)/i) { + if ($hora =~ /(Vespera|Completorium)/i) { if ($cday !~ /(tempora|DU)/i) { $cday = "$kalendar{$cday}"; } my $cdayd = $cday; if (!$cdayd || $cdayd !~ /([0-9]+\-[0-9]+)/) { $cdayd = nextday($month, $day, $year); } diff --git a/web/cgi-bin/horas/officium.pl b/web/cgi-bin/horas/officium.pl index 12d1ac3e8c1..a32d35098d0 100755 --- a/web/cgi-bin/horas/officium.pl +++ b/web/cgi-bin/horas/officium.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use utf8; # Name : Laszlo Kiss diff --git a/web/cgi-bin/horas/webdia.pl b/web/cgi-bin/horas/webdia.pl index 54072c1b6de..050907f34e5 100644 --- a/web/cgi-bin/horas/webdia.pl +++ b/web/cgi-bin/horas/webdia.pl @@ -7,6 +7,9 @@ #use warnings; #use strict "refs"; #use strict "subs"; + +use Template::Semantic; + my $a = 4; #*** htmlHead($title, $flag) @@ -16,30 +19,8 @@ sub htmlHead { my $flag = shift; if (!$title) { $title = ' '; } - # print "Content-type: text/html; charset=ISO-8859-1\n\n"; print "Content-type: text/html; charset=utf-8\n\n"; - print << "PrintTag"; - - - - - - - - $title -PrintTag + print Template::Semantic->process("../../template/home.html", { 'TITLE' => $title }); if ($flag == 2) { horasjs(); } print ""; } diff --git a/web/template/home.html b/web/template/home.html new file mode 100644 index 00000000000..0d8474c8545 --- /dev/null +++ b/web/template/home.html @@ -0,0 +1,20 @@ + + + + + + + + Divinum Officium