diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/FreshRSS.php | 10 | ||||
| -rw-r--r-- | app/Models/Feed.php | 6 | ||||
| -rw-r--r-- | app/views/configure/reading.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 1 | ||||
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 10 | ||||
| -rw-r--r-- | app/views/helpers/view/reader_view.phtml | 18 |
6 files changed, 16 insertions, 31 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 3443589c6..7c333b090 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -136,13 +136,9 @@ class FreshRSS extends Minz_FrontController { Minz_View::appendScript('https://login.persona.org/include.js'); break; } - $includeLazyLoad = $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param ('output') === 'reader'); - Minz_View::appendScript (Minz_Url::display ('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js')), false, !$includeLazyLoad, !$includeLazyLoad); - if ($includeLazyLoad) { - Minz_View::appendScript (Minz_Url::display ('/scripts/jquery.lazyload.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.lazyload.min.js'))); - } - Minz_View::appendScript (Minz_Url::display ('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); - Minz_View::appendScript (Minz_Url::display ('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js'))); + Minz_View::appendScript(Minz_Url::display('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js'))); + Minz_View::appendScript(Minz_Url::display('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); + Minz_View::appendScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js'))); } private function loadNotifications () { diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 576f37760..fe1e52ea2 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -277,11 +277,11 @@ class FreshRSS_Feed extends Minz_Model { $elinks[$elink] = '1'; $mime = strtolower($enclosure->get_type()); if (strpos($mime, 'image/') === 0) { - $content .= '<br /><img src="' . $elink . '" alt="" />'; + $content .= '<br /><img lazyload="" postpone="" src="' . $elink . '" alt="" />'; } elseif (strpos($mime, 'audio/') === 0) { - $content .= '<br /><audio src="' . $elink . '" controls="controls" />'; + $content .= '<br /><audio lazyload="" postpone="" preload="none" src="' . $elink . '" controls="controls" />'; } elseif (strpos($mime, 'video/') === 0) { - $content .= '<br /><video src="' . $elink . '" controls="controls" />'; + $content .= '<br /><video lazyload="" postpone="" preload="none" src="' . $elink . '" controls="controls" />'; } } } diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index 4d439e83d..d56726730 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -9,7 +9,7 @@ <div class="form-group"> <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label> <div class="group-controls"> - <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" /> + <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" min="5" max="50" /> </div> </div> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 6e0a20de3..a04d3d527 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -10,7 +10,6 @@ echo 'var ', ',auto_mark_site=', $mark['site'] ? 'true' : 'false', ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false', ',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false', - ',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false', ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false', ',sticky_post=', $this->conf->sticky_post ? 'true' : 'false'; diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 6f172d579..55ef6bdf6 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -92,13 +92,9 @@ if (!empty($this->entries)) { <div class="content <?php echo $content_width; ?>"> <h1 class="title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></h1> <?php - $author = $item->author (); - echo $author != '' ? '<div class="author">' . Minz_Translate::t ('by_author', $author) . '</div>' : ''; - if ($lazyload) { - echo $hidePosts ? lazyIframe(lazyimg($item->content())) : lazyimg($item->content()); - } else { - echo $item->content(); - } + $author = $item->author(); + echo $author != '' ? '<div class="author">' . Minz_Translate::t('by_author', $author) . '</div>' : '', + $lazyload && $hidePosts ? lazyimg($item->content()) : $item->content(); ?> </div> <ul class="horizontal-list bottom"><?php diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml index e37c78cb4..665f72849 100644 --- a/app/views/helpers/view/reader_view.phtml +++ b/app/views/helpers/view/reader_view.phtml @@ -21,19 +21,13 @@ if (!empty($this->entries)) { </a> <h1 class="title"><?php echo $item->title (); ?></h1> - <div class="author"> - <?php $author = $item->author (); ?> - <?php echo $author != '' ? Minz_Translate::t ('by_author', $author) . ' — ' : ''; ?> - <?php echo $item->date (); ?> - </div> + <div class="author"><?php + $author = $item->author(); + echo $author != '' ? Minz_Translate::t('by_author', $author) . ' — ' : '', + $item->date(); + ?></div> - <?php - if ($lazyload) { - echo lazyimg($item->content ()); - } else { - echo $item->content(); - } - ?> + <?php echo $item->content(); ?> </div> </div> </div> |
