Skip to content

Commit

Permalink
add home and privacy pages
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed May 16, 2024
1 parent c859dbf commit 22f206b
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 23 deletions.
21 changes: 0 additions & 21 deletions PRIVACY.md

This file was deleted.

13 changes: 13 additions & 0 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ fn routes() -> Vec<rocket::Route> {
auth,
callback,
logout,
home,
privacy,
]
}

Expand Down Expand Up @@ -137,3 +139,14 @@ fn logout(jar: &CookieJar<'_>) -> Redirect {
jar.remove_private("id");
Redirect::to(uri!(unauthed_index))
}

#[get("/home")]
fn home() -> Template {
Template::render("home", ())
}

#[get("/privacy")]
fn privacy() -> Template {
Template::render("privacy", ())
}

2 changes: 1 addition & 1 deletion static/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions templates/home.html.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hexy</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="/static/favicon.png">
<link href="/static/style.css" rel="stylesheet"/>
</head>
<body>

<div id="info" class="fixed inset-0 flex bg-black/20 justify-center items-center z-50">
<div id="info-inner" class="w-4/5 md:w-[50ch] bg-white/90 p-8 rounded-lg shadow-lg">
<div class="flex flex-col items-center mb-4">
<div class="flex items-center">
<img src="static/logo256.png" class="h-12 mr-4" alt="Hexy Logo">
<h2 class="text-2xl font-bold">Hexy</h2>
</div>
</div>
<p class="my-4">Hexy is an app to help you explore your Strava and Garmin data on a single map, and sync between the two.</p>
<p class="my-4">As a bonus, you get to fill out hexagons with every workout.</p>
<p class="my-8 font-bold">Go to the <a class="font-bold text-blue-800" href="/">app</a>!</p>
<p class="mt-4">You can have a look at the source code <a class="font-bold text-blue-800" href="https://github.com/carderne/hexy">here</a>.</p>
<p class="mt-4">And the privacy policy <a class="font-bold text-blue-800" href="/privacy">here</a>.</p>
</div>
</div>

</body>
</html>
Loading

0 comments on commit 22f206b

Please sign in to comment.