pcards/templates/cards/index.html

45 lines
1.1 KiB
HTML

{% extends 'base.html' %}
{% load image_tags %}
{% load inclusion_tags %}
{% block main_container %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jqcloud.css" />
<script type="text/javascript" src="{{ STATIC_URL }}js/jqcloud-1.0.2.js"></script>
<script type="text/javascript">
/*!
* Create an array of word objects, each representing a word in the cloud
*/
var word_array = [
{% for tag in tags_list %}
{text: "{{ tag.label }}", weight: {{ tag.occurences }}, link: "{% url list-by-tag tag.id %}"},
{% endfor %}
];
$(function() {
// When DOM is ready, select the container element and call the jQCloud method, passing the array of words as the first argument.
$("#tagCloud").jQCloud(word_array);
});
</script>
<div class="container">
<div class="row">
<div class="span4">
<img style="vertical-align: middle;" src="{{ STATIC_URL }}/img/header_pic.png" alt="" />
</div>
<div class="span8">
<div id="tagCloud" style="width: 550px; height: 350px;"></div>
</div>
</div>
</div>
<h2>Derniers ajouts</h2>
{% cards_list_partial cards_list %}
{% endblock %}