instead of not displaying the cover-photo at all after first page load, load the page with the cover slided up. change pointer to n-resize if cover is not slid.

This commit is contained in:
Mario Vavti
2018-09-05 12:17:32 +02:00
parent 1b7781a159
commit a821682c8c
3 changed files with 29 additions and 8 deletions

View File

@@ -21,9 +21,9 @@ class Cover_photo {
return '';
// only show cover photos once per login session
$hide_cover = false;
if(array_key_exists('channels_visited',$_SESSION) && is_array($_SESSION['channels_visited']) && in_array($channel_id,$_SESSION['channels_visited'])) {
return EMPTY_STR;
$hide_cover = true;
}
if(! array_key_exists('channels_visited',$_SESSION)) {
$_SESSION['channels_visited'] = [];
@@ -53,6 +53,7 @@ class Cover_photo {
$subtitle = str_replace('@','@',$channel['xchan_addr']);
$c = get_cover_photo($channel_id,'html');
$c = str_replace('src=', 'data-src=', $c);
if($c) {
$photo_html = (($style) ? str_replace('alt=',' style="' . $style . '" alt=',$c) : $c);
@@ -62,6 +63,7 @@ class Cover_photo {
'$title' => $title,
'$subtitle' => $subtitle,
'$hovertitle' => t('Click to show more'),
'$hide_cover' => $hide_cover
));
}
return $o;