diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/add_action_form.html | 7 | ||||
-rw-r--r-- | components/index.html | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/components/add_action_form.html b/components/add_action_form.html index 70403dc..95c869f 100644 --- a/components/add_action_form.html +++ b/components/add_action_form.html @@ -1,5 +1,6 @@ {{define "actionform"}} <div id="actionform"> + <button button id="create-form-btn" type="submit" class="justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" hx-get="/hideform" hx-target="#actionform">HIDE FORM</button> <h1>Add action</h1> <form method="POST"> <label>Name:</label><br /> @@ -16,3 +17,9 @@ </form> </div> {{end}} + +{{define "showformbtn"}} +<div id="actionform"> + <button button id="create-form-btn" type="submit" class="justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" hx-get="/showform" hx-target="#actionform">SHOW FORM</button> +</div> +{{end}} diff --git a/components/index.html b/components/index.html index 6848f1a..b3da4ea 100644 --- a/components/index.html +++ b/components/index.html @@ -6,6 +6,7 @@ <meta charset="utf-8" name="viewport" content="width=device-width,initial-scale=1"/> <link rel="stylesheet" type="text/css" href="/assets/style.css" /> <link rel="icon" sizes="64x64" href="/assets/favicon/wolfhead_negated.ico" /> + <script src="https://unpkg.com/htmx.org@1.9.11" integrity="sha384-0gxUXCCR8yv9FM2b+U3FDbsKthCI66oH5IA9fHppQq9DDMHuMauqq1ZHBpJxQ0J0" crossorigin="anonymous"></script> </head> <body> <div id="ancestor"> @@ -14,7 +15,7 @@ {{ template "UserScore" . }} </div> <div> - {{ template "actionform" }} + {{ template "showformbtn" }} </div> </div> </body> |