Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 1 | package Korap::Tutorial; |
2 | use Mojo::Base 'Mojolicious::Controller'; | ||||
3 | |||||
4 | sub page { | ||||
5 | my $c = shift; | ||||
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 6 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 7 | if ($c->param('embedded')) { |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 8 | $c->layout('snippet'); |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 9 | $c->stash(embedded => 1); |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 10 | } |
11 | else { | ||||
12 | $c->layout('default'); | ||||
13 | }; | ||||
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 14 | $c->title('KorAP'); |
15 | |||||
16 | my $page = $c->stash('tutorial'); | ||||
17 | |||||
18 | $c->render(template => 'tutorial'); | ||||
19 | }; | ||||
20 | |||||
21 | 1; | ||||
22 | |||||
23 | |||||
24 | __END__ |