aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-12-03 21:19:28 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-12-03 21:19:28 +0100
commit250c75de2a28d5bd7b724fd170e75e5910c79ddc (patch)
tree7ea1aaf81fef4d7b6ba1a6ba809732f7ddfd0466 /public
parent65dfc39af79465c5faca61902d1921a14e2901a8 (diff)
Correction design (issue #6), début correction bug #16 (à voir où ça en est)
Diffstat (limited to 'public')
-rw-r--r--public/data/Configuration.array.php2
-rw-r--r--public/scripts/endless_mode.js28
-rw-r--r--public/theme/base.css69
3 files changed, 61 insertions, 38 deletions
diff --git a/public/data/Configuration.array.php b/public/data/Configuration.array.php
index ca5af0a01..93e089c9e 100644
--- a/public/data/Configuration.array.php
+++ b/public/data/Configuration.array.php
@@ -1,6 +1,6 @@
<?php
return array (
- 'posts_per_page' => 10,
+ 'posts_per_page' => 50,
'default_view' => 'all',
'display_posts' => 'no',
'sort_order' => 'low_to_high',
diff --git a/public/scripts/endless_mode.js b/public/scripts/endless_mode.js
index a05da97db..30b91822c 100644
--- a/public/scripts/endless_mode.js
+++ b/public/scripts/endless_mode.js
@@ -1,24 +1,34 @@
-var url = "";
+var url_next_page = "";
+var load = false;
+
+function load_more_refresh () {
+ if (url_next_page === undefined) {
+ $("#load_more").html ("Il n'y a rien à charger");
+ $("#load_more").addClass ("disable");
+ } else {
+ $("#load_more").html ("Charger plus d'articles");
+ }
+}
function load_more_posts () {
- $.get (url, function (data) {
+ load = true;
+ $.get (url_next_page, function (data) {
$("#load_more").before ($("#stream .post", data));
- url = $(".pagination:last li.pager-next a", data).attr ("href");
- if (url === undefined) {
- $("#load_more").html ("Il n'y a plus rien à charger");
- $("#load_more").addClass ("disable");
- }
+ url_next_page = $(".pagination:last li.pager-next a", data).attr ("href");
init_posts ();
+ load_more_refresh ();
+ load = false;
});
}
$(document).ready (function () {
- url = $(".pagination:last li.pager-next a").attr ("href");
+ url_next_page = $(".pagination:last li.pager-next a").attr ("href");
$(".pagination:last").remove ();
- $("#stream").append ("<a id=\"load_more\" href=\"#\">Charger plus d'articles</a>");
+ $("#stream").append ("<a id=\"load_more\" href=\"#\"></a>");
+ load_more_refresh ();
$("#load_more").click (function () {
load_more_posts ();
diff --git a/public/theme/base.css b/public/theme/base.css
index bc7042fae..f3225f218 100644
--- a/public/theme/base.css
+++ b/public/theme/base.css
@@ -216,7 +216,7 @@ form {
text-decoration: none;
}
#stream {
- padding: 20px 0;
+ padding: 0;
}
#main .table {
display: table;
@@ -232,29 +232,38 @@ form {
}
.post {
- width: 90%;
- margin: 0 auto;
}
.post.flux {
- margin: 40px auto;
font-family: Palatino, "Times New Roman", serif;
line-height: 170%;
- border-left: 5px solid #aaa;
- background: #eee;
- border-radius: 5px;
- box-shadow: 0 1px 3px #aaa;
+ border-left: 10px solid #aaa;
+ background: #fafafa;
}
- .post.flux .before {
- padding: 20px;
- color: #666;
- font-size: 80%;
- text-align: center;
+ .post.flux:hover {
+ background: #fff;
}
.post.flux .after {
- margin: 50px 0 0;
+ padding: 10px 20px;
+ color: #aaa;
+ font-size: 80%;
+ font-style: italic;
+ }
+ .post.flux .after a {
+ color: #96BDE2;
+ }
+ .post.flux .after .options {
+ float: right;
+ }
+ .post.flux .after .options a {
+ padding: 0 20px;
+ }
+ /*.post.flux .after {
+ margin: 20px 0 0;
+ background: #fff;
font-size: 80%;
text-align: center;
border-top: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
}
.post.flux .after a {
display: inline-block;
@@ -262,17 +271,18 @@ form {
line-height: 50px;
width: 50%;
}
- .post.flux .after a:hover {
- background: #fff;
+ .post.flux .after a:hover {
+ background: #f6f6f6;
text-decoration: none;
- border-radius: 0 0 5px 5px;
- box-shadow: 0 1px 3px #aaa;
- }
+ }*/
.post.flux > h1 {
+ min-height: 0;
padding: 10px 20px;
+ font-size: 130%;
+ line-height: 150%;
}
.post.flux .content {
- padding: 10px 20px;
+ padding: 10px 100px;
}
.post.flux .content h1, .post.flux .content h2, .post.flux .content h3 {
margin: 20px 0;
@@ -303,15 +313,16 @@ form {
color: #666;
}
.post.flux.not_read {
- border-left: 5px solid #FF5300;
+ border-left: 10px solid #FF5300;
background: #FFF3ED;
}
.post.flux.favorite {
- border-left: 5px solid #FFC300;
+ border-left: 10px solid #FFC300;
background: #FFF6DA;
}
.post.flux.active {
- border-left: 5px solid #0062BE;
+ border-left: 10px solid #0062BE;
+ background: #fff;
}
/*** PAGINATION ***/
@@ -338,18 +349,20 @@ form {
}
a#load_more {
display: block;
- width: 90%;
height: 50px;
- margin: 0 auto;
background: #eee;
- border-radius: 5px;
- box-shadow: 0 0 3px #aaa;
line-height: 50px;
text-align: center;
font-weight: bold;
+ border-top: 1px solid #aaa;
}
+ a#load_more:hover {
+ background: #fff;
+ text-decoration: none;
+ }
a#load_more.disable {
- text-decoration: none !important;
+ cursor: default;
+ background: #eee;
color: #666;
}