Feat: better logs; login page
This commit is contained in:
		| @@ -8,6 +8,8 @@ | ||||
| 	<script src="https://unpkg.com/htmx.org@2.0.4" integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script> | ||||
| </head> | ||||
| <body> | ||||
| <div id=ancestor> | ||||
| 	{{template "login"}} | ||||
| 	<h1>Word Color Cards</h1> | ||||
| 	<div style="display: flex; gap: 1rem; flex-wrap: wrap; padding: 1rem;"> | ||||
| 		{{range $word, $color := .}} | ||||
| @@ -19,12 +21,13 @@ | ||||
| 			min-width: 100px; | ||||
| 			text-align: center; | ||||
| 			color: white; | ||||
| 			text-shadow: 0 2px 4px rgba(0,0,0,0.5); | ||||
| 			text-shadow: 0 2px 4px rgba(0,0,0,0.8); | ||||
| 		"> | ||||
| 			{{$word}} | ||||
| 		</div> | ||||
| 		{{end}} | ||||
| 	</div> | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| {{end}} | ||||
|   | ||||
							
								
								
									
										16
									
								
								components/login.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								components/login.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| {{define "login"}} | ||||
|     <div id="logindiv"> | ||||
|         <form class="space-y-6" hx-post="/login" hx-target="#ancestor"> | ||||
|           <div> | ||||
|             <label For="username" class="block text-sm font-medium leading-6 text-white-900">tell us your username</label> | ||||
|             <div class="mt-2"> | ||||
|               <input id="username" name="username" hx-target="#login_notice" hx-swap="outerHTML" hx-post="/check/name" hx-trigger="input changed delay:400ms" autocomplete="username" required class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 text-center"/> | ||||
|             </div> | ||||
| 	<div id="login_notice">this name looks available</div> | ||||
|           </div> | ||||
|           <div> | ||||
|             <button type="submit" class="flex w-full 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">Sign in</button> | ||||
|           </div> | ||||
|         </form> | ||||
|     </div> | ||||
| {{end}} | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder