add title elements

(cherry picked from commit 5d8f6467dc)
Signed-off-by: Birte Kristina Friesel <derf@finalrewind.org>
This commit is contained in:
Cassidy Dingenskirchen 2024-01-22 18:53:27 +01:00 committed by Birte Kristina Friesel
parent 88866b3a29
commit 5b3cfd3355
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA
4 changed files with 20 additions and 7 deletions

View file

@ -154,6 +154,7 @@ sub profile {
$self->render(
'profile',
title => "travelynx: $name",
name => $name,
uid => $user->{id},
privacy => $user,
@ -313,6 +314,7 @@ sub journey_details {
}
$self->render(
'journey',
title => "travelynx: $title",
error => undef,
journey => $journey,
with_map => 1,
@ -470,6 +472,7 @@ sub user_status {
any => {
template => 'user_status',
name => $name,
title => "travelynx: $tw_data{title}",
privacy => $user,
journey => $status,
twitter => \%tw_data,

View file

@ -8,25 +8,25 @@ use Mojo::Base 'Mojolicious::Controller';
sub about {
my ($self) = @_;
$self->render('about');
$self->render('about', title => 'Über travelynx');
}
sub changelog {
my ($self) = @_;
$self->render('changelog');
$self->render('changelog', title => 'travelynx: Changelog');
}
sub imprint {
my ($self) = @_;
$self->render('imprint');
$self->render('imprint', title => 'travelynx: Impressum');
}
sub legend {
my ($self) = @_;
$self->render('legend');
$self->render('legend', title => 'travelynx: Legende' );
}
sub offline {

View file

@ -144,6 +144,7 @@ sub settings {
$self->param( tweet => 1 );
}
$self->stash ( title => 'travelynx × träwelling' );
$self->render(
'traewelling',
traewelling => $traewelling,

View file

@ -1185,7 +1185,7 @@ sub cancelled {
sub history {
my ($self) = @_;
$self->render( template => 'history' );
$self->render( template => 'history', title => 'travelynx: History' );
}
sub commute {
@ -1293,6 +1293,7 @@ sub commute {
journeys_by_month => \%journeys_by_month,
count_by_month => \%count_by_month,
total_journeys => $total,
title => 'travelynx: Reisen nach Station',
months => [
qw(Januar Februar März April Mai Juni Juli August September Oktober November Dezember)
],
@ -1390,6 +1391,7 @@ sub map_history {
template => 'history_map',
year => $year,
with_map => 1,
title => 'travelynx: Karte',
%{$res}
);
}
@ -1515,7 +1517,7 @@ sub year_in_review {
$self->render(
'year_in_review',
title => "travelynx Jahresrückblick $year",
title => "travelynx: Jahresrückblick $year",
year => $year,
stats => $stats,
review => $review,
@ -1586,6 +1588,7 @@ sub yearly_history {
},
any => {
template => 'history_by_year',
title => "travelynx: $year",
journeys => [@journeys],
year => $year,
have_review => $with_review,
@ -1649,6 +1652,8 @@ sub monthly_history {
month => $month
);
my $month_name = $months[ $month - 1 ];
$self->respond_to(
json => {
json => {
@ -1658,10 +1663,11 @@ sub monthly_history {
},
any => {
template => 'history_by_month',
title => "travelynx: $month_name $year",
journeys => [@journeys],
year => $year,
month => $month,
month_name => $months[ $month - 1 ],
month_name => $month_name,
statistics => $stats
}
);
@ -1736,6 +1742,9 @@ sub journey_details {
$self->render(
'journey',
title => sprintf( 'travelynx: %s %s %s am %s',
$journey->{type}, $journey->{line} // '', $journey->{no},
$journey->{sched_arrival}->strftime('%d.%m.%Y, %H:%M') ),
error => undef,
journey => $journey,
journey_visibility => $visibility,