Private
Public Access
1
0

blogs to left menu

This commit is contained in:
Sander Roosendaal
2019-05-28 17:16:37 +02:00
parent 47ce7ec206
commit cc40f589c3
5 changed files with 103 additions and 56 deletions

View File

@@ -330,10 +330,12 @@
</p>
{% endif %}
{% block ad %}
<a href="https://pryglrowing.com">
<img src="/static/img/prygl.jpg">
<p style="text-align: center">Prygl Rowing Camps</p>
</a>
<div id="id_blogs">
</div>
<a href="https://pryglrowing.com">
<img src="/static/img/prygl.jpg">
<p style="text-align: center">Prygl Rowing Camps</p>
</a>
{% endblock %}
</ad>
@@ -432,3 +434,25 @@
});
});
</script>
<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 = '';
$.each(data, function(key, blog) {
console.log(blog.title);
html += '<div class="site-announcement-box"><div class="site-announcement-white">';
html += '<a style="text-decoration: none; color: white;" href="'+blog.link+'">';
html += blog.title;
html += '</a>';
html += '</div></div>';
});
$("#id_blogs").html(html);
});
});
</script>