mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: middleware implementation (#17730)
This commit is contained in:
21
examples/vweb/middleware/templates/base.html
Normal file
21
examples/vweb/middleware/templates/base.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@title</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<a href="/">Home</a>
|
||||
<a href="/admin/secrets">"/admin/secrets"</a>
|
||||
<a href="/admin/dynamic">"/admin/dynamic"</a>
|
||||
<a href="/early">Early exit</a>
|
||||
</nav>
|
||||
<main>
|
||||
@content
|
||||
</main>
|
||||
<footer></footer>
|
||||
</body>
|
||||
</html>
|
1
examples/vweb/middleware/templates/early.html
Normal file
1
examples/vweb/middleware/templates/early.html
Normal file
@ -0,0 +1 @@
|
||||
<p>Early exit</p>
|
3
examples/vweb/middleware/templates/index.html
Normal file
3
examples/vweb/middleware/templates/index.html
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
<h1>Hello </h1>
|
1
examples/vweb/middleware/templates/secret.html
Normal file
1
examples/vweb/middleware/templates/secret.html
Normal file
@ -0,0 +1 @@
|
||||
<p>Super secret stuff</p>
|
Reference in New Issue
Block a user