Contruct a basic view template and layout
This commit is contained in:
parent
2026dfff7a
commit
98a44773d5
|
@ -5,8 +5,11 @@
|
||||||
|
|
||||||
use Mojolicious::Lite -signatures;
|
use Mojolicious::Lite -signatures;
|
||||||
|
|
||||||
get '/', sub ($c) {
|
# Root redirect
|
||||||
$c->render(text => 'ayy... lmao')
|
get '/', sub ($c) { $c->redirect_to('view') };
|
||||||
|
|
||||||
|
get '/view', sub ($c) {
|
||||||
|
$c->render()
|
||||||
};
|
};
|
||||||
|
|
||||||
app->start();
|
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 a new issue