diff options
author | Nicolas Lœuillet <nicolas.loeuillet@gmail.com> | 2013-08-05 21:56:32 +0200 |
---|---|---|
committer | Nicolas Lœuillet <nicolas.loeuillet@gmail.com> | 2013-08-05 21:56:32 +0200 |
commit | 6a361945eaf86a978b82bd6fb3442fe64428d9df (patch) | |
tree | ab7e2cff6301b22e5e54ce0321b13502806d7546 | |
parent | 55821e04c188997d258645975220828e195d0df4 (diff) | |
download | wallabag-6a361945eaf86a978b82bd6fb3442fe64428d9df.tar.gz wallabag-6a361945eaf86a978b82bd6fb3442fe64428d9df.tar.zst wallabag-6a361945eaf86a978b82bd6fb3442fe64428d9df.zip |
new design, pagination & more
-rw-r--r-- | CREDITS | 8 | ||||
-rw-r--r-- | inc/3rdparty/paginator.php | 198 | ||||
-rw-r--r-- | inc/poche/Poche.class.php | 40 | ||||
-rw-r--r-- | inc/poche/Tools.class.php | 2 | ||||
-rw-r--r-- | inc/poche/config.inc.php | 12 | ||||
-rw-r--r-- | inc/store/sqlite.class.php | 4 | ||||
-rw-r--r-- | index.php | 3 | ||||
-rw-r--r-- | tpl/_footer.twig | 2 | ||||
-rw-r--r-- | tpl/_head.twig | 5 | ||||
-rw-r--r-- | tpl/_messages.twig | 6 | ||||
-rw-r--r-- | tpl/_top.twig | 4 | ||||
-rw-r--r-- | tpl/config.twig | 80 | ||||
-rwxr-xr-x | tpl/css/messages.css | 2 | ||||
-rw-r--r-- | tpl/css/style-dark.css | 94 | ||||
-rw-r--r-- | tpl/css/style-light.css | 69 | ||||
-rw-r--r-- | tpl/css/style.css | 215 | ||||
-rw-r--r-- | tpl/home.twig | 44 | ||||
-rw-r--r-- | tpl/img/dark/checkmark-off.png | bin | 267 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/checkmark-on.png | bin | 221 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/down.png | bin | 223 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/logo.png | bin | 786 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/remove.png | bin | 265 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/star-off.png | bin | 330 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/star-on.png | bin | 277 -> 0 bytes | |||
-rwxr-xr-x | tpl/img/dark/twitter.png | bin | 300 -> 0 bytes | |||
-rw-r--r-- | tpl/img/dark/up.png | bin | 225 -> 0 bytes | |||
-rw-r--r-- | tpl/img/light/down.png (renamed from tpl/img/down.png) | bin | 216 -> 216 bytes | |||
-rwxr-xr-x | tpl/img/light/left.png | bin | 0 -> 196 bytes | |||
-rwxr-xr-x[-rw-r--r--] | tpl/img/light/top.png (renamed from tpl/img/up.png) | bin | 212 -> 212 bytes | |||
-rw-r--r-- | tpl/layout.twig | 8 | ||||
-rw-r--r-- | tpl/view.twig | 46 |
31 files changed, 469 insertions, 373 deletions
@@ -6,11 +6,9 @@ poche is based on : | |||
6 | * PHP Simple HTML DOM Parser (for Pocket import) http://simplehtmldom.sourceforge.net/ | 6 | * PHP Simple HTML DOM Parser (for Pocket import) http://simplehtmldom.sourceforge.net/ |
7 | * Session https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php | 7 | * Session https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php |
8 | * Twig http://twig.sensiolabs.org | 8 | * Twig http://twig.sensiolabs.org |
9 | * Flash messages https://github.com/plasticbrain/PHP-Flash-Messages | ||
10 | * Pagination https://github.com/daveismyname/pagination | ||
9 | 11 | ||
10 | poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License | 12 | poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License |
11 | 13 | ||
12 | Contributors : | 14 | Contributors : https://github.com/inthepoche/poche/graphs/contributors \ No newline at end of file |
13 | Nicolas Lœuillet aka nico_somb | ||
14 | Tom.C. aka tmos | ||
15 | PeaceCopathe | ||
16 | Gregoire_M \ No newline at end of file | ||
diff --git a/inc/3rdparty/paginator.php b/inc/3rdparty/paginator.php new file mode 100644 index 00000000..e8801555 --- /dev/null +++ b/inc/3rdparty/paginator.php | |||
@@ -0,0 +1,198 @@ | |||
1 | <?php | ||
2 | /* | ||
3 | * PHP Pagination Class | ||
4 | * | ||
5 | * @author David Carr - dave@daveismyname.com - http://www.daveismyname.com | ||
6 | * @version 1.0 | ||
7 | * @date October 20, 2013 | ||
8 | */ | ||
9 | class Paginator{ | ||
10 | |||
11 | /** | ||
12 | * set the number of items per page. | ||
13 | * | ||
14 | * @var numeric | ||
15 | */ | ||
16 | private $_perPage; | ||
17 | |||
18 | /** | ||
19 | * set get parameter for fetching the page number | ||
20 | * | ||
21 | * @var string | ||
22 | */ | ||
23 | private $_instance; | ||
24 | |||
25 | /** | ||
26 | * sets the page number. | ||
27 | * | ||
28 | * @var numeric | ||
29 | */ | ||
30 | private $_page; | ||
31 | |||
32 | /** | ||
33 | * set the limit for the data source | ||
34 | * | ||
35 | * @var string | ||
36 | */ | ||
37 | private $_limit; | ||
38 | |||
39 | /** | ||
40 | * set the total number of records/items. | ||
41 | * | ||
42 | * @var numeric | ||
43 | */ | ||
44 | private $_totalRows = 0; | ||
45 | |||
46 | |||
47 | |||
48 | /** | ||
49 | * __construct | ||
50 | * | ||
51 | * pass values when class is istantiated | ||
52 | * | ||
53 | * @param numeric $_perPage sets the number of iteems per page | ||
54 | * @param numeric $_instance sets the instance for the GET parameter | ||
55 | */ | ||
56 | public function __construct($perPage,$instance){ | ||
57 | $this->_instance = $instance; | ||
58 | $this->_perPage = $perPage; | ||
59 | $this->set_instance(); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * get_start | ||
64 | * | ||
65 | * creates the starting point for limiting the dataset | ||
66 | * @return numeric | ||
67 | */ | ||
68 | private function get_start(){ | ||
69 | return ($this->_page * $this->_perPage) - $this->_perPage; | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * set_instance | ||
74 | * | ||
75 | * sets the instance parameter, if numeric value is 0 then set to 1 | ||
76 | * | ||
77 | * @var numeric | ||
78 | */ | ||
79 | private function set_instance(){ | ||
80 | $this->_page = (int) (!isset($_GET[$this->_instance]) ? 1 : $_GET[$this->_instance]); | ||
81 | $this->_page = ($this->_page == 0 ? 1 : $this->_page); | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * set_total | ||
86 | * | ||
87 | * collect a numberic value and assigns it to the totalRows | ||
88 | * | ||
89 | * @var numeric | ||
90 | */ | ||
91 | public function set_total($_totalRows){ | ||
92 | $this->_totalRows = $_totalRows; | ||
93 | } | ||
94 | |||
95 | /** | ||
96 | * get_limit | ||
97 | * | ||
98 | * returns the limit for the data source, calling the get_start method and passing in the number of items perp page | ||
99 | * | ||
100 | * @return string | ||
101 | */ | ||
102 | public function get_limit(){ | ||
103 | return "LIMIT ".$this->get_start().",$this->_perPage"; | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * page_links | ||
108 | * | ||
109 | * create the html links for navigating through the dataset | ||
110 | * | ||
111 | * @var sting $path optionally set the path for the link | ||
112 | * @var sting $ext optionally pass in extra parameters to the GET | ||
113 | * @return string returns the html menu | ||
114 | */ | ||
115 | public function page_links($path='?',$ext=null) | ||
116 | { | ||
117 | $adjacents = "2"; | ||
118 | $prev = $this->_page - 1; | ||
119 | $next = $this->_page + 1; | ||
120 | $lastpage = ceil($this->_totalRows/$this->_perPage); | ||
121 | $lpm1 = $lastpage - 1; | ||
122 | |||
123 | $pagination = ""; | ||
124 | if($lastpage > 1) | ||
125 | { | ||
126 | $pagination .= "<div class='pagination'>"; | ||
127 | if ($this->_page > 1) | ||
128 | $pagination.= "<a href='".$path."$this->_instance=$prev"."$ext'>« previous</a>"; | ||
129 | else | ||
130 | $pagination.= "<span class='disabled'>« previous</span>"; | ||
131 | |||
132 | if ($lastpage < 7 + ($adjacents * 2)) | ||
133 | { | ||
134 | for ($counter = 1; $counter <= $lastpage; $counter++) | ||
135 | { | ||
136 | if ($counter == $this->_page) | ||
137 | $pagination.= "<span class='current'>$counter</span>"; | ||
138 | else | ||
139 | $pagination.= "<a href='".$path."$this->_instance=$counter"."$ext'>$counter</a>"; | ||
140 | } | ||
141 | } | ||
142 | elseif($lastpage > 5 + ($adjacents * 2)) | ||
143 | { | ||
144 | if($this->_page < 1 + ($adjacents * 2)) | ||
145 | { | ||
146 | for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) | ||
147 | { | ||
148 | if ($counter == $this->_page) | ||
149 | $pagination.= "<span class='current'>$counter</span>"; | ||
150 | else | ||
151 | $pagination.= "<a href='".$path."$this->_instance=$counter"."$ext'>$counter</a>"; | ||
152 | } | ||
153 | $pagination.= "..."; | ||
154 | $pagination.= "<a href='".$path."$this->_instance=$lpm1"."$ext'>$lpm1</a>"; | ||
155 | $pagination.= "<a href='".$path."$this->_instance=$lastpage"."$ext'>$lastpage</a>"; | ||
156 | } | ||
157 | elseif($lastpage - ($adjacents * 2) > $this->_page && $this->_page > ($adjacents * 2)) | ||
158 | { | ||
159 | $pagination.= "<a href='".$path."$this->_instance=1"."$ext'>1</a>"; | ||
160 | $pagination.= "<a href='".$path."$this->_instance=2"."$ext'>2</a>"; | ||
161 | $pagination.= "..."; | ||
162 | for ($counter = $this->_page - $adjacents; $counter <= $this->_page + $adjacents; $counter++) | ||
163 | { | ||
164 | if ($counter == $this->_page) | ||
165 | $pagination.= "<span class='current'>$counter</span>"; | ||
166 | else | ||
167 | $pagination.= "<a href='".$path."$this->_instance=$counter"."$ext'>$counter</a>"; | ||
168 | } | ||
169 | $pagination.= ".."; | ||
170 | $pagination.= "<a href='".$path."$this->_instance=$lpm1"."$ext'>$lpm1</a>"; | ||
171 | $pagination.= "<a href='".$path."$this->_instance=$lastpage"."$ext'>$lastpage</a>"; | ||
172 | } | ||
173 | else | ||
174 | { | ||
175 | $pagination.= "<a href='".$path."$this->_instance=1"."$ext'>1</a>"; | ||
176 | $pagination.= "<a href='".$path."$this->_instance=2"."$ext'>2</a>"; | ||
177 | $pagination.= ".."; | ||
178 | for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) | ||
179 | { | ||
180 | if ($counter == $this->_page) | ||
181 | $pagination.= "<span class='current'>$counter</span>"; | ||
182 | else | ||
183 | $pagination.= "<a href='".$path."$this->_instance=$counter"."$ext'>$counter</a>"; | ||
184 | } | ||
185 | } | ||
186 | } | ||
187 | |||
188 | if ($this->_page < $counter - 1) | ||
189 | $pagination.= "<a href='".$path."$this->_instance=$next"."$ext'>next »</a>"; | ||
190 | else | ||
191 | $pagination.= "<span class='disabled'>next »</span>"; | ||
192 | $pagination.= "</div>\n"; | ||
193 | } | ||
194 | |||
195 | |||
196 | return $pagination; | ||
197 | } | ||
198 | } | ||
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 80bf6919..789d6647 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -13,11 +13,13 @@ class Poche | |||
13 | public $store; | 13 | public $store; |
14 | public $tpl; | 14 | public $tpl; |
15 | public $messages; | 15 | public $messages; |
16 | public $pagination; | ||
16 | 17 | ||
17 | function __construct($storage_type) | 18 | function __construct($storage_type) |
18 | { | 19 | { |
19 | $this->store = new $storage_type(); | 20 | $this->store = new $storage_type(); |
20 | $this->init(); | 21 | $this->init(); |
22 | $this->messages = new Messages(); | ||
21 | 23 | ||
22 | # installation | 24 | # installation |
23 | if(!$this->store->isInstalled()) | 25 | if(!$this->store->isInstalled()) |
@@ -46,6 +48,8 @@ class Poche | |||
46 | $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); | 48 | $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); |
47 | $this->tpl->addFilter($filter); | 49 | $this->tpl->addFilter($filter); |
48 | 50 | ||
51 | $this->pagination = new Paginator(PAGINATION, 'p'); | ||
52 | |||
49 | Tools::initPhp(); | 53 | Tools::initPhp(); |
50 | Session::init(); | 54 | Session::init(); |
51 | } | 55 | } |
@@ -54,7 +58,7 @@ class Poche | |||
54 | { | 58 | { |
55 | Tools::logm('poche still not installed'); | 59 | Tools::logm('poche still not installed'); |
56 | echo $this->tpl->render('install.twig', array( | 60 | echo $this->tpl->render('install.twig', array( |
57 | 'token' => Session::getToken(), | 61 | 'token' => Session::getToken() |
58 | )); | 62 | )); |
59 | if (isset($_GET['install'])) { | 63 | if (isset($_GET['install'])) { |
60 | if (($_POST['password'] == $_POST['password_repeat']) | 64 | if (($_POST['password'] == $_POST['password_repeat']) |
@@ -62,6 +66,11 @@ class Poche | |||
62 | # let's rock, install poche baby ! | 66 | # let's rock, install poche baby ! |
63 | $this->store->install($_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login'])); | 67 | $this->store->install($_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login'])); |
64 | Session::logout(); | 68 | Session::logout(); |
69 | Tools::logm('poche is now installed'); | ||
70 | Tools::redirect(); | ||
71 | } | ||
72 | else { | ||
73 | Tools::logm('error during installation'); | ||
65 | Tools::redirect(); | 74 | Tools::redirect(); |
66 | } | 75 | } |
67 | } | 76 | } |
@@ -89,30 +98,32 @@ class Poche | |||
89 | if (DOWNLOAD_PICTURES) { | 98 | if (DOWNLOAD_PICTURES) { |
90 | $content = filtre_picture($parametres_url['content'], $url->getUrl(), $last_id); | 99 | $content = filtre_picture($parametres_url['content'], $url->getUrl(), $last_id); |
91 | } | 100 | } |
92 | #$msg->add('s', _('the link has been added successfully')); | 101 | $this->messages->add('s', _('the link has been added successfully')); |
93 | } | 102 | } |
94 | else { | 103 | else { |
95 | #$msg->add('e', _('error during insertion : the link wasn\'t added')); | 104 | $this->messages->add('e', _('error during insertion : the link wasn\'t added')); |
96 | Tools::logm('error during insertion : the link wasn\'t added'); | 105 | Tools::logm('error during insertion : the link wasn\'t added'); |
97 | } | 106 | } |
98 | } | 107 | } |
99 | else { | 108 | else { |
100 | #$msg->add('e', _('error during url preparation : the link wasn\'t added')); | 109 | $this->messages->add('e', _('error during fetching content : the link wasn\'t added')); |
101 | Tools::logm('error during content fetch'); | 110 | Tools::logm('error during content fetch'); |
102 | } | 111 | } |
112 | Tools::redirect(); | ||
103 | break; | 113 | break; |
104 | case 'delete': | 114 | case 'delete': |
105 | if ($this->store->deleteById($id)) { | 115 | if ($this->store->deleteById($id)) { |
106 | if (DOWNLOAD_PICTURES) { | 116 | if (DOWNLOAD_PICTURES) { |
107 | remove_directory(ABS_PATH . $id); | 117 | remove_directory(ABS_PATH . $id); |
108 | } | 118 | } |
109 | #$msg->add('s', _('the link has been deleted successfully')); | 119 | $this->messages->add('s', _('the link has been deleted successfully')); |
110 | Tools::logm('delete link #' . $id); | 120 | Tools::logm('delete link #' . $id); |
111 | } | 121 | } |
112 | else { | 122 | else { |
113 | #$msg->add('e', _('the link wasn\'t deleted')); | 123 | $this->messages->add('e', _('the link wasn\'t deleted')); |
114 | Tools::logm('error : can\'t delete link #' . $id); | 124 | Tools::logm('error : can\'t delete link #' . $id); |
115 | } | 125 | } |
126 | Tools::redirect(); | ||
116 | break; | 127 | break; |
117 | case 'toggle_fav' : | 128 | case 'toggle_fav' : |
118 | $this->store->favoriteById($id); | 129 | $this->store->favoriteById($id); |
@@ -169,9 +180,14 @@ class Poche | |||
169 | break; | 180 | break; |
170 | default: # home view | 181 | default: # home view |
171 | $entries = $this->store->getEntriesByView($view); | 182 | $entries = $this->store->getEntriesByView($view); |
183 | $this->pagination->set_total(count($entries)); | ||
184 | $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&'); | ||
185 | $datas = $this->store->getEntriesByView($view, $this->pagination->get_limit()); | ||
172 | $tpl_vars = array( | 186 | $tpl_vars = array( |
173 | 'entries' => $entries, | 187 | 'entries' => $datas, |
188 | 'page_links' => $page_links, | ||
174 | ); | 189 | ); |
190 | Tools::logm('display ' . $view . ' view'); | ||
175 | break; | 191 | break; |
176 | } | 192 | } |
177 | 193 | ||
@@ -183,6 +199,7 @@ class Poche | |||
183 | if (MODE_DEMO) { | 199 | if (MODE_DEMO) { |
184 | $this->messages->add('i', 'in demo mode, you can\'t update your password'); | 200 | $this->messages->add('i', 'in demo mode, you can\'t update your password'); |
185 | Tools::logm('in demo mode, you can\'t do this'); | 201 | Tools::logm('in demo mode, you can\'t do this'); |
202 | Tools::redirect('?view=config'); | ||
186 | } | 203 | } |
187 | else { | 204 | else { |
188 | if (isset($_POST['password']) && isset($_POST['password_repeat'])) { | 205 | if (isset($_POST['password']) && isset($_POST['password_repeat'])) { |
@@ -195,6 +212,7 @@ class Poche | |||
195 | } | 212 | } |
196 | else { | 213 | else { |
197 | $this->messages->add('e', 'the two fields have to be filled & the password must be the same in the two fields'); | 214 | $this->messages->add('e', 'the two fields have to be filled & the password must be the same in the two fields'); |
215 | Tools::redirect('?view=config'); | ||
198 | } | 216 | } |
199 | } | 217 | } |
200 | } | 218 | } |
@@ -205,7 +223,7 @@ class Poche | |||
205 | if (!empty($_POST['login']) && !empty($_POST['password'])) { | 223 | if (!empty($_POST['login']) && !empty($_POST['password'])) { |
206 | if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']))) { | 224 | if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']))) { |
207 | Tools::logm('login successful'); | 225 | Tools::logm('login successful'); |
208 | $this->messages->add('s', 'login successful, welcome to your poche'); | 226 | $this->messages->add('s', 'welcome to your poche'); |
209 | if (!empty($_POST['longlastingsession'])) { | 227 | if (!empty($_POST['longlastingsession'])) { |
210 | $_SESSION['longlastingsession'] = 31536000; | 228 | $_SESSION['longlastingsession'] = 31536000; |
211 | $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; | 229 | $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; |
@@ -216,11 +234,11 @@ class Poche | |||
216 | session_regenerate_id(true); | 234 | session_regenerate_id(true); |
217 | Tools::redirect($referer); | 235 | Tools::redirect($referer); |
218 | } | 236 | } |
219 | $this->messages->add('e', 'login failed, bad login or password'); | 237 | $this->messages->add('e', 'login failed: bad login or password'); |
220 | Tools::logm('login failed'); | 238 | Tools::logm('login failed'); |
221 | Tools::redirect(); | 239 | Tools::redirect(); |
222 | } else { | 240 | } else { |
223 | $this->messages->add('e', 'login failed, you have to fill all fields'); | 241 | $this->messages->add('e', 'login failed: you have to fill all fields'); |
224 | Tools::logm('login failed'); | 242 | Tools::logm('login failed'); |
225 | Tools::redirect(); | 243 | Tools::redirect(); |
226 | } | 244 | } |
@@ -228,7 +246,7 @@ class Poche | |||
228 | 246 | ||
229 | public function logout() | 247 | public function logout() |
230 | { | 248 | { |
231 | $this->messages->add('s', 'logout successful, see you soon!'); | 249 | $this->messages->add('s', 'see you soon!'); |
232 | Tools::logm('logout'); | 250 | Tools::logm('logout'); |
233 | Session::logout(); | 251 | Session::logout(); |
234 | Tools::redirect(); | 252 | Tools::redirect(); |
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 7bc8830a..8b339ea5 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -197,7 +197,7 @@ class Tools | |||
197 | { | 197 | { |
198 | if (DEBUG_POCHE) { | 198 | if (DEBUG_POCHE) { |
199 | $t = strval(date('Y/m/d_H:i:s')) . ' - ' . $_SERVER["REMOTE_ADDR"] . ' - ' . strval($message) . "\n"; | 199 | $t = strval(date('Y/m/d_H:i:s')) . ' - ' . $_SERVER["REMOTE_ADDR"] . ' - ' . strval($message) . "\n"; |
200 | file_put_contents('./log.txt', $t, FILE_APPEND); | 200 | file_put_contents(CACHE . '/log.txt', $t, FILE_APPEND); |
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
diff --git a/inc/poche/config.inc.php b/inc/poche/config.inc.php index d49df190..d91a44be 100644 --- a/inc/poche/config.inc.php +++ b/inc/poche/config.inc.php | |||
@@ -8,7 +8,7 @@ | |||
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
10 | 10 | ||
11 | define ('POCHE_VERSION', '1.0-alpha'); | 11 | define ('POCHE_VERSION', '1.0-beta'); |
12 | define ('MODE_DEMO', FALSE); | 12 | define ('MODE_DEMO', FALSE); |
13 | define ('DEBUG_POCHE', FALSE); | 13 | define ('DEBUG_POCHE', FALSE); |
14 | define ('CONVERT_LINKS_FOOTNOTES', FALSE); | 14 | define ('CONVERT_LINKS_FOOTNOTES', FALSE); |
@@ -22,24 +22,26 @@ define ('TPL', './tpl'); | |||
22 | define ('LOCALE', './locale'); | 22 | define ('LOCALE', './locale'); |
23 | define ('CACHE', './cache'); | 23 | define ('CACHE', './cache'); |
24 | define ('LANG', 'fr_FR.UTF8'); | 24 | define ('LANG', 'fr_FR.UTF8'); |
25 | define ('PAGINATION', '10'); | ||
26 | define ('THEME', 'light'); | ||
25 | $storage_type = 'sqlite'; # sqlite, mysql, (file, not yet) | 27 | $storage_type = 'sqlite'; # sqlite, mysql, (file, not yet) |
26 | 28 | ||
27 | # /!\ Be careful if you change the lines below /!\ | 29 | # /!\ Be careful if you change the lines below /!\ |
28 | require_once './inc/poche/Tools.class.php'; | 30 | require_once './inc/poche/Tools.class.php'; |
29 | require_once './inc/poche/Url.class.php'; | 31 | require_once './inc/poche/Url.class.php'; |
32 | require_once './inc/3rdparty/Session.class.php'; | ||
33 | require_once './inc/3rdparty/class.messages.php'; | ||
30 | require_once './inc/poche/Poche.class.php'; | 34 | require_once './inc/poche/Poche.class.php'; |
31 | require_once './inc/3rdparty/Readability.php'; | 35 | require_once './inc/3rdparty/Readability.php'; |
32 | require_once './inc/3rdparty/Encoding.php'; | 36 | require_once './inc/3rdparty/Encoding.php'; |
33 | require_once './inc/3rdparty/Session.class.php'; | ||
34 | require_once './inc/store/store.class.php'; | 37 | require_once './inc/store/store.class.php'; |
35 | require_once './inc/store/' . $storage_type . '.class.php'; | 38 | require_once './inc/store/' . $storage_type . '.class.php'; |
36 | require_once './vendor/autoload.php'; | 39 | require_once './vendor/autoload.php'; |
37 | require_once './inc/3rdparty/simple_html_dom.php'; | 40 | require_once './inc/3rdparty/simple_html_dom.php'; |
38 | require_once './inc/3rdparty/class.messages.php'; | 41 | require_once './inc/3rdparty/paginator.php'; |
39 | 42 | ||
40 | if (DOWNLOAD_PICTURES) { | 43 | if (DOWNLOAD_PICTURES) { |
41 | require_once './inc/poche/pochePictures.php'; | 44 | require_once './inc/poche/pochePictures.php'; |
42 | } | 45 | } |
43 | 46 | ||
44 | $poche = new Poche($storage_type); | 47 | $poche = new Poche($storage_type); \ No newline at end of file |
45 | $poche->messages = new Messages(); \ No newline at end of file | ||
diff --git a/inc/store/sqlite.class.php b/inc/store/sqlite.class.php index a15bc095..3e391e40 100644 --- a/inc/store/sqlite.class.php +++ b/inc/store/sqlite.class.php | |||
@@ -114,7 +114,7 @@ class Sqlite extends Store { | |||
114 | return $entry[0]; | 114 | return $entry[0]; |
115 | } | 115 | } |
116 | 116 | ||
117 | public function getEntriesByView($view) { | 117 | public function getEntriesByView($view, $limit = '') { |
118 | parent::__construct(); | 118 | parent::__construct(); |
119 | 119 | ||
120 | switch ($_SESSION['sort']) | 120 | switch ($_SESSION['sort']) |
@@ -152,6 +152,8 @@ class Sqlite extends Store { | |||
152 | break; | 152 | break; |
153 | } | 153 | } |
154 | 154 | ||
155 | $sql .= ' ' . $limit; | ||
156 | |||
155 | $query = $this->executeQuery($sql, $params); | 157 | $query = $this->executeQuery($sql, $params); |
156 | $entries = $query->fetchAll(); | 158 | $entries = $query->fetchAll(); |
157 | 159 | ||
@@ -62,7 +62,8 @@ else { | |||
62 | } | 62 | } |
63 | 63 | ||
64 | # because messages can be added in $poche->action(), we have to add this entry now (we can add it before) | 64 | # because messages can be added in $poche->action(), we have to add this entry now (we can add it before) |
65 | $tpl_vars = array_merge($tpl_vars, array('messages' => $poche->messages->display())); | 65 | $messages = $poche->messages->display('all', FALSE); |
66 | $tpl_vars = array_merge($tpl_vars, array('messages' => $messages)); | ||
66 | 67 | ||
67 | # Aaaaaaand action ! | 68 | # Aaaaaaand action ! |
68 | echo $poche->tpl->render($tpl_file, $tpl_vars); \ No newline at end of file | 69 | echo $poche->tpl->render($tpl_file, $tpl_vars); \ No newline at end of file |
diff --git a/tpl/_footer.twig b/tpl/_footer.twig index b1d7b8d4..a541e6ee 100644 --- a/tpl/_footer.twig +++ b/tpl/_footer.twig | |||
@@ -1,3 +1,3 @@ | |||
1 | <footer class="mr2 mt3 smaller"> | 1 | <footer class="w600p center mt3 smaller txtright"> |
2 | <p>{% trans "powered by" %} <a href="http://inthepoche.com">poche</a></p> | 2 | <p>{% trans "powered by" %} <a href="http://inthepoche.com">poche</a></p> |
3 | </footer> \ No newline at end of file | 3 | </footer> \ No newline at end of file |
diff --git a/tpl/_head.twig b/tpl/_head.twig index 9e82437f..f25f0471 100644 --- a/tpl/_head.twig +++ b/tpl/_head.twig | |||
@@ -4,5 +4,6 @@ | |||
4 | <link rel="apple-touch-icon-precomposed" href="./tpl/img/apple-touch-icon-precomposed.png"> | 4 | <link rel="apple-touch-icon-precomposed" href="./tpl/img/apple-touch-icon-precomposed.png"> |
5 | <link rel="stylesheet" href="./tpl/css/knacss.css" media="all"> | 5 | <link rel="stylesheet" href="./tpl/css/knacss.css" media="all"> |
6 | <link rel="stylesheet" href="./tpl/css/style.css" media="all"> | 6 | <link rel="stylesheet" href="./tpl/css/style.css" media="all"> |
7 | <link rel="stylesheet" href="./tpl/css/style-light.css" media="all" title="light-style"> | 7 | <link rel="stylesheet" href="./tpl/css/style-{{ constant('THEME') }}.css" media="all" title="{{ constant('THEME') }} theme"> |
8 | <link rel="stylesheet" href="./tpl/css/messages.css" media="all"> \ No newline at end of file | 8 | <link rel="stylesheet" href="./tpl/css/messages.css" media="all"> |
9 | <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> \ No newline at end of file | ||
diff --git a/tpl/_messages.twig b/tpl/_messages.twig index c9f01b55..679aa098 100644 --- a/tpl/_messages.twig +++ b/tpl/_messages.twig | |||
@@ -1,5 +1 @@ | |||
1 | <ul id="messages"> | {{ messages | raw }} \ No newline at end of file | |
2 | {% for message in messages %} | ||
3 | <li>{{ message|e }}</li> | ||
4 | {% endfor %} | ||
5 | </ul> \ No newline at end of file | ||
diff --git a/tpl/_top.twig b/tpl/_top.twig index daee44fc..ae01cc3f 100644 --- a/tpl/_top.twig +++ b/tpl/_top.twig | |||
@@ -1,3 +1,3 @@ | |||
1 | <header> | 1 | <header class="w600p center mbm"> |
2 | <h1><a href="./"><img src="./tpl/img/logo.png" alt="logo poche" /></a>poche</h1> | 2 | <h1><a href="./" title="{% trans "back to home" %}" ><img src="./tpl/img/logo.png" alt="logo poche" /></a></h1> |
3 | </header> \ No newline at end of file | 3 | </header> \ No newline at end of file |
diff --git a/tpl/config.twig b/tpl/config.twig index a8be93b0..95d5d8cf 100644 --- a/tpl/config.twig +++ b/tpl/config.twig | |||
@@ -11,49 +11,47 @@ | |||
11 | </ul> | 11 | </ul> |
12 | {% endblock %} | 12 | {% endblock %} |
13 | {% block content %} | 13 | {% block content %} |
14 | <div id="content"> | 14 | <h2>{% trans "Bookmarklet" %}</h2> |
15 | <h2>{% trans "Bookmarklet" %}</h2> | 15 | <p>{% trans "Thanks to the bookmarklet, you will be able to easily add a link to your poche." %} {% trans "Have a look to this documentation:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a>.</p> |
16 | <p>{% trans "Thanks to the bookmarklet, you will be able to easily add a link to your poche." %} {% trans "Have a look to this documentation:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a>.</p> | 16 | <p>{% trans "Drag & drop this link to your bookmarks bar and have fun with poche." %}</p> |
17 | <p>{% trans "Drag & drop this link to your bookmarks bar and have fun with poche." %}</p> | 17 | <p class="txtcenter"><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white; padding: 5px;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></p> |
18 | <p><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></p> | ||
19 | 18 | ||
20 | <h2>{% trans "Updating poche" %}</h2> | 19 | <h2>{% trans "Updating poche" %}</h2> |
21 | <p><ul> | 20 | <p><ul> |
22 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li> | 21 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li> |
23 | <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> | 22 | <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> |
24 | <li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> | 23 | <li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> |
25 | </ul> | 24 | </ul> |
26 | </p> | 25 | </p> |
27 | 26 | ||
28 | <h2>{% trans "Change your password" %}</h2> | 27 | <h2>{% trans "Change your password" %}</h2> |
29 | <form method="post" action="?config" name="loginform"> | 28 | <form method="post" action="?config" name="loginform"> |
30 | <fieldset class="w500p"> | 29 | <fieldset class="w500p"> |
31 | <div class="row"> | 30 | <div class="row"> |
32 | <label class="col w150p" for="password">{% trans "New password" %}</label> | 31 | <label class="col w150p" for="password">{% trans "New password:" %}</label> |
33 | <input class="col" type="password" id="password" name="password" placeholder="{% trans "Password" %}" tabindex="2"> | 32 | <input class="col" type="password" id="password" name="password" placeholder="{% trans "Password" %}" tabindex="2"> |
34 | </div> | 33 | </div> |
35 | <div class="row"> | 34 | <div class="row"> |
36 | <label class="col w150p" for="password_repeat">{% trans "Repeat your new password" %}</label> | 35 | <label class="col w150p" for="password_repeat">{% trans "Repeat your new password:" %}</label> |
37 | <input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="{% trans "Password" %}" tabindex="3"> | 36 | <input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="{% trans "Password" %}" tabindex="3"> |
38 | </div> | 37 | </div> |
39 | <div class="row mts txtcenter"> | 38 | <div class="row mts txtcenter"> |
40 | <button class="bouton" type="submit" tabindex="4">{% trans "Update" %}</button> | 39 | <button class="bouton" type="submit" tabindex="4">{% trans "Update" %}</button> |
41 | </div> | 40 | </div> |
42 | </fieldset> | 41 | </fieldset> |
43 | <input type="hidden" name="returnurl" value="{{ referer }}"> | 42 | <input type="hidden" name="returnurl" value="{{ referer }}"> |
44 | <input type="hidden" name="token" value="{{ token }}"> | 43 | <input type="hidden" name="token" value="{{ token }}"> |
45 | </form> | 44 | </form> |
46 | 45 | ||
47 | <h2>{% trans "Import" %}</h2> | 46 | <h2>{% trans "Import" %}</h2> |
48 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> | 47 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> |
49 | <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p> | 48 | <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p> |
50 | <p><ul> | 49 | <p><ul> |
51 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li> | 50 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li> |
52 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "readability" file on your server)</li> | 51 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "readability" file on your server)</li> |
53 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> (you must have a "instapaper-export.html" file on your server)</li> | 52 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> (you must have a "instapaper-export.html" file on your server)</li> |
54 | </ul></p> | 53 | </ul></p> |
55 | 54 | ||
56 | <h2>{% trans "Export your poche datas" %}</h2> | 55 | <h2>{% trans "Export your poche datas" %}</h2> |
57 | <p><a href="./?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p> | 56 | <p><a href="./?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p> |
58 | </div> | ||
59 | {% endblock %} \ No newline at end of file | 57 | {% endblock %} \ No newline at end of file |
diff --git a/tpl/css/messages.css b/tpl/css/messages.css index 702fac49..9222bb88 100755 --- a/tpl/css/messages.css +++ b/tpl/css/messages.css | |||
@@ -1,4 +1,4 @@ | |||
1 | .messages { width: 100%; -moz-border-radius: 4px; border-radius: 4px; display: block; padding: 10px 0; margin: 10px auto 10px; clear: both; } | 1 | .messages { width: 400px; -moz-border-radius: 4px; border-radius: 4px; display: block; padding: 10px 0; margin: 10px auto 10px; clear: both; } |
2 | .messages a.closeMessage { margin: -14px -8px 0 0; display:none; width: 16px; height: 16px; float: right; background: url(../img/messages/close.png) no-repeat; } | 2 | .messages a.closeMessage { margin: -14px -8px 0 0; display:none; width: 16px; height: 16px; float: right; background: url(../img/messages/close.png) no-repeat; } |
3 | /*.messages:hover a.closeMessage { visibility:visible; }*/ | 3 | /*.messages:hover a.closeMessage { visibility:visible; }*/ |
4 | .messages p { margin: 3px 0 3px 10px !important; padding: 0 10px 0 23px !important; font-size: 14px; line-height: 16px; } | 4 | .messages p { margin: 3px 0 3px 10px !important; padding: 0 10px 0 23px !important; font-size: 14px; line-height: 16px; } |
diff --git a/tpl/css/style-dark.css b/tpl/css/style-dark.css deleted file mode 100644 index 49fe1011..00000000 --- a/tpl/css/style-dark.css +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /*** GENERAL ***/ | ||
2 | body { | ||
3 | color: #fff; | ||
4 | background-color: #0d0d0d; | ||
5 | } | ||
6 | |||
7 | a, a:hover, a:visited { | ||
8 | color: #fff; | ||
9 | } | ||
10 | |||
11 | #main ul#links li a.current { | ||
12 | background-color: #000; | ||
13 | color: #fff; | ||
14 | } | ||
15 | |||
16 | #links a:hover, .backhome a:hover, .support a:hover{ | ||
17 | background-color: #fff; | ||
18 | color: #000; | ||
19 | } | ||
20 | |||
21 | input[type=submit].delete { | ||
22 | background : url('../img/dark/remove.png') no-repeat center center; | ||
23 | color : transparent; | ||
24 | } | ||
25 | |||
26 | #main .entrie { | ||
27 | color: #fff; | ||
28 | background-color: #000; | ||
29 | border: 1px solid #fff; | ||
30 | } | ||
31 | |||
32 | #main .entrie h2 a:hover { | ||
33 | color: #29B1E3; | ||
34 | } | ||
35 | |||
36 | a.fav span { | ||
37 | background: url('../img/dark/star-on.png') no-repeat; | ||
38 | } | ||
39 | |||
40 | a.fav span:hover { | ||
41 | background: url('../img/dark/star-off.png') no-repeat; | ||
42 | } | ||
43 | |||
44 | a.fav-off span { | ||
45 | background: url('../img/dark/star-off.png') no-repeat; | ||
46 | } | ||
47 | |||
48 | a.fav-off span:hover { | ||
49 | background: url('../img/dark/star-on.png') no-repeat; | ||
50 | } | ||
51 | |||
52 | a.archive span { | ||
53 | background: url('../img/dark/checkmark-on.png') no-repeat; | ||
54 | } | ||
55 | |||
56 | a.archive span:hover { | ||
57 | background: url('../img/dark/checkmark-off.png') no-repeat; | ||
58 | } | ||
59 | |||
60 | a.archive-off span { | ||
61 | background: url('../img/dark/checkmark-off.png') no-repeat; | ||
62 | } | ||
63 | |||
64 | a.archive-off span:hover { | ||
65 | background: url('../img/dark/checkmark-on.png') no-repeat; | ||
66 | } | ||
67 | |||
68 | a.twitter span { | ||
69 | background: url('../img/dark/twitter.png') no-repeat; | ||
70 | } | ||
71 | |||
72 | /*** ***/ | ||
73 | /*** ARTICLE PAGE ***/ | ||
74 | |||
75 | body.article { | ||
76 | color: #fff; | ||
77 | background-color: #0d0d0d; | ||
78 | } | ||
79 | |||
80 | #article header { | ||
81 | border-bottom: 1px solid #222222; | ||
82 | } | ||
83 | |||
84 | #article article { | ||
85 | border-bottom: 1px solid #222222; | ||
86 | } | ||
87 | |||
88 | .vieworiginal a { | ||
89 | color: #888888; | ||
90 | } | ||
91 | |||
92 | .entrie { | ||
93 | background-color: #fff; | ||
94 | } | ||
diff --git a/tpl/css/style-light.css b/tpl/css/style-light.css index 5d584eb3..9ea7955a 100644 --- a/tpl/css/style-light.css +++ b/tpl/css/style-light.css | |||
@@ -1,47 +1,12 @@ | |||
1 | /*** GENERAL ***/ | ||
2 | body { | ||
3 | color: #222222; | ||
4 | background-color: #F1F1F1; | ||
5 | } | ||
6 | |||
7 | a, a:hover, a:visited { | ||
8 | color: #000; | ||
9 | } | ||
10 | |||
11 | .bouton { | ||
12 | background-color: #000; | ||
13 | color: #fff; | ||
14 | border: none; | ||
15 | } | ||
16 | .bouton:hover { | ||
17 | background-color: #222222; | ||
18 | color: #F1F1F1; | ||
19 | } | ||
20 | 1 | ||
21 | #main ul#links li a.current { | 2 | a.back span { |
22 | background-color: #000; | 3 | background: url('../img/light/left.png') no-repeat; |
23 | color: #fff; | ||
24 | } | 4 | } |
25 | 5 | ||
26 | #links a:hover, .backhome a:hover, .support a:hover{ | 6 | a.top span { |
27 | background-color: #040707; | 7 | background: url('../img/light/top.png') no-repeat; |
28 | color: #F1F1F1; | ||
29 | } | 8 | } |
30 | 9 | ||
31 | input[type=submit].delete { | ||
32 | background : url('../img/light/remove.png') no-repeat center center; | ||
33 | color : transparent; | ||
34 | } | ||
35 | |||
36 | #main .entrie { | ||
37 | color: #2e2e2e; | ||
38 | background-color: #ffffff; | ||
39 | border: 1px solid #000; | ||
40 | } | ||
41 | |||
42 | #main .entrie h2 a:hover { | ||
43 | color: #F5BE00; | ||
44 | } | ||
45 | 10 | ||
46 | a.fav span { | 11 | a.fav span { |
47 | background: url('../img/light/star-on.png') no-repeat; | 12 | background: url('../img/light/star-on.png') no-repeat; |
@@ -83,26 +48,6 @@ a.email span { | |||
83 | background: url('../img/light/envelop.png') no-repeat; | 48 | background: url('../img/light/envelop.png') no-repeat; |
84 | } | 49 | } |
85 | 50 | ||
86 | /*** ***/ | 51 | a.delete span { |
87 | /*** ARTICLE PAGE ***/ | 52 | background: url('../img/light/remove.png') no-repeat; |
88 | 53 | } \ No newline at end of file | |
89 | body.article { | ||
90 | color: #222222; | ||
91 | background-color: #F1F1F1; | ||
92 | } | ||
93 | |||
94 | #article header { | ||
95 | border-bottom: 1px solid #222222; | ||
96 | } | ||
97 | |||
98 | #article article { | ||
99 | border-bottom: 1px solid #222222; | ||
100 | } | ||
101 | |||
102 | .vieworiginal a { | ||
103 | color: #888888; | ||
104 | } | ||
105 | |||
106 | .entrie { | ||
107 | background-color: #fff; | ||
108 | } | ||
diff --git a/tpl/css/style.css b/tpl/css/style.css index 333a0b77..8808b7ed 100644 --- a/tpl/css/style.css +++ b/tpl/css/style.css | |||
@@ -1,6 +1,6 @@ | |||
1 | /*** GENERAL ***/ | ||
2 | body { | 1 | body { |
3 | font: 20px/1.3em Palatino,Georgia,serif; | 2 | font-size: 16px; |
3 | font-family: 'Roboto', sans-serif; | ||
4 | margin: 10px; | 4 | margin: 10px; |
5 | } | 5 | } |
6 | 6 | ||
@@ -16,6 +16,10 @@ header h1 { | |||
16 | border-radius: 2px; | 16 | border-radius: 2px; |
17 | } | 17 | } |
18 | 18 | ||
19 | #main { | ||
20 | margin: 0 auto; | ||
21 | } | ||
22 | |||
19 | #main ul#links { | 23 | #main ul#links { |
20 | padding: 0; | 24 | padding: 0; |
21 | list-style-type: none; | 25 | list-style-type: none; |
@@ -36,6 +40,7 @@ header h1 { | |||
36 | padding: 0; | 40 | padding: 0; |
37 | list-style-type: none; | 41 | list-style-type: none; |
38 | text-align: center; | 42 | text-align: center; |
43 | opacity: 0.5; | ||
39 | } | 44 | } |
40 | 45 | ||
41 | #main ul#sort li { | 46 | #main ul#sort li { |
@@ -47,31 +52,16 @@ header h1 { | |||
47 | cursor: pointer; | 52 | cursor: pointer; |
48 | } | 53 | } |
49 | 54 | ||
50 | ul#messages { | ||
51 | |||
52 | } | ||
53 | 55 | ||
54 | #main, #article { | 56 | #links a{ |
55 | margin: 0 auto; | ||
56 | } | ||
57 | |||
58 | #links a, .backhome a, .support a{ | ||
59 | text-decoration: none; | 57 | text-decoration: none; |
60 | padding: 5px 10px; | 58 | padding: 5px 10px; |
61 | } | 59 | } |
62 | #links a:hover, .backhome a:hover, .support a:hover{ | 60 | #links a:hover{ |
63 | -webkit-border-radius: 2px; | 61 | -webkit-border-radius: 2px; |
64 | border-radius: 2px; | 62 | border-radius: 2px; |
65 | } | 63 | } |
66 | 64 | ||
67 | .support { | ||
68 | font-size: 14px; | ||
69 | } | ||
70 | |||
71 | footer { | ||
72 | text-align: right; | ||
73 | } | ||
74 | |||
75 | /*** ***/ | 65 | /*** ***/ |
76 | /*** LINKS DISPLAY ***/ | 66 | /*** LINKS DISPLAY ***/ |
77 | 67 | ||
@@ -80,33 +70,41 @@ footer { | |||
80 | cursor: pointer; | 70 | cursor: pointer; |
81 | } | 71 | } |
82 | 72 | ||
83 | input[type=submit].delete { | ||
84 | width : 16px; | ||
85 | height :16px; | ||
86 | border : none; | ||
87 | cursor: pointer; | ||
88 | font-size : 0; | ||
89 | } | ||
90 | |||
91 | #main #content { | 73 | #main #content { |
92 | margin-top: 20px; | 74 | margin-top: 20px; |
93 | } | 75 | } |
94 | 76 | ||
95 | #main .entrie { | 77 | #main #content h2 { |
96 | padding: 15px; | 78 | font-size: 1.3em; |
97 | min-height: 8em; | 79 | text-decoration: none; |
98 | border: 1px solid; | 80 | } |
81 | |||
82 | #main #content .entrie { | ||
83 | border-bottom: 1px solid #222222; | ||
99 | } | 84 | } |
100 | 85 | ||
101 | #main .entrie h2 a { | 86 | #main .entrie h2 a { |
102 | text-decoration: none; | 87 | text-decoration: none; |
103 | } | 88 | } |
104 | 89 | ||
90 | #main .entrie ul.tools { | ||
91 | list-style-type: none; | ||
92 | } | ||
93 | |||
94 | #main .entrie ul.tools li { | ||
95 | /*display: inline;*/ | ||
96 | } | ||
97 | |||
105 | .tools { | 98 | .tools { |
106 | float: right; | 99 | float: right; |
107 | text-align: right; | 100 | text-align: right; |
101 | opacity: 0.5; | ||
108 | } | 102 | } |
109 | 103 | ||
104 | .tools p { | ||
105 | font-size: 0.8em;} | ||
106 | |||
107 | /* | ||
110 | .tools ul { | 108 | .tools ul { |
111 | padding: 0; margin: 0; | 109 | padding: 0; margin: 0; |
112 | list-style-type: none; | 110 | list-style-type: none; |
@@ -118,19 +116,7 @@ input[type=submit].delete { | |||
118 | 116 | ||
119 | .tools a.tool { | 117 | .tools a.tool { |
120 | cursor: pointer; | 118 | cursor: pointer; |
121 | } | 119 | }*/ |
122 | |||
123 | #article .tools { | ||
124 | position: relative; | ||
125 | display: inline; | ||
126 | top: 0px; | ||
127 | right: 0px; | ||
128 | width: 100%; | ||
129 | } | ||
130 | |||
131 | #article .tools ul li{ | ||
132 | display: inline; | ||
133 | } | ||
134 | 120 | ||
135 | #main .entrie .tools a.tool span, #article .tools a.tool span { | 121 | #main .entrie .tools a.tool span, #article .tools a.tool span { |
136 | display: inline-block; | 122 | display: inline-block; |
@@ -146,10 +132,9 @@ input[type=submit].delete { | |||
146 | /*** ***/ | 132 | /*** ***/ |
147 | /*** ARTICLE PAGE ***/ | 133 | /*** ARTICLE PAGE ***/ |
148 | 134 | ||
149 | body.article { | 135 | #article { |
150 | font: 20px/1.3em Palatino,Georgia,serif; | 136 | margin: 0 auto; |
151 | } | 137 | } |
152 | |||
153 | #article header { | 138 | #article header { |
154 | text-align: left; | 139 | text-align: left; |
155 | } | 140 | } |
@@ -158,58 +143,106 @@ body.article { | |||
158 | text-decoration: none; | 143 | text-decoration: none; |
159 | } | 144 | } |
160 | 145 | ||
161 | .vieworiginal a { | 146 | .vieworiginal a, .vieworiginal a:hover, .vieworiginal a:visited { |
162 | text-decoration: none; | 147 | text-decoration: none; |
148 | color: #888888; | ||
163 | } | 149 | } |
164 | 150 | ||
165 | .backhome { | 151 | .backhome { |
166 | display: inline; | 152 | display: inline; |
167 | } | 153 | } |
168 | 154 | ||
155 | #article .tools { | ||
156 | position: relative; | ||
157 | display: inline; | ||
158 | top: 0px; | ||
159 | right: 0px; | ||
160 | width: 100%; | ||
161 | } | ||
162 | |||
163 | #article .tools ul li{ | ||
164 | display: inline; | ||
165 | } | ||
166 | |||
167 | |||
168 | /*** GENERAL ***/ | ||
169 | body { | ||
170 | color: #000; | ||
171 | } | ||
172 | |||
173 | a, a:hover, a:visited { | ||
174 | color: #000; | ||
175 | } | ||
176 | |||
177 | .bouton { | ||
178 | background-color: #000; | ||
179 | color: #fff; | ||
180 | border: none; | ||
181 | } | ||
182 | .bouton:hover { | ||
183 | background-color: #222222; | ||
184 | color: #F1F1F1; | ||
185 | } | ||
186 | |||
187 | #main ul#links li a.current { | ||
188 | background-color: #000; | ||
189 | color: #fff; | ||
190 | } | ||
191 | |||
192 | #links a:hover{ | ||
193 | background-color: #040707; | ||
194 | color: #F1F1F1; | ||
195 | } | ||
196 | |||
197 | |||
169 | /*** ***/ | 198 | /*** ***/ |
199 | /*** ARTICLE PAGE ***/ | ||
170 | 200 | ||
171 | #main | 201 | #article header, #article article { |
172 | { | 202 | border-bottom: 1px solid #222222; |
173 | max-width: 60em; /* 960 px */ | ||
174 | margin: 0 auto; | ||
175 | } | 203 | } |
176 | #content | 204 | |
177 | { | 205 | |
178 | width: 103.125%; /* 990px */ | 206 | /* Pagination */ |
179 | overflow: hidden; | 207 | .pagination { |
180 | margin-left: -1.562%; /* 15px */ | 208 | clear: both; |
181 | margin-bottom: -1.875em; /* 30px */ | 209 | padding-bottom: 20px; |
182 | } | 210 | padding-top: 10px; |
183 | 211 | text-align: right; | |
184 | .entrie | 212 | } |
185 | { | 213 | .pagination a { |
186 | width: 30.303%; /* 300px */ | 214 | border: 1px solid #D5D5D5; |
187 | background-color: #fff; | 215 | color: #333; |
188 | float: left; | 216 | font-size: 11px; |
189 | margin: 0 1.515% 1.875em; /* 15px 30px */ | 217 | font-weight: bold; |
190 | } | 218 | height: 25px; |
191 | 219 | padding: 4px 8px; | |
192 | @media only screen and ( max-width: 40em ) /* 640px */ | 220 | text-decoration: none; |
193 | { | 221 | margin:2px; |
194 | .entrie | 222 | } |
195 | { | 223 | .pagination a:hover, .pagination a:active { |
196 | width: 46.876%; /* 305px */ | 224 | background:#efefef; |
197 | margin-bottom: 0.938em; /* 15px */ | 225 | } |
198 | } | 226 | .pagination span.current { |
199 | } | 227 | background-color: #ccc; |
200 | 228 | border: 1px solid #D5D5D5; | |
201 | @media only screen and ( max-width: 20em ) /* 320px */ | 229 | color: #000; |
202 | { | 230 | font-size: 11px; |
203 | #content | 231 | font-weight: bold; |
204 | { | 232 | height: 25px; |
205 | width: 100%; | 233 | padding: 4px 8px; |
206 | margin-left: 0; | 234 | text-decoration: none; |
207 | } | 235 | margin:2px; |
208 | 236 | } | |
209 | .entrie | 237 | .pagination span.disabled { |
210 | { | 238 | border: 1px solid #EEEEEE; |
211 | width: 100%; | 239 | color: #DDDDDD; |
212 | margin-left: 0; | 240 | margin:2px; |
213 | margin-right: 0; | 241 | padding: 4px 8px; |
214 | } | 242 | font-size: 11px; |
243 | font-weight: bold; | ||
244 | } | ||
245 | |||
246 | footer { | ||
247 | clear: both; | ||
215 | } \ No newline at end of file | 248 | } \ No newline at end of file |
diff --git a/tpl/home.twig b/tpl/home.twig index 6d0f1a66..3cccbb76 100644 --- a/tpl/home.twig +++ b/tpl/home.twig | |||
@@ -5,39 +5,29 @@ | |||
5 | {% endblock %} | 5 | {% endblock %} |
6 | {% block precontent %} | 6 | {% block precontent %} |
7 | <ul id="sort"> | 7 | <ul id="sort"> |
8 | <li><a href="./?sort=ia"><img src="./tpl/img/up.png" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id"><img src="./tpl/img/down.png" title="{% trans "by date desc" %}" /></a></li> | 8 | <li><a href="./?sort=ia&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by date asc" %}" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li> |
9 | <li><a href="./?sort=ta"><img src="./tpl/img/up.png" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td"><img src="./tpl/img/down.png" title="{% trans "by title desc" %}" /></a></li> | 9 | <li><a href="./?sort=ta&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by title asc" %}" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li> |
10 | </ul> | 10 | </ul> |
11 | {% endblock %} | 11 | {% endblock %} |
12 | {% block messages %} | ||
13 | {% include '_messages.twig' %} | ||
14 | {% endblock %} | ||
15 | {% block content %} | 12 | {% block content %} |
16 | <div id="content"> | 13 | {{ page_links | raw }} |
17 | {% for entry in entries %} | 14 | {% for entry in entries %} |
18 | <div id="entry-{{ entry.id|e }}" class="entrie mb2"> | 15 | <div id="entry-{{ entry.id|e }}" class="entrie"> |
19 | <span class="content"> | 16 | <h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|e }}</a></h2> |
20 | <h2 class="h6-like"> | 17 | <ul class="tools"> |
21 | <a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|e }}</a> | 18 | <li> |
22 | </h2> | 19 | <a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span></span></a></li> |
23 | <div class="tools"> | 20 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span></span></a></li> |
24 | <ul> | 21 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span></span></a></li> |
25 | <li> | 22 | </li> |
26 | <a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span></span></a></li> | 23 | </ul> |
27 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span></span></a></li> | 24 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> |
28 | <li><form method="post" style="display: inline;"><input type="hidden" name="token" id="token" value="{{ token }}" /><input type="hidden" id="action" name="action" value="delete" /><input type="hidden" id="view" name="view" value="{{ view }}" /><input type="hidden" id="id" name="id" value="{{ entry.id|e }}" /><input type="submit" class="delete" title="{% trans "toggle delete" %}" /></form> | 25 | <p class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></p> |
29 | </li> | ||
30 | </ul> | ||
31 | </div> | ||
32 | <div class="url">{{ entry.url | e | getDomain }}</div> | ||
33 | </span> | ||
34 | </div> | ||
35 | {% endfor %} | ||
36 | </div> | 26 | </div> |
27 | {% endfor %} | ||
28 | {{ page_links | raw }} | ||
37 | {% endblock %} | 29 | {% endblock %} |
38 | 30 | ||
39 | {% block js %} | 31 | {% block js %} |
40 | <script type="text/javascript" src="./tpl/js/jquery-1.9.1.min.js"></script> | 32 | <script type="text/javascript" src="./tpl/js/jquery-1.9.1.min.js"></script> |
41 | <script type="text/javascript" src="./tpl/js/jquery.masonry.min.js"></script> | ||
42 | <script type="text/javascript">$(window).load(function(){var e=3,t=function(){e=$(window).width()>640?3:$(window).width()>320?2:1};t();$(window).resize(t);$("#content").masonry({itemSelector:".entrie",columnWidth:function(t){return t/e}})})</script> | ||
43 | {% endblock %} \ No newline at end of file | 33 | {% endblock %} \ No newline at end of file |
diff --git a/tpl/img/dark/checkmark-off.png b/tpl/img/dark/checkmark-off.png deleted file mode 100644 index efc3439f..00000000 --- a/tpl/img/dark/checkmark-off.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/checkmark-on.png b/tpl/img/dark/checkmark-on.png deleted file mode 100644 index 24391c2e..00000000 --- a/tpl/img/dark/checkmark-on.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/down.png b/tpl/img/dark/down.png deleted file mode 100644 index 41ea9604..00000000 --- a/tpl/img/dark/down.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/logo.png b/tpl/img/dark/logo.png deleted file mode 100644 index 9fba0642..00000000 --- a/tpl/img/dark/logo.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/remove.png b/tpl/img/dark/remove.png deleted file mode 100644 index 41786fd7..00000000 --- a/tpl/img/dark/remove.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/star-off.png b/tpl/img/dark/star-off.png deleted file mode 100644 index 90651b54..00000000 --- a/tpl/img/dark/star-off.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/star-on.png b/tpl/img/dark/star-on.png deleted file mode 100644 index 7fc14477..00000000 --- a/tpl/img/dark/star-on.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/twitter.png b/tpl/img/dark/twitter.png deleted file mode 100755 index 4595affb..00000000 --- a/tpl/img/dark/twitter.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/dark/up.png b/tpl/img/dark/up.png deleted file mode 100644 index 1679e18f..00000000 --- a/tpl/img/dark/up.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/tpl/img/down.png b/tpl/img/light/down.png index b9d536a7..b9d536a7 100644 --- a/tpl/img/down.png +++ b/tpl/img/light/down.png | |||
Binary files differ | |||
diff --git a/tpl/img/light/left.png b/tpl/img/light/left.png new file mode 100755 index 00000000..a0a53631 --- /dev/null +++ b/tpl/img/light/left.png | |||
Binary files differ | |||
diff --git a/tpl/img/up.png b/tpl/img/light/top.png index 954a8c0a..954a8c0a 100644..100755 --- a/tpl/img/up.png +++ b/tpl/img/light/top.png | |||
Binary files differ | |||
diff --git a/tpl/layout.twig b/tpl/layout.twig index 9dc83efe..e4b5f5b3 100644 --- a/tpl/layout.twig +++ b/tpl/layout.twig | |||
@@ -12,13 +12,17 @@ | |||
12 | {% include '_head.twig' %} | 12 | {% include '_head.twig' %} |
13 | {% include '_bookmarklet.twig' %} | 13 | {% include '_bookmarklet.twig' %} |
14 | </head> | 14 | </head> |
15 | <body class="light-style"> | 15 | <body> |
16 | {% include '_top.twig' %} | 16 | {% include '_top.twig' %} |
17 | <div id="main"> | 17 | <div id="main"> |
18 | {% block menu %}{% endblock %} | 18 | {% block menu %}{% endblock %} |
19 | {% block precontent %}{% endblock %} | 19 | {% block precontent %}{% endblock %} |
20 | {% block messages %}{% endblock %} | 20 | {% block messages %} |
21 | {% include '_messages.twig' %} | ||
22 | {% endblock %} | ||
23 | <div id="content" class="w600p center"> | ||
21 | {% block content %}{% endblock %} | 24 | {% block content %}{% endblock %} |
25 | </div> | ||
22 | {% block js %}{% endblock %} | 26 | {% block js %}{% endblock %} |
23 | </div> | 27 | </div> |
24 | {% include '_footer.twig' %} | 28 | {% include '_footer.twig' %} |
diff --git a/tpl/view.twig b/tpl/view.twig index 692f9555..d0d85f8b 100644 --- a/tpl/view.twig +++ b/tpl/view.twig | |||
@@ -1,18 +1,17 @@ | |||
1 | {% extends "layout.twig" %} | 1 | {% extends "layout.twig" %} |
2 | {% block title %}{% trans "home" %}{% endblock %} | 2 | {% block title %}{% trans "home" %}{% endblock %} |
3 | {% block messages %} | ||
4 | {% include '_messages.twig' %} | ||
5 | {% endblock %} | ||
6 | {% block content %} | 3 | {% block content %} |
7 | <div id="article" class="w600p"> | 4 | <div id="article"> |
8 | <div class="tools"> | 5 | <div class="tools"> |
9 | <ul> | 6 | <ul class="tools"> |
10 | <li><a href="./" title="{% trans "back to home" %}" class="tool">←</a></li> | 7 | <li> |
11 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span></span></a></li> | 8 | <li><a href="{{ referer }}" title="{% trans "back to home" %}" class="tool back"><span></span></a></li> |
12 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span></span></a></li> | 9 | <a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span></span></a></li> |
13 | <li><form method="post" style="display: inline;" action="index.php"><input type="hidden" name="token" id="token" value="{{ token }}" /><input type="hidden" id="view" name="view" value="index" /><input type="hidden" id="action" name="action" value="delete" /><input type="hidden" id="id" name="id" value="{{ entry.id|e }}" /><input type="submit" class="delete" title="{% trans "toggle delete" %}" /></form></li> | 10 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span></span></a></li> |
14 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title}}%20{{ entry.url|e }}%20via%20@getpoche" target="_blank" class="tool twitter"><span></span></a></li>{% endif %} | 11 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span></span></a></li> |
15 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|e }}&body={{ entry.url|e }} via @getpoche" class="tool email"><span></span></a></li>{% endif %} | 12 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title}}%20{{ entry.url|e }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span></span></a></li>{% endif %} |
13 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|e }}&body={{ entry.url|e }} via @getpoche" class="tool email" title="{% trans "email" %}"><span></span></a></li>{% endif %} | ||
14 | </li> | ||
16 | </ul> | 15 | </ul> |
17 | </div> | 16 | </div> |
18 | <header class="mbm"> | 17 | <header class="mbm"> |
@@ -20,17 +19,22 @@ | |||
20 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> | 19 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> |
21 | </header> | 20 | </header> |
22 | <article> | 21 | <article> |
23 | <div id="readityourselfcontent"> | 22 | {{ content | raw }} |
24 | {{ content | raw }} | 23 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> |
25 | </div> | ||
26 | </article> | 24 | </article> |
27 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> | 25 | <div class="tools"> |
28 | <div class="backhome"> | 26 | <ul class="tools"> |
29 | <a href="./" title="{% trans "back to home" %}">←</a> | 27 | <li> |
30 | <a href="#" title="{% trans "back to top" %}">↑</a> | 28 | <li><a href="{{ referer }}" title="{% trans "back to home" %}" class="tool back"><span></span></a></li> |
31 | </div> | 29 | <li><a href="#" title="{% trans "back to top" %}" class="tool top"><span></span></a></li> |
32 | <div class="support"> | 30 | <a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span></span></a></li> |
33 | {% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong display in poche&body={{ entry.url|e }}">{% trans "contact us by mail" %}</a> | 31 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span></span></a></li> |
32 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span></span></a></li> | ||
33 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title}}%20{{ entry.url|e }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span></span></a></li>{% endif %} | ||
34 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|e }}&body={{ entry.url|e }} via @getpoche" class="tool email" title="{% trans "email" %}"><span></span></a></li>{% endif %} | ||
35 | </li> | ||
36 | </ul> | ||
37 | <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong display in poche&body={{ entry.url|e }}">{% trans "contact us by mail" %}</a></p> | ||
34 | </div> | 38 | </div> |
35 | </div> | 39 | </div> |
36 | {% endblock %} | 40 | {% endblock %} |