Loading lib/Travelynx/Controller/Traveling.pm +30 −1 Original line number Diff line number Diff line Loading @@ -33,10 +33,39 @@ sub user_status { if ( $user and ( $user->{public_level} & 0x02 ) ) { my $status = $self->get_user_status( $user->{id} ); my %tw_data = ( card => 'summary', site => '@derfnull', image => $self->url_for('/static/icons/icon-512x512.png') ->to_abs->scheme('https'), ); if ( $status->{checked_in} ) { $tw_data{title} = "${name} ist unterwegs"; $tw_data{description} = sprintf( '%s %s von %s nach %s', $status->{train_type}, $status->{train_line} // $status->{train_no}, $status->{dep_name}, $status->{arr_name} // 'irgendwo' ); if ( $status->{real_arrival}->epoch ) { $tw_data{description} .= $status->{real_arrival} ->strftime(' – Ankunft gegen %H:%M Uhr'); } } else { $tw_data{title} = "${name} ist gerade nicht eingecheckt"; $tw_data{description} = "Letztes Fahrtziel: $status->{arr_name}"; } $self->render( 'user_status', name => $name, journey => $status journey => $status, twitter => \%tw_data, ); } else { Loading templates/layouts/default.html.ep +3 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ <meta name="description" content="Checkin-Service und Verspätungslog für Bahnfahrten"> <meta name="theme-color" content="#673ab7"> <meta name="apple-mobile-web-app-title" content="Travelynx"> % while (my ($key, $value) = each %{stash('twitter') // {}}) { <meta name="twitter:<%= $key %>" content="<%= $value %>"> % } % my $av = 'v25'; # asset version <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-32x32.png" sizes="32x32"> Loading Loading
lib/Travelynx/Controller/Traveling.pm +30 −1 Original line number Diff line number Diff line Loading @@ -33,10 +33,39 @@ sub user_status { if ( $user and ( $user->{public_level} & 0x02 ) ) { my $status = $self->get_user_status( $user->{id} ); my %tw_data = ( card => 'summary', site => '@derfnull', image => $self->url_for('/static/icons/icon-512x512.png') ->to_abs->scheme('https'), ); if ( $status->{checked_in} ) { $tw_data{title} = "${name} ist unterwegs"; $tw_data{description} = sprintf( '%s %s von %s nach %s', $status->{train_type}, $status->{train_line} // $status->{train_no}, $status->{dep_name}, $status->{arr_name} // 'irgendwo' ); if ( $status->{real_arrival}->epoch ) { $tw_data{description} .= $status->{real_arrival} ->strftime(' – Ankunft gegen %H:%M Uhr'); } } else { $tw_data{title} = "${name} ist gerade nicht eingecheckt"; $tw_data{description} = "Letztes Fahrtziel: $status->{arr_name}"; } $self->render( 'user_status', name => $name, journey => $status journey => $status, twitter => \%tw_data, ); } else { Loading
templates/layouts/default.html.ep +3 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ <meta name="description" content="Checkin-Service und Verspätungslog für Bahnfahrten"> <meta name="theme-color" content="#673ab7"> <meta name="apple-mobile-web-app-title" content="Travelynx"> % while (my ($key, $value) = each %{stash('twitter') // {}}) { <meta name="twitter:<%= $key %>" content="<%= $value %>"> % } % my $av = 'v25'; # asset version <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-32x32.png" sizes="32x32"> Loading