<commit_before><?php

$this->partial ('aside_flux');
$this->partial ('nav_menu');

if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
	$items = $this->entryPaginator->items ();
?>

<div id="stream" class="normal<?php echo $this->conf->displayPosts () === 'no' ? ' hide_posts' : ''; ?>">
	<?php
		$display_today = true;
		$display_yesterday = true;
		$display_others = true;

		$logged = !login_is_conf ($this->conf) || is_logged ();
		$shaarli = $logged && $this->conf->sharing ('shaarli');
		$poche = $logged && $this->conf->sharing ('poche');
		$diaspora = $logged && $this->conf->sharing ('diaspora');
		$twitter = $this->conf->sharing ('twitter');
		$google_plus = $this->conf->sharing ('g+');
		$facebook = $this->conf->sharing ('facebook');
		$email = $this->conf->sharing ('email');
	?>

	<?php foreach ($items as $item) { ?>

	<?php if ($display_today && $item->isDay (Days::TODAY)) { ?>
	<div class="day" id="day_today">
		<?php echo Translate::t ('today'); ?>
		<span class="date"> - <?php echo timestamptodate (time (), false); ?></span>
		<span class="name"><?php echo $this->currentName; ?></span>
	</div>
	<?php $display_today = false; } ?>
	<?php if ($display_yesterday && $item->isDay (Days::YESTERDAY)) { ?>
	<div class="day" id="day_yesterday">
		<?php echo Translate::t ('yesterday'); ?>
		<span class="date"> - <?php echo timestamptodate (time () - 86400, false); ?></span>
		<span class="name"><?php echo $this->currentName; ?></span>
	</div>
	<?php $display_yesterday = false; } ?>
	<?php if ($display_others && $item->isDay (Days::BEFORE_YESTERDAY)) { ?>
	<div class="day" id="day_before_yesterday">
		<?php echo Translate::t ('before_yesterday'); ?>
		<span class="name"><?php echo $this->currentName; ?></span>
	</div>
	<?php $display_others = false; } ?>

	<div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
		<ul class="horizontal-list flux_header"><?php
			if (!login_is_conf ($this->conf) || is_logged ()) {
				if ($this->conf->toplineRead ()) {
					?><li class="item manage"><?php
						?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
							echo RSSThemes::icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
					?></li><?php
				}
				if ($this->conf->toplineFavorite ()) {
					 ?><li class="item manage"><?php
						?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
							echo RSSThemes::icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
					?></li><?php
				}
			}
			$feed = HelperCategory::findFeed($this->cat_aside, $item->feed ());	//We most likely already have the feed object in cache
			if (empty($feed)) $feed = $item->feed (true);
			?>
			<li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li>
			<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
			<?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
			<?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo RSSThemes::icon('link'); ?></a></li><?php } ?>
		</ul>

		<div class="flux_content">
			<div class="content">
				<h1 class="title"><?php echo $item->title (); ?></h1>
				<?php
					$author = $item->author ();
					echo $author != '' ? '<div class="author">' . Translate::t ('by_author', $author) . '</div>' : '';
					if($this->conf->lazyload() == 'yes') {
						echo lazyimg($item->content ());
					} else {
						echo $item->content();
					}
				?>
			</div>
			<ul class="horizontal-list bottom"><?php
				if (!login_is_conf ($this->conf) || is_logged ()) {
					if ($this->conf->bottomlineRead ()) {
						?><li class="item manage"><?php
							?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
								echo RSSThemes::icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
						?></li><?php
					}
					if ($this->conf->bottomlineFavorite ()) {
						?><li class="item manage"><?php
							?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
								echo RSSThemes::icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
						?></li><?php
					}
				} ?>
				<li class="item">
					<?php
						if ($this->conf->bottomlineSharing () && (
								$shaarli || $poche || $diaspora || $twitter ||
								$google_plus || $facebook || $email
							)) {
							$link = urlencode ($item->link ());
							$title = urlencode ($item->title () . ' - ' . $feed->name ());
					?>
					<div class="dropdown">
						<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
						<?php echo RSSThemes::icon('share'); ?> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>

						<ul class="dropdown-menu">
							<li class="dropdown-close"><a href="#close">❌</a></li>
							<?php if ($shaarli) { ?>
							<li class="item">
								<a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=FreshRSS'; ?>">
									<?php echo Translate::t ('shaarli'); ?>
								</a>
							</li>
							<?php } if ($poche) { ?>
							<li class="item">
								<a target="_blank" href="<?php echo $poche . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
									<?php echo Translate::t ('poche'); ?>
								</a>
							</li>
							<?php } if ($diaspora) { ?>
							<li class="item">
								<a target="_blank" href="<?php echo $diaspora . '/bookmarklet?url=' . $link . '&amp;title=' . $title; ?>">
									<?php echo Translate::t ('diaspora'); ?>
								</a>
							</li>
							<?php } if ($twitter) { ?>
							<li class="item"><commit_msg>Corrige bug partage Shaarli, Poche et D*<commit_after><?php

$this->partial ('aside_flux');
$this->partial ('nav_menu');

if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
	$items = $this->entryPaginator->items ();
?>

<div id="stream" class="normal<?php echo $this->conf->displayPosts () === 'no' ? ' hide_posts' : ''; ?>">
	<?php
		$display_today = true;
		$display_yesterday = true;
		$display_others = true;

		$logged = !login_is_conf ($this->conf) || is_logged ();
		$shaarli = $this->conf->sharing ('shaarli');
		$poche = $this->conf->sharing ('poche');
		$diaspora = $this->conf->sharing ('diaspora');
		$twitter = $this->conf->sharing ('twitter');
		$google_plus = $this->conf->sharing ('g+');
		$facebook = $this->conf->sharing ('facebook');
		$email = $this->conf->sharing ('email');
	?>

	<?php foreach ($items as $item) { ?>

	<?php if ($display_today && $item->isDay (Days::TODAY)) { ?>
	<div class="day" id="day_today">
		<?php echo Translate::t ('today'); ?>
		<span class="date"> - <?php echo timestamptodate (time (), false); ?></span>
		<span class="name"><?php echo $this->currentName; ?></span>
	</div>
	<?php $display_today = false; } ?>
	<?php if ($display_yesterday && $item->isDay (Days::YESTERDAY)) { ?>
	<div class="day" id="day_yesterday">
		<?php echo Translate::t ('yesterday'); ?>
		<span class="date"> - <?php echo timestamptodate (time () - 86400, false); ?></span>
		<span class="name"><?php echo $this->currentName; ?></span>
	</div>
	<?php $display_yesterday = false; } ?>
	<?php if ($display_others && $item->isDay (Days::BEFORE_YESTERDAY)) { ?>
	<div class="day" id="day_before_yesterday">
		<?php echo Translate::t ('before_yesterday'); ?>
		<span class="name"><?php echo $this->currentName; ?></span>
	</div>
	<?php $display_others = false; } ?>

	<div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
		<ul class="horizontal-list flux_header"><?php
			if (!login_is_conf ($this->conf) || is_logged ()) {
				if ($this->conf->toplineRead ()) {
					?><li class="item manage"><?php
						?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
							echo RSSThemes::icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
					?></li><?php
				}
				if ($this->conf->toplineFavorite ()) {
					 ?><li class="item manage"><?php
						?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
							echo RSSThemes::icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
					?></li><?php
				}
			}
			$feed = HelperCategory::findFeed($this->cat_aside, $item->feed ());	//We most likely already have the feed object in cache
			if (empty($feed)) $feed = $item->feed (true);
			?>
			<li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li>
			<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
			<?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
			<?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo RSSThemes::icon('link'); ?></a></li><?php } ?>
		</ul>

		<div class="flux_content">
			<div class="content">
				<h1 class="title"><?php echo $item->title (); ?></h1>
				<?php
					$author = $item->author ();
					echo $author != '' ? '<div class="author">' . Translate::t ('by_author', $author) . '</div>' : '';
					if($this->conf->lazyload() == 'yes') {
						echo lazyimg($item->content ());
					} else {
						echo $item->content();
					}
				?>
			</div>
			<ul class="horizontal-list bottom"><?php
				if (!login_is_conf ($this->conf) || is_logged ()) {
					if ($this->conf->bottomlineRead ()) {
						?><li class="item manage"><?php
							?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
								echo RSSThemes::icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
						?></li><?php
					}
					if ($this->conf->bottomlineFavorite ()) {
						?><li class="item manage"><?php
							?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
								echo RSSThemes::icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
						?></li><?php
					}
				} ?>
				<li class="item">
					<?php
						if ($this->conf->bottomlineSharing () && (
								$shaarli || $poche || $diaspora || $twitter ||
								$google_plus || $facebook || $email
							)) {
							$link = urlencode ($item->link ());
							$title = urlencode ($item->title () . ' - ' . $feed->name ());
					?>
					<div class="dropdown">
						<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
						<?php echo RSSThemes::icon('share'); ?> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>

						<ul class="dropdown-menu">
							<li class="dropdown-close"><a href="#close">❌</a></li>
							<?php if ($logged && $shaarli) { ?>
							<li class="item">
								<a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=FreshRSS'; ?>">
									<?php echo Translate::t ('shaarli'); ?>
								</a>
							</li>
							<?php } if ($logged && $poche) { ?>
							<li class="item">
								<a target="_blank" href="<?php echo $poche . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
									<?php echo Translate::t ('poche'); ?>
								</a>
							</li>
							<?php } if ($logged && $diaspora) { ?>
							<li class="item">
								<a target="_blank" href="<?php echo $diaspora . '/bookmarklet?url=' . $link . '&amp;title=' . $title; ?>">
									<?php echo Translate::t ('diaspora'); ?>
								</a>
							</li>
							<?php } if ($twitter) { ?>
							<li class="item">
{'fraction_non_alphanumeric': 0.26102853509259993, 'fraction_numerical': 0.0027024878785470155, 'mean_word_length': 3.547162992410553, 'pattern_counts': {'":': 0, '<': 317, '<?xml version=': 0, '>': 481, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5987949', 'n_tokens_mistral': 5264, 'n_tokens_neox': 4437, 'n_words': 955}