Contruct a basic view template and layout
This commit is contained in:
parent
2026dfff7a
commit
98a44773d5
|
@ -5,8 +5,11 @@
|
|||
|
||||
use Mojolicious::Lite -signatures;
|
||||
|
||||
get '/', sub ($c) {
|
||||
$c->render(text => 'ayy... lmao')
|
||||
# Root redirect
|
||||
get '/', sub ($c) { $c->redirect_to('view') };
|
||||
|
||||
get '/view', sub ($c) {
|
||||
$c->render()
|
||||
};
|
||||
|
||||
app->start();
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Post::Text - <%= title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Post::Text</h1>
|
||||
<%= content %>
|
||||
</body>
|
||||
</html>
|
4
templates/view.html.ep
Normal file
4
templates/view.html.ep
Normal file
|
@ -0,0 +1,4 @@
|
|||
% layout 'main';
|
||||
% title 'View Threads';
|
||||
<h2><%= title %></h2>
|
||||
<p>Some threads here...</p>
|
Loading…
Reference in New Issue
Block a user