treebird/perl/main.pl
nekobit 588bfc2126 More progress
FossilOrigin-Name: 87d1a1fa92872a66a37bd82ea9cc2e687f4107c45855a115b49193953c9b770e
2022-07-27 05:10:07 +00:00

42 lines
878 B
Perl

use strict;
use warnings;
# Modules
use Template;
use l10n qw( %L10N );
use notifications qw( notification_compact );
use template_helpers qw( &to_template );
use status ();
# my $template = Template->new(
# {
# INTERPOLATE => 1,
# POST_CHOMP => 1,
# EVAL_PERL => 1,
# TRIM => 1
# });
sub base_page
{
my ($ssn,
$data,
$main,
$notifs) = @_;
my $result;
my %vars = (
prefix => '',
ssn => $ssn,
title => $L10N{'EN_US'}->{'APP_NAME'},
lang => sub { $L10N{'EN_US'}->{shift(@_)} },
main => $main,
sidebar_opacity => $ssn->{config}->{sidebar_opacity} / 255,
acct => $ssn->{account},
data => $data,
notifs => $notifs,
notification_compact => \&notification_compact,
);
to_template(\%vars, \$data->{'main.tt'});
}