Compare commits

..

No commits in common. "848c91af2ca67094b5bef10c422d7921e6bcc61f" and "3790745c0df39aa9689c261be093c18f40d9c80e" have entirely different histories.

5 changed files with 21 additions and 34 deletions

View File

@ -153,14 +153,6 @@ pub fn run(
null,
);
try copySourceFile(
allocator,
install_dir,
"demo/src/app/views/layouts/default.zmpl",
"src/app/views/layouts/default.zmpl",
null,
);
try copySourceFile(
allocator,
install_dir,

View File

@ -26,7 +26,6 @@ pub fn initDataModule(build: *std.Build) !*std.Build.Module {
"demo/src/app/views/init.zig",
"demo/src/app/views/init/index.zmpl",
"demo/src/app/views/init/_content.zmpl",
"demo/src/app/views/layouts/default.zmpl",
"demo/public/jetzig.png",
"demo/public/zmpl.png",
"demo/public/favicon.ico",

View File

@ -1,8 +1,6 @@
const std = @import("std");
const jetzig = @import("jetzig");
pub const layout = "default";
/// `src/app/views/root.zig` represents the root URL `/`
/// The `index` view function is invoked when when the HTTP verb is `GET`.
/// Other view types are invoked either by passing a resource ID value (e.g. `/1234`) or by using

View File

@ -1,10 +1,22 @@
<div class="text-center pt-10 m-auto">
<!-- If present, renders the `message_param` response data value, add `?message=hello` to the
URL to see the output: -->
<h2 class="param text-3xl text-[#f7931e]">{{$.message_param}}</h2>
<html>
<head>
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<!-- Renders `src/app/views/init/_content.zmpl`, passing in the `welcome_message` field from template data. -->
<div>
@partial init/content(message: $.welcome_message)
</div>
</div>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<div class="text-center pt-10 m-auto">
<!-- If present, renders the `message_param` response data value, add `?message=hello` to the
URL to see the output: -->
<h2 class="param text-3xl text-[#f7931e]">{{$.message_param}}</h2>
<!-- Renders `src/app/views/init/_content.zmpl`, passing in the `welcome_message` field from template data. -->
<div>
@partial init/content(message: $.welcome_message)
</div>
</div>
</body>
</html>

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="/styles.css" />
<title>Jetzig App</title>
</head>
<body>
{{zmpl.content}}
</body>
</html>