Skip to content

Commit

Permalink
links
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewMcArthur committed Jan 21, 2024
1 parent 77d7375 commit a245e75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ <h1>Welcome to QRStats!</h1>
<p>For example, if you wanted to track scans of a QR Code, for example.</p>
<h2>How it works</h2>
<p>You give us a URL, and we generate an ID. You can then share a URL
that looks like <a href="/redirect/9aa7e609">https://qrstats.drewmca.dev/redirect/9aa7e609</a>,
that looks like <a href="/redirect/id">https://qrstats.drewmca.dev/redirect/id</a>,
and when they visit the site, we'll write that down and redirect them to your URL.
</p>
<p>Then, you can visit <a href="/stats">https://qrstats.drewmca.dev/stats</a>, and see how many people have visited
<p>Then, you can visit <a href="/stats/id">https://qrstats.drewmca.dev/stats/id</a>, and see how many people have
visited
your site.</p>
<h2>Get Started</h2>
<p>You can get started by visiting <a href="/create">/create</a>.</p>
Expand Down
3 changes: 3 additions & 0 deletions src/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use crate::{util::serve_html, Stats, Target};
pub(crate) fn stats_view(stats: Stats) -> Result<Response> {
let body = format!(
"<h1>Stats</h1>
<a href=\"/\">Home</a>
<a href=\"/stats\">Back to Login</a>
<h2>ID</h2>
<p>{}</p>
<h2>Count</h2>
Expand All @@ -21,6 +23,7 @@ pub(crate) fn create_success(target: Target, id: String) -> Result<Response> {

let body = format!(
"<h1>Success!</h1>
<a href=\"/\">Home</a>
<p>New ID for URL(\"{}\") is: {}</p>
<p><a href=\"{}\">Redirect URL</a> (copy this into your QR generator</p>
<p><a href=\"{}\">Stats URL</a> (visit here, and enter your ID and password to view your stats)</p>",
Expand Down

0 comments on commit a245e75

Please sign in to comment.