-
Notifications
You must be signed in to change notification settings - Fork 344
/
item.phtml
97 lines (87 loc) · 4.2 KB
/
item.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?PHP
$title = $this->item['title'];
//$content = html_entity_decode($this->item['content']);
$content = str_replace('"', '"', $this->item['content']);
$sourcetitle = $this->item['sourcetitle'];
$this->viewHelper = new \helpers\ViewHelper();
if(isset($this->search)) {
$sourcetitle = $this->viewHelper->highlight($sourcetitle, $this->search);
$title = $this->viewHelper->highlight($title, $this->search);
$content = $this->viewHelper->highlight($content, $this->search);
}
$title = $this->viewHelper->lazyimg($title);
$content = $this->viewHelper->lazyimg($content);
$date = $this->viewHelper->dateago($this->item['datetime']);
$sharecfg = \F3::get('share');
$share = array(
"g" => "google",
"f" => "facebook",
"t" => "twitter",
"p" => "pocket",
"r" => "readability",
"d" => "delicious",
"e" => "email"
);
?>
<div id="entry<?PHP echo $this->item['id']; ?>"
class="entry
<?PHP echo $this->item['unread']==1 ? 'unread' : ''; ?>">
<!-- icon -->
<a href="<?PHP echo \helpers\Anonymizer::anonymize($this->item['link']); ?>" class="entry-icon">
<?PHP if(strlen(trim($this->item['icon']))>0 && $this->item['icon']!="0") : ?>
<img src="<?PHP echo 'favicons/'.$this->item['icon']; ?>" alt="<?PHP echo $sourcetitle ?>" />
<?PHP endif; ?>
</a>
<!-- title -->
<h2 class="entry-title"><?PHP echo $title; ?></h2>
<span class="entry-tags">
<?PHP foreach($this->item['tags'] as $tag => $color) : ?>
<span class="entry-tags-tag" style="color:<?PHP echo $color['foreColor']; ?>;background-color:<?PHP echo $color['backColor']; ?>"><?PHP echo $tag; ?></span>
<?PHP endforeach; ?>
</span>
<!-- source -->
<a href="<?PHP echo \helpers\Anonymizer::anonymize($this->item['link']); ?>" class="entry-source entry-source<?PHP echo $this->item['source']; ?>" target="_blank"><?PHP echo $sourcetitle ?></a>
<a href="<?PHP echo $this->item['link']; ?>" class="entry-link"></a>
<span class="entry-separator">•</span>
<!-- datetime -->
<span class="entry-datetime">
<?PHP echo $date; ?>
</span>
<!-- thumbnail -->
<?PHP if(isset($this->item['thumbnail']) && strlen(trim($this->item['thumbnail']))>0) : ?>
<div class="entry-thumbnail">
<a href="<?PHP echo \helpers\Anonymizer::anonymize($this->item['link']); ?>" target="_blank"><img src="<?PHP echo 'thumbnails/'.$this->item['thumbnail']; ?>" alt="<?PHP echo $this->item['title']; ?>" /></a>
</div>
<?PHP endif; ?>
<!-- content -->
<div class="entry-content <?PHP if(strlen(strip_tags($content))<500) : ?>entry-content-short<?PHP endif; ?>">
<?PHP echo $content; ?>
<ul class="entry-smartphone-share">
<li class="entry-newwindow"><?PHP echo \F3::get('lang_open_window')?></li>
<?PHP if (strlen($sharecfg) > 0) {
foreach (str_split($sharecfg) as $s) {
$name = $share[$s];
if ($name) {
echo '<li class="entry-share'.$name.' entry-share" title="'.$name.'">'.$name.'</li>';
}
}
} ?>
</ul>
</div>
<!-- toolbar -->
<ul class="entry-toolbar">
<li class="entry-starr <?PHP echo $this->item['starred']==1 ? 'active' : ''; ?>"><?PHP echo $this->item['starred']==1 ? \F3::get('lang_unstar') : \F3::get('lang_star'); ?></li>
<li class="entry-unread <?PHP echo $this->item['unread']==1 ? 'active' : ''; ?>"><?PHP echo $this->item['unread']==1 ? \F3::get('lang_mark') : \F3::get('lang_unmark'); ?></li>
<li class="entry-newwindow"><?PHP echo \F3::get('lang_open_window')?></li>
<li class="entry-loadimages"><?PHP echo \F3::get('lang_load_img')?> </li>
<?PHP if (strlen($sharecfg) > 0) {
foreach (str_split($sharecfg) as $s) {
$name = $share[$s];
if ($name) {
echo '<li class="entry-share'.$name.' entry-share" title="'.$name.'"> </li>';
}
}
} ?>
<li class="entry-close"></li>
</ul>
</div>