# HG changeset patch
# User verrierj
# Date 1327586678 -3600
# Node ID af360d447874e9404023e1441b31402fab297ead
# Parent f1c9c91a2a9aa15870500e3371cd3f4ebecb2db4# Parent 8447baa233e6c23bd48a4d90869bdf860f0eacae
Merge with 8447baa233e6c23bd48a4d90869bdf860f0eacae
diff -r f1c9c91a2a9a -r af360d447874 src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html
--- a/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Thu Jan 26 15:02:47 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Thu Jan 26 15:04:38 2012 +0100
@@ -9,6 +9,7 @@
{{block.super}}
+
{% endblock %}
{% block css_import %}
@@ -16,50 +17,6 @@
{% endblock %}
-{% block js_declaration %}
-{{block.super}}
-
-
-{% endblock %}
-
{% block body %}
{{block.super}}
@@ -71,8 +28,18 @@
{% for content in content_list %}
- {% thumbnail content.image "294x165" format="PNG" crop="center" as im %}
{% endthumbnail %}
-
+
+ {% thumbnail content.image "294x165" format="PNG" crop="center" as im %}
{% endthumbnail %}
+
+
+
{{ content.stat_annotation }}
+
+
{{ content.nb_annotation }}
{% if content.title|length > 69 %}{{content.title|slice:":69"}}...{% else %}{{content.title}}{% endif %}
{% trans 'by' %} IRI | {{content.duration|str_duration:"h"}}
diff -r f1c9c91a2a9a -r af360d447874 src/ldt/ldt/ldt_utils/templates/front/front_home.html
--- a/src/ldt/ldt/ldt_utils/templates/front/front_home.html Thu Jan 26 15:02:47 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_home.html Thu Jan 26 15:04:38 2012 +0100
@@ -6,6 +6,13 @@
{% block title %}{% trans "front.home" %}{% endblock %}
+{% block js_import %}
+{{block.super}}
+
+
+
+{% endblock %}
+
{% block css_import %}
{{block.super}}
@@ -26,7 +33,17 @@
{% for content in last_contents %}
- {% thumbnail content.image "294x165" format="PNG" crop="center" as im %}
{% endthumbnail %}
+ {% thumbnail content.image "294x165" format="PNG" crop="center" as im %}
{% endthumbnail %}
+
+
+
{{ content.stat_annotation }}
+
+
{{ content.nb_annotation }}
{{content.title}}
{% trans 'by' %} IRI | {{content.duration|str_duration:"h"}}
@@ -46,14 +63,16 @@
{% for content in most_contents %}
-
+
{% thumbnail content.image "134x75" format="PNG" crop="center" as im %}
{% endthumbnail %}
-
+
{{ content.nb_annotation }}
{% if content.title|length > 69 %}{{content.title|slice:":69"}}...{% else %}{{content.title}}{% endif %}
diff -r f1c9c91a2a9a -r af360d447874 src/ldt/ldt/static/ldt/css/front_common.css
--- a/src/ldt/ldt/static/ldt/css/front_common.css Thu Jan 26 15:02:47 2012 +0100
+++ b/src/ldt/ldt/static/ldt/css/front_common.css Thu Jan 26 15:04:38 2012 +0100
@@ -132,17 +132,25 @@
.img_media {
background: #000000; border: 2px solid #ffffff; padding: 1px;
}
-.img_and_polemic {
+.img_and_overlay {
float: left; position: relative;
}
+.overlay {
+ position: absolute; bottom: 7px; width: 100%;
+}
+
+.graph_annotation {
+ float: left; height: 20px; margin: 0 4px;
+}
+
.polemics {
- position: absolute; bottom: 8px; list-style: none; z-index: 2;
+ float: left; margin-bottom: 2px; list-style: none; z-index: 2;
width: 95%; font-size: 9px; color: #ffffff;
}
.polemics li {
- text-align: left; overflow: hidden; padding: 0 0 0 3px; margin: 2px 0; clear: both;
+ float: left; text-align: left; overflow: hidden; padding: 0 0 0 3px; margin: 2px 0; clear: both;
width: 100%; box-shadow: 2px 2px 2px #000000;
}
diff -r f1c9c91a2a9a -r af360d447874 src/ldt/ldt/static/ldt/css/front_home.css
--- a/src/ldt/ldt/static/ldt/css/front_home.css Thu Jan 26 15:02:47 2012 +0100
+++ b/src/ldt/ldt/static/ldt/css/front_home.css Thu Jan 26 15:04:38 2012 +0100
@@ -22,10 +22,6 @@
.title_ul {
list-style: none;
}
-.graph_annotation {
- background: url(./imgs/whitealpha.png); position:absolute;
- z-index: 2; width: 294px; height: 20px; left: 3px; top: 148px;
-}
/* Plus annotés */
diff -r f1c9c91a2a9a -r af360d447874 src/ldt/ldt/static/ldt/js/Ldt_front_search_results.js
--- a/src/ldt/ldt/static/ldt/js/Ldt_front_search_results.js Thu Jan 26 15:02:47 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/Ldt_front_search_results.js Thu Jan 26 15:04:38 2012 +0100
@@ -61,7 +61,9 @@
});
$("li.li_segment").removeClass("selected");
$("#li_" + _id).addClass("selected");
- $("#result_preview").show().html($("#li_" + _id + " div.hidden_preview").html());
+ $("#result_preview")
+ .show()
+ .html($("#li_" + _id + " div.hidden_preview").html());
$("#result_preview .result_taglist")
.html(
$("#result_preview .result_taglist").html()
@@ -82,4 +84,9 @@
"opacity" : ".5",
});
});
+ $(document).scroll(function() {
+ $("#result_preview").css({
+ "padding-top": Math.max(30,$(document).scrollTop()-20) + 'px',
+ })
+ })
});
\ No newline at end of file
diff -r f1c9c91a2a9a -r af360d447874 src/ldt/ldt/static/ldt/js/Ldt_front_sparkline.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/static/ldt/js/Ldt_front_sparkline.js Thu Jan 26 15:04:38 2012 +0100
@@ -0,0 +1,36 @@
+$(document).ready(function () {
+ $('.graph_annotation').each(function(_i) {
+ var _values = this.innerHTML.split(','),
+ _nb = _values.length,
+ _width = $(this).parent().parent().parent().width() - 8,
+ _height = $(this).height(),
+ _max = _values.reduce(function(_a,_b) {
+ return Math.max(_a,_b);
+ }, 1),
+ _x = function(_p) {
+ return _p * _width / _nb;
+ },
+ _y = function(_p) {
+ return _height * ( 1 - _p / _max );
+ },
+ _d = _values.map(function(_v,_k) {
+ return ( _k == 0 ?
+ "M" + _x(_k) + " " + _y(_v) :
+ "C" + _x(_k-.5) + " " + _y(_values[_k - 1])
+ + " " + + _x(_k-.5) + " " + _y(_v)
+ + " " + + _x(_k) + " " + _y(_v)
+ ) ;
+ }).join("") + "L" + _width + " " + _height + "L0 " + _height;
+ this.innerHTML = '';
+ var _paper = new Raphael(this,_width,_height);
+ _paper.rect(0,0,_width,_height).attr({
+ "stroke" : "none",
+ "fill" : "#ffffff",
+ "opacity" : .8,
+ });
+ _paper.path(_d).attr({
+ "fill" : "#adadad",
+ "stroke" : "#808080"
+ });
+ });
+});
\ No newline at end of file