1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 04:17:03 +00:00

directly support embed.FS and fs.FS on view engines

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-09-21 23:26:12 +03:00
parent 5bc0796548
commit 95a8110f1e
12 changed files with 162 additions and 17 deletions

View File

@@ -0,0 +1,12 @@
<html>
<head>
<title>Layout</title>
</head>
<body>
<h1>This is the global layout</h1>
<br />
<!-- Render the current template here -->
{{ yield }}
</body>
</html>

View File

@@ -0,0 +1,12 @@
<html>
<head>
<title>my Layout</title>
</head>
<body>
<h1>This is the layout for the /my/ and /my/other routes only</h1>
<br />
<!-- Render the current template here -->
{{ yield }}
</body>
</html>

View File

@@ -0,0 +1,7 @@
<div style="background-color: black; color: blue">
<h1>Page 1 {{ greet "iris developer"}}</h1>
{{ render "partials/page1_partial1.html"}}
</div>

View File

@@ -0,0 +1,3 @@
<div style="background-color: white; color: red">
<h1>Page 1's Partial 1</h1>
</div>