mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-07-01 05:26:07 +00:00
initialized project uses template
This commit is contained in:
parent
3790745c0d
commit
844c7fa05b
@ -153,6 +153,14 @@ 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,
|
||||
|
@ -26,6 +26,7 @@ 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",
|
||||
|
@ -1,6 +1,8 @@
|
||||
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
|
||||
|
@ -1,13 +1,3 @@
|
||||
<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" />
|
||||
</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: -->
|
||||
@ -18,5 +8,3 @@
|
||||
@partial init/content(message: $.welcome_message)
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
14
demo/src/app/views/layouts/default.zmpl
Normal file
14
demo/src/app/views/layouts/default.zmpl
Normal file
@ -0,0 +1,14 @@
|
||||
<!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>
|
Loading…
x
Reference in New Issue
Block a user