summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-11 00:15:36 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-11 00:15:36 +0100
commit53aef139b8c61f41fede93b3f58659820b10ccf4 (patch)
tree8ed1efe145eecfb7896941a54ac462bf0b923778 /app
parent11dd270fb391198b97ce70edca681c3c2b936db7 (diff)
Modification design flux principal (enfin quelque chose qui me plaît)
Diffstat (limited to 'app')
-rw-r--r--app/views/index/index.phtml49
-rw-r--r--app/views/javascript/main.phtml8
2 files changed, 29 insertions, 28 deletions
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index cf3e07752..711ed5b2c 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -16,32 +16,33 @@
<?php foreach ($items as $item) { ?>
<div class="post flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
- <h1 class="title"><a target="_blank" href="<?php echo $item->link (); ?>"> <?php echo $item->title (); ?></a></h1>
-
- <div class="before">
- <?php $author = $item->author (); ?>
+ <ul class="flux_header">
+ <li class="item manage">
+ <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
+ <?php if (!$item->isRead ()) { ?>
+ <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 1))); ?>">&nbsp;</a>
+ <?php } else { ?>
+ <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 0))); ?>">&nbsp;</a>
+ <?php } ?>
+
+ <?php if (!$item->isFavorite ()) { ?>
+ <a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 1))); ?>">&nbsp;</a>
+ <?php } else { ?>
+ <a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 0))); ?>">&nbsp;</a>
+ <?php } ?>
+ <?php } ?>
+ </li>
<?php $feed = $item->feed (true); ?>
- Le <?php echo $item->date (); ?>
- <?php echo $author != '' ? ' par ' . $author : ''; ?>
- sur <a target="_blank" href="<?php echo $feed->website (); ?>"><?php echo $feed->name (); ?> <img src="http://www.google.com/s2/favicons?domain=<?php echo get_domain ($feed->website ()); ?>" alt="" /></a>,
- </div>
-
- <div class="content"><?php echo $item->content (); ?></div>
+ <li class="item website"><a target="_blank" href="<?php echo $feed->website (); ?>"><img src="http://www.google.com/s2/favicons?domain=<?php echo get_domain ($feed->website ()); ?>" alt="" /> <?php echo $feed->name (); ?></a></li>
+ <li class="item title"><h1><?php echo $item->title (); ?></h1></li>
+ <li class="item date">le <?php echo $item->date (); ?></li>
+ <li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li>
+ </ul>
- <div class="after">
- <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
- <?php if (!$item->isRead ()) { ?>
- <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 1))); ?>">J'ai fini de lire l'article</a>
- <?php } else { ?>
- <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 0))); ?>">Marquer comme non lu</a>
- <?php } ?>
- -
- <?php if (!$item->isFavorite ()) { ?>
- <a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 1))); ?>">Ajouter l'article à mes favoris</a>
- <?php } else { ?>
- <a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 0))); ?>">Retirer l'article de mes favoris</a>
- <?php } ?>
- <?php } ?>
+ <div class="content">
+ <?php $author = $item->author (); ?>
+ <?php echo $author != '' ? '<div class="author">Par <em>' . $author . '</em></div>' : ''; ?>
+ <?php echo $item->content (); ?>
</div>
</div>
<?php } ?>
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index 2bc6f4abb..cb8f0c0c4 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -65,11 +65,11 @@ function mark_read (active) {
active.find ("a.read").attr ("href", res.url);
if (active.hasClass ("not_read")) {
active.removeClass ("not_read");
- active.find ("a.read").html ("Marquer comme non lu");
+ //active.find ("a.read").html ("Marquer comme non lu");
add_not_read (-1);
} else {
active.addClass ("not_read");
- active.find ("a.read").html ("J'ai fini de lire l'article");
+ //active.find ("a.read").html ("J'ai fini de lire l'article");
add_not_read (1);
}
});
@@ -95,10 +95,10 @@ function mark_favorite (active) {
active.find ("a.bookmark").attr ("href", res.url);
if (active.hasClass ("favorite")) {
active.removeClass ("favorite");
- active.find ("a.bookmark").html ("Ajouter l'article à mes favoris");
+ //active.find ("a.bookmark").html ("Ajouter l'article à mes favoris");
} else {
active.addClass ("favorite");
- active.find ("a.bookmark").html ("Retirer l'article de mes favoris");
+ //active.find ("a.bookmark").html ("Retirer l'article de mes favoris");
}
});
}