Skip to content

Commit 79ef8e7

Browse files
committed
add some pages, routes, and evolve the content
1 parent 5bf020a commit 79ef8e7

File tree

8 files changed

+130
-12
lines changed

8 files changed

+130
-12
lines changed

v3/server/pages.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,36 @@ async def home_page():
2525
return { }
2626

2727

28+
@APP.get('/profile')
29+
@APP.use_template('templates/profile.ezt')
30+
async def profile_page():
31+
return { }
32+
33+
34+
@APP.get('/settings')
35+
@APP.use_template('templates/settings.ezt')
36+
async def settings_page():
37+
return { }
38+
39+
40+
@APP.get('/sign-out')
41+
async def sign_out():
42+
### clear the cookie?
43+
return '', 204
44+
45+
46+
@APP.get('/privacy')
47+
@APP.use_template('templates/privacy.ezt')
48+
async def privacy_page():
49+
return { }
50+
51+
52+
@APP.get('/about')
53+
@APP.use_template('templates/about.ezt')
54+
async def about_page():
55+
return { }
56+
57+
2858
# Route to serve static files (CSS and JS)
2959
@APP.route('/static/<path:filename>')
3060
async def serve_static(filename):

v3/server/templates/about.ezt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Apache STeVe: Profile</title>
7+
<link href="/static/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
8+
</head>
9+
<body>
10+
[include "header.ezt"]
11+
<div class="container">
12+
<h1>Profile</h1>
13+
<p>
14+
TBD
15+
</p>
16+
</div>
17+
18+
[include "footer.ezt"]
19+
<script src="/static/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"></script>
20+
</body>
21+
</html>

v3/server/templates/footer.ezt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<footer class="bg-light text-center text-lg-start py-3">
1+
<footer class="bg-light text-center text-lg-start py-3 my-5 border-top border-2">
22
<div class="container">
33
<div class="row">
44
<div class="col-12">

v3/server/templates/header.ezt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<nav class="navbar navbar-expand-lg navbar-light bg-light">
1+
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
22
<div class="container-fluid">
33
<!-- Left-aligned icon and title -->
4-
<a class="navbar-brand" href="#">
5-
<img src="https://via.placeholder.com/30" alt="Logo" width="30" height="30" class="d-inline-block align-text-top">
6-
Voter App
4+
<a class="navbar-brand" href="/">
5+
<img src="https://www.apache.org/foundation/press/kit/feather.png" alt="Logo" width="30" height="30" class="d-inline-block align-text-top">
6+
Apache STeVe
77
</a>
88
<!-- Toggler for mobile view -->
99
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
@@ -17,10 +17,10 @@
1717
John Doe
1818
</a>
1919
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
20-
<li><a class="dropdown-item" href="#">Profile</a></li>
21-
<li><a class="dropdown-item" href="#">Settings</a></li>
20+
<li><a class="dropdown-item" href="/profile">Profile</a></li>
21+
<li><a class="dropdown-item" href="/settings">Settings</a></li>
2222
<li><hr class="dropdown-divider"></li>
23-
<li><a class="dropdown-item" href="#">Sign Out</a></li>
23+
<li><a class="dropdown-item" href="/sign-out">Sign Out</a></li>
2424
</ul>
2525
</li>
2626
</ul>

v3/server/templates/home.ezt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Apache STeVe</title>
7-
<!-- Bootstrap CSS -->
87
<link href="/static/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
98
</head>
109
<body>
1110
[include "header.ezt"]
1211
<div class="container">
13-
<h1>Apache STeVe</h1>
14-
<p>
12+
<p class="my-3">
1513
Welcome! What are you here for? Select an option below.
1614
</p>
1715
<div class="row justify-content-center">
@@ -49,10 +47,16 @@
4947
</a>
5048
</div>
5149
</div>
50+
51+
<p>
52+
This site is being served using the
53+
<a href="https://steve.apache.org/">Apache STeVe</a>
54+
codebase, from the
55+
<a href="https://www.apache.org/">Apache Software Foundation</a>.
56+
</p>
5257
</div>
5358

5459
[include "footer.ezt"]
55-
<!-- Bootstrap JS (bundle includes Popper) -->
5660
<script src="/static/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"></script>
5761
</body>
5862
</html>

v3/server/templates/privacy.ezt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Apache STeVe: Profile</title>
7+
<link href="/static/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
8+
</head>
9+
<body>
10+
[include "header.ezt"]
11+
<div class="container">
12+
<h1>Profile</h1>
13+
<p>
14+
TBD
15+
</p>
16+
</div>
17+
18+
[include "footer.ezt"]
19+
<script src="/static/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"></script>
20+
</body>
21+
</html>

v3/server/templates/profile.ezt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Apache STeVe: Profile</title>
7+
<link href="/static/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
8+
</head>
9+
<body>
10+
[include "header.ezt"]
11+
<div class="container">
12+
<h1>Profile</h1>
13+
<p>
14+
TBD
15+
</p>
16+
</div>
17+
18+
[include "footer.ezt"]
19+
<script src="/static/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"></script>
20+
</body>
21+
</html>

v3/server/templates/settings.ezt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Apache STeVe: Profile</title>
7+
<link href="/static/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
8+
</head>
9+
<body>
10+
[include "header.ezt"]
11+
<div class="container">
12+
<h1>Profile</h1>
13+
<p>
14+
TBD
15+
</p>
16+
</div>
17+
18+
[include "footer.ezt"]
19+
<script src="/static/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"></script>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)