|
1 {% extends 'iconolab_base.html' %} |
|
2 |
|
3 {% load i18n %} |
|
4 {% load staticfiles %} |
|
5 {% load thumbnail %} |
|
6 {% load iconolab_tags %} |
|
7 {% load humanize %} |
|
8 |
|
9 {% block content %} |
|
10 <div id="homepage-main"> |
|
11 <div class="alert alert-warning" role="alert"> |
|
12 <p><strong>Bienvenue sur iconolab. La plateforme |
|
13 est actuellement en cours de développement.</strong></p> |
|
14 <p>Nous entrons en phase d'expérimentation ouverte au grand public. Pour plus d'informations, prière de contacter <a href="mailto:{{ contact }}">{{ contact }}</a>.</p> |
|
15 </div> |
|
16 <div class="row"> |
|
17 <div class="col-xs-12"> |
|
18 <h3>Les collections</h3> |
|
19 </div> |
|
20 </div> |
|
21 <div id="main-panel" class="row"> |
|
22 |
|
23 {% for collection in collections_primary %} |
|
24 <div class="col-md-3"> |
|
25 <div class="home-collection"> |
|
26 {% thumbnail collection.image "450x250" crop="center" as im %} |
|
27 <div> |
|
28 <a href="{% url 'collection_home' collection.name %}"> |
|
29 <img src="{{ im.url }}" class="img-responsive"> |
|
30 </a> |
|
31 </div> |
|
32 <h4 class="text-center">{{collection.verbose_name}}</h4> |
|
33 <div class="progress"> |
|
34 <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" |
|
35 aria-valuenow="{{ collection.completed_percent }}" aria-valuemin="0" aria-valuemax="100" |
|
36 style="width: {{ collection.completed_percent }}%;"> |
|
37 {{ collection.completed_percent }}% |
|
38 </div> |
|
39 </div> |
|
40 <a class="btn btn-default btn-primary btn-block" href="{% url 'collection_home' collection.name %}"> |
|
41 Contribuer |
|
42 </a> |
|
43 <hr> |
|
44 <p class="home-collection-description" title="{{collection.description|safe}}">{{collection.description|safe}}</p> |
|
45 {% endthumbnail %} |
|
46 </div> |
|
47 </div> |
|
48 {% endfor %} |
|
49 </div> |
|
50 <div class="row"> |
|
51 <div class="col-md-6"> |
|
52 <h3>Les dernières annotations</h3> |
|
53 {% for annotation in latest_annotations %} |
|
54 <div class="panel panel-default"> |
|
55 <div class="panel-body"> |
|
56 |
|
57 <div class="row"> |
|
58 <div class="col-md-4"> |
|
59 <div class="fragment-container" style="position: relative"> |
|
60 {% thumbnail annotation.image.media "100x100" crop=False as im %} |
|
61 <a href="{% url 'annotation_detail' annotation.image.item.collection.name annotation.image.image_guid annotation.annotation_guid %}"> |
|
62 <img v-el:small-image src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" /> |
|
63 <svg width="{{ im.width }}" height="{{ im.height }}" version="1.1" style="position:absolute; top:0px; left: 0px"> |
|
64 <g transform="matrix({% transform_matrix im_width=im.width im_height=im.height max_x=100 max_y=100 %})"> |
|
65 <path d="{{ annotation.current_revision.fragment|clean_path }}" opacity="0.7" fill="orange"></path> |
|
66 </g> |
|
67 </svg> |
|
68 </a> |
|
69 {% endthumbnail %} |
|
70 </div> |
|
71 </div> |
|
72 <div class="col-md-8"> |
|
73 |
|
74 <h4> |
|
75 {{ annotation.current_revision.title }} |
|
76 <small class="pull-right">{{ annotation.current_revision.created|naturaltime }}</small> |
|
77 </h4> |
|
78 <p> |
|
79 {% for contributor in annotation.stats.contributors.all %} |
|
80 <a href="{% url 'user_home' slug=contributor.username %}">{{ contributor.username }}</a> |
|
81 {% endfor %} |
|
82 </p> |
|
83 <p>{{ annotation.current_revision.description }}</p> |
|
84 <p> |
|
85 {% for tagging_info in annotation.current_revision.tagginginfo_set.all %} |
|
86 <span class="label label-default"><i class="fa fa-tag"></i> {{ tagging_info.tag.label }}</span> |
|
87 {% endfor %} |
|
88 </p> |
|
89 </div> |
|
90 </div> |
|
91 </div> |
|
92 </div> |
|
93 {% endfor %} |
|
94 </div> |
|
95 <div class="col-md-6"> |
|
96 <h3>Les meilleurs contributeurs</h3> |
|
97 <ul class="list-group"> |
|
98 {% for best_contributor in best_contributors %} |
|
99 <li class="list-group-item"> |
|
100 <span class="badge">{{ best_contributor.contributions }}</span> |
|
101 <a href="{% url 'user_home' best_contributor.author.username %}">{{ best_contributor.author.username }}</a> |
|
102 </li> |
|
103 {% endfor %} |
|
104 </ul> |
|
105 |
|
106 <h3>Les mots-clé les plus pertinents</h3> |
|
107 <ul class="list-group"> |
|
108 {% for most_accurate_tag in most_accurate_tags %} |
|
109 <li class="list-group-item"> |
|
110 <span class="badge">{{ most_accurate_tag.annotation_count }}</span> |
|
111 <a href="{% url 'search_indexes:model_search' 'annotations' %}?q={{ most_accurate_tag.tag.label }}&tags=1"> |
|
112 {{ most_accurate_tag.tag.label }} |
|
113 </a> |
|
114 </li> |
|
115 {% endfor %} |
|
116 </ul> |
|
117 |
|
118 </div> |
|
119 </div> |
|
120 {% for collection in collections_secondary %} |
|
121 <div id="collection-panel-{{collection.name}}" class="container collection-container panel panel-default"> |
|
122 <div class="row"> |
|
123 <div class="col-md-4"> |
|
124 {% thumbnail collection.image "350x350" crop=False as im %} |
|
125 <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"> |
|
126 {% endthumbnail %} |
|
127 </div> |
|
128 <div class="col-md-8"> |
|
129 <h3 class="collection-title">{{ collection.verbose_name }}</h3> |
|
130 <p id="collection-description-short-{{collection.name}}" class="text-justify collection-description"> |
|
131 {{collection.description | safe}} |
|
132 </p> |
|
133 <a href="{% url 'collection_home' collection.name %}" class="btn btn-primary btn">Contribuer</a> |
|
134 </div> |
|
135 </div> |
|
136 </div> |
|
137 {% endfor %} |
|
138 </div> |
|
139 {% endblock %} |