Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
テンプレートエンジンを使って簡単なindex.htmlを表示できるようにする
- Loading branch information
1 parent
99b951a
commit d605079
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ edition = "2021" | |
|
||
[dependencies] | ||
actix-web = "4" | ||
askama = "0.12.1" | ||
askama_actix = "0.14.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="jp"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script src="https://unpkg.com/htmx.org@1.9.6"></script> | ||
<title>Document</title> | ||
</head> | ||
|
||
<body> | ||
<div>hello, {{ name }} !!!</div> | ||
<button hx-get="/hey" hx-swap="innerHTML" hx-target="#target">Click Me</button> | ||
<div id="target"></div> | ||
</body> | ||
</html> |