first version with blog posts
This commit is contained in:
@@ -92,6 +92,16 @@
|
||||
<li class="grid_5">
|
||||
<p class="midden">and more</p>
|
||||
</li>
|
||||
<li class="grid_5">
|
||||
<div class="midden">
|
||||
<img src="/static/img/horizontal_line.png"
|
||||
alt="horizontal line">
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="main-content" id="id_blogs">
|
||||
</ul>
|
||||
<ul class="main-content">
|
||||
<li>
|
||||
|
||||
</li>
|
||||
@@ -119,21 +129,47 @@
|
||||
|
||||
|
||||
|
||||
<p class="midden">
|
||||
Compatible with:
|
||||
<img src="/static/img/stravasquare.png" alt="Strava icon" width="30" height="30">
|
||||
<img src="/static/img/sporttrackssquare.png" alt="SportTracks icon" width="30" height="30">
|
||||
<img src="/static/img/c2square.jpg" alt="C2 icon" width="30" height="30">
|
||||
<img src="/static/img/nksquare.png" alt="NK icon" width="30" height="30">
|
||||
<img src="/static/img/cnsquare.png" alt="CrewNerd icon" width="30" height="30">
|
||||
<img src="/static/img/rimsquare.png" alt="RiM icon" width="30" height="30">
|
||||
<img src="/static/img/rpsquare.png" alt="RowPro icon" width="30" height="30">
|
||||
<img src="/static/img/essquare.png" alt="ErgStick icon" width="30" height="30">
|
||||
<img src="/static/img/bcsquare.png" alt="BoatCoach icon" width="30" height="30">
|
||||
<img src="/static/img/pssquare.png" alt="PainSled icon" width="30" height="30">
|
||||
<img src="/static/img/coxmate.png" alt="CoxMate icon" width="30" height="30">
|
||||
<img src="/static/img/ritmo_logo.gif" alt="RitmoTime icon" width="30" height="30">
|
||||
</p>
|
||||
<p class="midden">
|
||||
Compatible with:
|
||||
<img src="/static/img/stravasquare.png" alt="Strava icon" width="30" height="30">
|
||||
<img src="/static/img/sporttrackssquare.png" alt="SportTracks icon" width="30" height="30">
|
||||
<img src="/static/img/c2square.jpg" alt="C2 icon" width="30" height="30">
|
||||
<img src="/static/img/nksquare.png" alt="NK icon" width="30" height="30">
|
||||
<img src="/static/img/cnsquare.png" alt="CrewNerd icon" width="30" height="30">
|
||||
<img src="/static/img/rimsquare.png" alt="RiM icon" width="30" height="30">
|
||||
<img src="/static/img/rpsquare.png" alt="RowPro icon" width="30" height="30">
|
||||
<img src="/static/img/essquare.png" alt="ErgStick icon" width="30" height="30">
|
||||
<img src="/static/img/bcsquare.png" alt="BoatCoach icon" width="30" height="30">
|
||||
<img src="/static/img/pssquare.png" alt="PainSled icon" width="30" height="30">
|
||||
<img src="/static/img/coxmate.png" alt="CoxMate icon" width="30" height="30">
|
||||
<img src="/static/img/ritmo_logo.gif" alt="RitmoTime icon" width="30" height="30">
|
||||
</p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script type='text/javascript'
|
||||
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
console.log('loading script');
|
||||
$.getJSON(window.location.protocol + '//'+window.location.host + '/getblogs', function(data) {
|
||||
var html = '';
|
||||
console.log(data);
|
||||
$.each(data, function(key, blog) {
|
||||
console.log(blog.title);
|
||||
html += '<li class="frontitem">';
|
||||
html += '<h3 class="midden">'+blog.title+'</h3>';
|
||||
html += '<a href="'+blog.link+'">';
|
||||
html += '<p class="midden"><img src="'+blog.image+'" height=150px;></p>';
|
||||
html += '</a>';
|
||||
html += blog.excerpt+'</li>';
|
||||
$("#id_blogs").html(html);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
17
rowers/templates/frontpageblogs.html
Normal file
17
rowers/templates/frontpageblogs.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% for blog in blogposts %}
|
||||
<li class="frontitem">
|
||||
<h3 class="midden">{{ blog.title|safe }}</h3>
|
||||
<p class="midden">
|
||||
<img src={{ blog.image }} height=150px;>
|
||||
</p>
|
||||
{{ blog.excerpt|safe }}
|
||||
<p class="midden">
|
||||
<a href={{ blog.link }}>
|
||||
read more
|
||||
</a>
|
||||
</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user