purr/views/index.hamlet

59 lines
1.7 KiB
Plaintext
Raw Normal View History

$doctype 5
<html>
<head>
<title>Purr
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://unpkg.com/htmx.org@1.7.0" integrity="sha384-EzBXYPt0/T6gxNp0nuPtLkmRpmDBbjg6WmCUZRLXBBwYYmwAUxzlSGej0ARHX0Bo" crossorigin="anonymous">
<link rel="stylesheet" href="/style.css">
<body>
<pre #asciiCat .asciiCat>
_._ _,-'""`-._
\ (,-.`._,'( |\`-/|
\ `-.-' \ )-`( , o o)
\ `- \`_`"'-
<div #content .content>
<div #title .title>
<h1>
<a #titleLink .titleLink href="/">Purr
<div #pwUtils .pwUtils>
<div #requestedPw .requestedPw>
$maybe pw <- password
<p>Here's the secret for /pw/#{link}:
<h2 .pwResult>#{pw}
$nothing
$if (link == "/")
<p .emptyReq>
$else
<p>No secret available at /pw/#{link}
<div #shareNew .shareNew>
<p>
<input .mainInput
name="newPw"
type="text"
placeholder="Enter a Secret to Share"
/>
<button .mainButton
hx-post="/newpw"
hx-target="#requestedPw"
hx-swap="outerHTML"
hx-include="[name='newPw']"
/>
Share Secret
<div #requestNew .requestNew>
<p>
<input .mainInput
name="userLink"
type="text"
placeholder="Enter a Link to View Secret"
/>
<button .mainButton
hx-post="/pw"
hx-target="#requestedPw"
hx-swap="outerHTML"
hx-include="[name='userLink']"
/>
Get Secret