new courses landing page
This commit is contained in:
105
rowers/templates/courses_challenges.html
Normal file
105
rowers/templates/courses_challenges.html
Normal file
@@ -0,0 +1,105 @@
|
||||
{% extends "newbase.html" %}
|
||||
{% load static %}
|
||||
{% load rowerfilters %}
|
||||
{% load leaflet_tags %}
|
||||
|
||||
{% block meta %}
|
||||
{% leaflet_js %}
|
||||
{% leaflet_css %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Rowsandall Virtual Challenges{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script type='text/javascript'
|
||||
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
<h1>Courses you might like</h1>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="/rowers/list-courses/">All Courses</a>
|
||||
</p>
|
||||
<a href="/rowers/list-courses/?liked=true">Courses I like</a>
|
||||
</p>
|
||||
</li>
|
||||
{% for course in coursesdicts %}
|
||||
<li class="rounder">
|
||||
<a href="/rowers/courses/{{ course.course.id }}/">
|
||||
<h2>{{ course.course.name }}</h2>
|
||||
</a>
|
||||
<p>{{ course.course.country }}</p>
|
||||
<p>{{ course.course.distance }}m</p>
|
||||
<div class="mapdiv" id="{{ course.course.id }}">
|
||||
{{ course.div|safe}}
|
||||
{{ course.script|safe}}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="grid_4">
|
||||
<h1>Interesting Challenges</h1>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="/rowers/virtualevents/">Challenges page</a>
|
||||
</p>
|
||||
<a href="/rowers/virtualevents/?nearby=true">Nearby Challenges</a>
|
||||
</p>
|
||||
</li>
|
||||
{% for challenge in challengesdicts %}
|
||||
<li class="rounder">
|
||||
<a href="/rowers/virtualevent/{{ challenge.challenge.id }}/">
|
||||
<h2>{{ challenge.challenge.name }}</h2>
|
||||
</a>
|
||||
<p>{{ challenge.challenge.startdate|date:"Y-m-d" }}
|
||||
{{ challenge.challenge.start_time|time:"H:i e" }}
|
||||
to
|
||||
{{ challenge.challenge.enddate|date:"Y-m-d" }}
|
||||
{{ challenge.challenge.end_time|time:"H:i e" }}
|
||||
({{ challenge.challenge.timezone }})</p>
|
||||
<p>{% if challenge.challenge.sessiontype == 'fastest_time' %}
|
||||
Time Challenge: To be rowed on the water
|
||||
{% elif challenge.challenge.sessiontype == 'fastest_distance' %}
|
||||
Distance Challenge: To be rowed on the water
|
||||
{% elif challenge.challenge.sessiontype != 'race' %}
|
||||
Indoor Race: To be rowed on a Concept2 ergometer
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if challenge.challenge.sessiontype == 'fastest_time' %}
|
||||
<div class="vignet">
|
||||
<img src="/static/img/sculler.png"
|
||||
alt="Marked Course">
|
||||
</div>
|
||||
{% elif challenge.challenge.sessiontype == 'fastest_distance' %}
|
||||
<div class="vignet">
|
||||
<img src="/static/img/sculler.png"
|
||||
alt="Marked Course">
|
||||
</div>
|
||||
{% elif challenge.challenge.sessiontype != 'race' %}
|
||||
<div class="vignet">
|
||||
<img src="/static/img/domca.png"
|
||||
alt="Marked Course">
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
<div class="mapdiv" id="{{ challenge.challenge.id }}">
|
||||
{{ challenge.div|safe}}
|
||||
{{ challenge.script|safe}}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_racing.html' %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user