purr/views/index.hamlet
James Eversole 1718e69533 Squashed commit of the following:
commit 9aaa5307e7671bc8bcc444733a6e38999f346772
Author: James Eversole <james@eversole.co>
Date:   Mon Jul 18 16:03:43 2022 -0500

    Completed migration to SQLite, full feature parity with original Mongo/Couch implementations. Added ability to submit new passwords with full frontend functionality. Generation of random links now functions as expected and Unix Epoch Timestamps are now included in DB entries.
2022-07-18 16:04:10 -05:00

59 lines
1.7 KiB
Plaintext

$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="newSec"
type="text"
placeholder="Enter a Secret to Share"
/>
<button .mainButton
hx-post="/new"
hx-target="#requestedPw"
hx-swap="outerHTML"
hx-include="[name='newSec']"
/>
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