Skip to content
Browse files

Add tabs for hunt status, clues and teams pages

  • Loading branch information...
1 parent d7abd9a commit 90db0321d09e9048e3f624b1de58f854c4cc808d @karenc committed Aug 6, 2011
Showing with 48 additions and 5 deletions.
  1. +2 −0 src/controller.py
  2. +24 −0 src/static/css/main.css
  3. +7 −0 src/templates/clues.html
  4. +8 −5 src/templates/hunt.html
  5. +7 −0 src/templates/teams.html
View
2 src/controller.py
@@ -87,6 +87,7 @@ def get(self, hunt_id):
return
clues = list(Clue.all().filter('hunt =', hunt))
self.response.out.write(utils.render('templates/clues.html', {
+ 'hunt': hunt,
'hunt_name': hunt.name,
'started': bool(hunt.started),
'clues': clues,
@@ -128,6 +129,7 @@ def get(self, hunt_id):
return
teams = list(Team.all().filter('hunt = ', hunt))
self.response.out.write(utils.render('templates/teams.html', {
+ 'hunt': hunt,
'hunt_name': hunt.name,
'started': bool(hunt.started),
'teams': teams,
View
24 src/static/css/main.css
@@ -54,3 +54,27 @@ FORM {
padding: 10px;
margin-top: 3px;
}
+
+.tabs {
+ margin-top: 5px;
+}
+
+.tabs A {
+ text-decoration: none;
+ padding: 5px 10px;
+ background-color: #9BE;
+ border: 2px solid #9BE;
+ margin-right: 5px;
+ font-size: 15px;
+}
+
+.tabs A.active {
+ background-color: white;
+ border: 0;
+}
+
+.tab-content {
+ margin: 5px 0;
+ padding: 10px 5px;
+ border-top: 2px solid #9BE;
+}
View
7 src/templates/clues.html
@@ -10,6 +10,12 @@
{% include "header.html" %}
<h1>Clues for {{ hunt_name }}</h1>
<div id="content">
+ <div class="tabs">
+ <a href="/hunt/{{ hunt.key.id }}">Status</a>
+ <a class="active" href="/hunt/{{ hunt.key.id }}/clues">Clues</a>
+ <a href="/hunt/{{ hunt.key.id }}/teams">Teams</a>
+ </div>
+ <div class="tab-content">
{% if started %}
<form action="" method="post">
<table>
@@ -40,5 +46,6 @@
</script>
{% endif %}
</div>
+ </div>
</body>
</html>
View
13 src/templates/hunt.html
@@ -7,18 +7,21 @@
{% include "header.html" %}
<h1>{{ hunt.name }}</h1>
<div id="content">
+ <div class="tabs">
+ <a class="active" href="/hunt/{{ hunt.key.id }}">Status</a>
+ <a href="/hunt/{{ hunt.key.id }}/clues">Clues</a>
+ <a href="/hunt/{{ hunt.key.id }}/teams">Teams</a>
+ </div>
+ <div class="tab-content">
{% if hunt.started %}
- <p>Hunt has started!</p>
+ <h2>Hunt has started!</h2>
{% else %}
<form action="" method="post">
<input type="submit" value="Start hunt" />
</form>
{% endif %}
- <div>
- <a href="/hunt/{{ hunt.key.id }}/clues">Clues</a>
- <a href="/hunt/{{ hunt.key.id }}/teams">Teams</a>
- </div>
<p>TODO: teams and clue completion status table</p>
</div>
+ </div>
</body>
</html>
View
7 src/templates/teams.html
@@ -10,6 +10,12 @@
{% include "header.html" %}
<h1>Teams for {{ hunt_name }}</h1>
<div id="content">
+ <div class="tabs">
+ <a href="/hunt/{{ hunt.key.id }}">Status</a>
+ <a href="/hunt/{{ hunt.key.id }}/clues">Clues</a>
+ <a class="active" href="/hunt/{{ hunt.key.id }}/teams">Teams</a>
+ </div>
+ <div class="tab-content">
{% if started %}
<form action="" method="post">
<table>
@@ -40,5 +46,6 @@
</script>
{% endif %}
</div>
+ </div>
</body>
</html>

0 comments on commit 90db032

Please sign in to comment.
Something went wrong with that request. Please try again.