summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-06-15 20:14:13 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-06-15 20:14:13 +0200
commite3b3fa39d8b51bb571d2d15dafcfc94d4ab28787 (patch)
tree0293116ce54e5745d83b549272e5b60d124cd852
parentd3078fb726639eed478a2a449b0a9043af04a756 (diff)
Première version de la vue lecture (issue #67)
-rw-r--r--app/layout/nav_menu.phtml2
-rw-r--r--app/views/helpers/reader_view.phtml43
-rw-r--r--app/views/javascript/main.phtml2
-rw-r--r--public/theme/freshrss.css12
4 files changed, 55 insertions, 4 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index dbe597985..d36814bee 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -61,7 +61,7 @@
<?php
$url_output = $url;
- $actual_view = Request::param('output', 'nomal');
+ $actual_view = Request::param('output', 'normal');
?>
<?php if($actual_view != 'normal') { ?>
<li class="item">
diff --git a/app/views/helpers/reader_view.phtml b/app/views/helpers/reader_view.phtml
index b666fe620..f702a4b91 100644
--- a/app/views/helpers/reader_view.phtml
+++ b/app/views/helpers/reader_view.phtml
@@ -1,5 +1,44 @@
<?php
-$this->partial ('nav_menu');
+
+if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
+ $items = $this->entryPaginator->items ();
?>
-Non implémenté \ No newline at end of file
+<div id="stream" class="reader">
+ <?php foreach ($items as $item) { ?>
+
+ <div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
+ <div class="flux_content">
+ <div class="content">
+ <?php $feed = $item->feed (true); ?>
+ <a href="<?php echo $item->link (); ?>">
+ <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <span><?php echo $feed->name (); ?></span>
+ </a>
+ <h1 class="title"><?php echo $item->title (); ?></h1>
+
+ <div class="author">
+ <?php $author = $item->author (); ?>
+ <?php echo $author != '' ? Translate::t ('by_author', $author) . ' - ' : ''; ?>
+ <?php echo $item->date (); ?>
+ </div>
+
+ <?php
+ if($this->conf->lazyload() == 'yes') {
+ echo lazyimg($item->content ());
+ } else {
+ echo $item->content();
+ }
+ ?>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php $this->entryPaginator->render ('pagination.phtml', 'next'); ?>
+</div>
+
+<?php } else { ?>
+<div class="alert alert-warn">
+ <span class="alert-head"><?php echo Translate::t ('no_feed_to_display'); ?></span>
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index 28bb0dfd9..5b325ac8d 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -117,7 +117,7 @@ function init_posts () {
<?php } ?>
if (hide_posts) {
- $(".flux:not(.active) .flux_content").hide ();
+ $("#stream:not(.reader) .flux:not(.active) .flux_content").hide ();
}
$(".flux_header .item.title, .flux_header .item.date").click (function () {
diff --git a/public/theme/freshrss.css b/public/theme/freshrss.css
index 26bb21d8f..60498ad5b 100644
--- a/public/theme/freshrss.css
+++ b/public/theme/freshrss.css
@@ -286,6 +286,18 @@
text-decoration: none;
}
+#stream.reader .flux {
+ padding: 0 0 30px;
+ border: none;
+ background: #f0f0f0;
+ color: #333;
+}
+ #stream.reader .flux .author {
+ margin: 0 0 10px;
+ font-size: 90%;
+ color: #666;
+ }
+
.content {
max-width: 550px;
margin: 0 auto;