treebird/perl/main.pl
nekobit 5904362b1a Search all and searchbox tweaks
FossilOrigin-Name: 4130b59a244b1e0a82023c9e18f50ebe731348ecc06ad3b1df1e1390a455636c
2022-08-14 05:37:49 +00:00

47 lines
992 B
Perl

use strict;
use warnings;
# Modules
use Template;
use l10n qw( &lang %L10N );
use notifications qw( generate_notification_compact content_notifications );
use template_helpers qw( &to_template );
use timeline;
use icons 'get_icon';
use status;
use account;
use lists;
use search;
# 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 => \&lang,
main => $main,
icon => \&get_icon,
sidebar_opacity => $ssn->{config}->{sidebar_opacity} / 255,
acct => $ssn->{account},
data => $data,
notifs => $notifs,
notification_compact => \&generate_notification_compact,
);
to_template(\%vars, \$data->{'main.tt'});
}