barnold
f6b5a4cd16
Drop '/book' as a route, it's all pagey now.
2022-09-17 15:39:32 +01:00
barnold
bd3d4c5584
More on paging...
...
Moved the book page out of auth. Can now advance through pages.
2022-09-17 15:27:01 +01:00
barnold
e87ec1c05b
Make a start on paging.
2022-09-17 15:06:11 +01:00
barnold
32302755f3
Add a simple database query plus test.
2022-09-15 11:52:31 +01:00
barnold
2184cb2931
Remove the more experimental pages.
2022-09-15 09:05:57 +01:00
barnold
a2ca675bca
Add an account page.
2022-09-15 08:55:57 +01:00
barnold
bce8bbeb1c
Add an About page.
2022-09-15 08:52:05 +01:00
barnold
a3c8a8ae8e
Rename the Index controller to Home and move its template.
2022-09-15 08:43:17 +01:00
barnold
d2f57b307c
First attempt at a "protected" page...
...
The book page now requires login. Failing that, the app redirects to
the login form and on login redirects to the book page.
2022-09-14 20:30:01 +01:00
barnold
153aea86e9
Keep the attempted name on failed login.
2022-09-14 19:49:50 +01:00
barnold
f8645d294c
Use "flash" for failed login.
2022-09-14 19:22:33 +01:00
barnold
eb5a57bc21
Some template cleanup.
2022-09-14 19:05:57 +01:00
barnold
7f9fb06b13
Drop the '/' from calls to current_route and url_for...
...
because I suspect it's more "correct".
2022-09-14 18:07:58 +01:00
barnold
815054573e
More auth things.
2022-09-14 17:58:34 +01:00
barnold
cc07ccc099
Use session.
2022-09-14 11:56:03 +01:00
barnold
865c78c693
Add beginnings of login.
2022-09-14 11:45:49 +01:00
barnold
ace42f33ea
Add a book page...
...
This goes more with the flow by putting the template in a directory
named after the controller. The controller doesn't need to identify
the template.
2022-09-14 09:26:59 +01:00
barnold
76334e7db8
Make the condition more explicit...
...
by giving the route a name more communicative than an empty string.
Thanks to kraih[m] on #mojo for help.
2022-09-13 15:41:25 +01:00
barnold
4b08928ffc
Use a more mojo-idiomatic condition than $c->req->url->path.
2022-09-13 15:19:48 +01:00
barnold
df1234e913
Layout's home link shown conditionally.
2022-09-13 15:02:33 +01:00
barnold
e08685d350
Add links to index and layout templates.
2022-09-13 14:35:17 +01:00
barnold
f72d6faf2d
Tweak index template.
2022-09-13 10:38:36 +01:00
barnold
a017600c85
Use "mojo generate app MyApp" to add things...
...
Added files and directories as generated, based on
Mojolicious::Guides::Growing. The generator expects the root
directory to be named 'my_app', which mine wasn't. So I symlinked my
directory, ~/src/mojo-tutorial.barnold, to ~/src/my_app. Then 'cd
~/src; mojo generate app MyApp; unlink my_app'.
2022-09-13 09:52:55 +01:00
barnold
c6ecad9e8b
Use "./myapp inflate" to move the index template.
2022-09-13 08:59:04 +01:00
barnold
6865d7e120
Move the default layout into a template file.
2022-09-12 19:39:26 +01:00
barnold
bed6efd772
Render a template under 'templates/'...
...
...which has to be named something.html.ep. Why .ep?
2022-09-12 19:36:47 +01:00