Announcements
This commit is contained in:
@@ -24,10 +24,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_8 alpha">
|
<div class="grid_8 alpha">
|
||||||
<h1>My Workouts</h1>
|
<h3>My Workouts</h3>
|
||||||
|
|
||||||
{% if workouts %}
|
{% if workouts %}
|
||||||
<table width="95%" class="listtable">
|
<table width="100%" class="listtable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> Date</th>
|
<th> Date</th>
|
||||||
@@ -74,29 +74,50 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_4 omega">
|
<div class="grid_4 omega">
|
||||||
<h1>Announcements</h1>
|
<div class="grid_4" id="announcements">
|
||||||
{% if announcements %}
|
{% if announcements %}
|
||||||
|
<h3>What's New?</h3>
|
||||||
{% for a in announcements %}
|
{% for a in announcements %}
|
||||||
<i>{{ a.created }}</i>
|
<div class="site-announcement-box">
|
||||||
<p>{{ a.announcement }}</p>
|
<div class="site-announcement">
|
||||||
|
<i>{{ a.created }}:</i>
|
||||||
|
{{ a.announcement }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<p> </p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="grid_4" id="about">
|
||||||
|
<h3>About</h3>
|
||||||
|
<p>This site is a beta site, pioneering rowing data visualization and analysis. No warrantied. It's author is
|
||||||
|
Sander Roosendaal. A Masters rower.
|
||||||
|
|
||||||
|
Read his <a href="http://blog.rowsandall.com/">blog</a>
|
||||||
|
</p>
|
||||||
|
<div style="text-align: right; padding: 2em">
|
||||||
|
<img src="/static/img/sander.jpg" width="80">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_6 alpha">
|
|
||||||
|
|
||||||
|
<div class="grid_5 alpha">
|
||||||
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||||
method="get" accept-charset="utf-8">
|
method="get" accept-charset="utf-8">
|
||||||
<div class="grid_3 prefix_1 alpha">
|
<div class="grid_3 prefix_1 alpha">
|
||||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_1 suffix_1 omega">
|
<div class="grid_1 omega">
|
||||||
<button class="button blue small" type="submit">
|
<button class="button blue small" type="submit">
|
||||||
Search
|
Search
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_2 prefix_3 omega">
|
<div class="grid_2 prefix_1 omega">
|
||||||
<span class="button gray small">
|
<span class="button gray small">
|
||||||
{% if workouts.has_previous %}
|
{% if workouts.has_previous %}
|
||||||
<a class="wh" href="?page={{ workouts.previous_page_number }}"><</a>
|
<a class="wh" href="?page={{ workouts.previous_page_number }}"><</a>
|
||||||
|
|||||||
@@ -1988,8 +1988,12 @@ def workouts_view(request,message='',successmessage='',
|
|||||||
except EmptyPage:
|
except EmptyPage:
|
||||||
workouts = paginator.page(paginator.num_pages)
|
workouts = paginator.page(paginator.num_pages)
|
||||||
|
|
||||||
|
today = timezone.now()
|
||||||
announcements = SiteAnnouncement.objects.all().order_by("-created")
|
announcements = SiteAnnouncement.objects.filter(
|
||||||
|
expires__gte=today
|
||||||
|
).order_by(
|
||||||
|
"-created"
|
||||||
|
)
|
||||||
|
|
||||||
return render(request, 'list_workouts.html',
|
return render(request, 'list_workouts.html',
|
||||||
{'workouts': workouts,
|
{'workouts': workouts,
|
||||||
@@ -1998,7 +2002,7 @@ def workouts_view(request,message='',successmessage='',
|
|||||||
'dateform':dateform,
|
'dateform':dateform,
|
||||||
'startdate':startdate,
|
'startdate':startdate,
|
||||||
'enddate':enddate,
|
'enddate':enddate,
|
||||||
'announcements':announcements,
|
'announcements':announcements[0:4],
|
||||||
})
|
})
|
||||||
except Rower.DoesNotExist:
|
except Rower.DoesNotExist:
|
||||||
return HttpResponse("User has no rower instance")
|
return HttpResponse("User has no rower instance")
|
||||||
|
|||||||
@@ -140,6 +140,23 @@ th {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-announcement-box {
|
||||||
|
padding: .2em .5em .2em 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-announcement {
|
||||||
|
font: 1.1em/1.5em sans-serif;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
padding: .2em .5em .2em .5em;
|
||||||
|
zoom: 1;
|
||||||
|
border-radius: .5em;
|
||||||
|
-moz-border-radius: .5em;
|
||||||
|
-webkit-border-radius: .5em;
|
||||||
|
text-align: left;
|
||||||
|
border: solid 1px #333;
|
||||||
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
font: 1.1em/1.5em sans-serif;
|
font: 1.1em/1.5em sans-serif;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
BIN
static/img/sander.jpg
Normal file
BIN
static/img/sander.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user