Skip to content

Commit

Permalink
webui/tips: document flow for submitting new cases
Browse files Browse the repository at this point in the history
  • Loading branch information
RaghavSood committed Jun 14, 2024
1 parent e652594 commit 173a82d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/footer.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<footer class="bg-gray-700 mt-8 p-4 text-center mt-auto">
<p>Built by <a href="https://raghavsood.com" target="_blank" class="hover:underline hover:text-slate-200 hover:decoration-dotted text-sky-400/70">Raghav Sood</a>.</p>
<p>burned.money is licensed under <span class="inline-flex"><a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer" class="hover:underline hover:text-slate-200 hover:decoration-dotted text-sky-400/70">CC BY 4.0</a>.</span></p>
<p><a href="/tips" class="hover:underline hover:text-slate-200 hover:decoration-dotted text-sky-400/70">Submit a tip</a> on lost or destroyed BTC not indexed here.</p>
<p><a href="mailto:[email protected]" class="hover:underline hover:text-slate-200 hover:decoration-dotted text-sky-400/70">Contact</a> me if you have any questions or suggestions.</p>
</footer>
{{ end }}

2 changes: 2 additions & 0 deletions templates/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<a href="/schedule" class="hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Emission Schedule</a>
</div>
<div class="hidden pb-4 pt-4 pr-4 lg:flex lg:items-center lg:justify-center lg:space-x-4" id="nav-links">
<a href="/tips" class="hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Tips</a>
<a href="/why" class="hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Why?</a>
<a href="/methodology" class="hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">How?</a>
</div>
Expand All @@ -29,6 +30,7 @@
<a href="/opreturns" class="block hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">OP_RETURNs</a>
<a href="/transactions" class="block hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Transactions</a>
<a href="/schedule" class="block hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Emission Schedule</a>
<a href="/tips" class="block hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Tips</a>
<a href="/why" class="block hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">Why?</a>
<a href="/methodology" class="block hover:underline hover:text-slate-200 text-sky-400/70 hover:decoration-dotted nav-link">How?</a>
</div>
Expand Down
21 changes: 21 additions & 0 deletions templates/tips.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{ define "content" }}
<div class="lg:container mx-auto p-4">
<h1 class="text-2xl font-semibold mb-4">Submit a Tip</h1>
<div class="text-pretty border rounded-lg border-slate-700 bg-slate-950/30 p-4">
<p class="mb-4">While every effort is made to keep this list up to date, it is impossible to pick up on all losses without your help.</p>
<p class="mb-4">If you know of a transaction or address that destroys BTC and isn't covered here (simply try searching for it to check), you can submit a tip and help keep this list accurate and up to date.</p>
<p class="mb-4">If you've personally lost access to a BTC address or wallet, or know someone who has, you can also submit a tip to help others avoid the same fate. Wallet ownership and provenance is kept confidential by default.</p>
<h1 class="text-xl font-medium mb-4 mt-4">Information to include</h1>
<p>Try and include as much information as possible, such as:</p>
<ul class="list-disc ml-4 mb-4">
<li>Transaction ID</li>
<li>Address</li>
<li>Amount</li>
<li>A description of the loss if it isn't a common reason</li>
</ul>
<h1 class="text-xl font-medium mb-4 mt-4">Submitting a tip</h1>
<p class=mb-4>Submit a tip over on the <a href="https://github.com/RaghavSood/btcsupply/issues" target="_blank" class="text-sky-400/70 hover:underline hover:decoration-dotted hover:text-slate-200">GitHub Repository</a>. Alternatively, if you wish to contact me over a more private channel, you can submit information via email at <a href="mailto:[email protected]" class="text-sky-400/70 hover:underline hover:decoration-dotted hover:text-slate-200">[email protected]</a>.</p>
</div>
</div>
{{ end }}

14 changes: 14 additions & 0 deletions webui/webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func (w *WebUI) Serve() {
router.GET("/opreturns", w.OpReturns)
router.GET("/opreturn/:opreturn", w.OpReturn)

router.GET("/tips", w.Tips)
router.GET("/why", w.Why)
router.GET("/methodology", w.Methodology)
router.GET("/schedule", w.HalvingSchedule)
Expand Down Expand Up @@ -103,6 +104,19 @@ func (w *WebUI) Index(c *gin.Context) {
}
}

func (w *WebUI) Tips(c *gin.Context) {
tmpl := templates.New()
err := tmpl.Render(c.Writer, "tips.tmpl", map[string]interface{}{
"Title": "Tips - Submit a BTC loss",
})

if err != nil {
log.Error().Err(err).Msg("Failed to render template")
c.AbortWithError(http.StatusInternalServerError, err)
return
}
}

func (w *WebUI) Why(c *gin.Context) {
tmpl := templates.New()
err := tmpl.Render(c.Writer, "why.tmpl", map[string]interface{}{
Expand Down

0 comments on commit 173a82d

Please sign in to comment.