Beginnings of HTMX frontend interaction, able to request particular PWs by link names and patch the DOM appropriately
This commit is contained in:
		| @ -1,8 +1,14 @@ | ||||
| <html> | ||||
|   <head> | ||||
|     <title>Purr | ||||
|     <script src="https://unpkg.com/htmx.org@1.7.0" integrity="sha384-EzBXYPt0/T6gxNp0nuPtLkmRpmDBbjg6WmCUZRLXBBwYYmwAUxzlSGej0ARHX0Bo" crossorigin="anonymous"> | ||||
|   <body> | ||||
|     $maybe pw <- password | ||||
|       <p>Here's the password for #{link}: #{pw} | ||||
|     $nothing | ||||
|       <p>No password available at https://purr.eversole.co/#{link} | ||||
|     <h1>Welcome to Purr! | ||||
|     <p #requestedPw>No password currently requested. | ||||
|     <p>Ask for the <input name="userLink" type="text"/> password | ||||
|     <button hx-post="/pw"  | ||||
|       hx-target="#requestedPw"  | ||||
|       hx-swap="outerHTML"  | ||||
|       hx-include="[name='userLink']" | ||||
|     /> | ||||
|       Get Password! | ||||
|  | ||||
							
								
								
									
										5
									
								
								views/pw.hamlet
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								views/pw.hamlet
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
|   <div #requestedPw> | ||||
|     $maybe pw <- password | ||||
|       <p>Here's the password for #{link}: #{pw} | ||||
|     $nothing | ||||
|       <p>No password available at https://purr.eversole.co/#{link} | ||||
		Reference in New Issue
	
	Block a user