diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2014-02-03 10:03:41 -0800 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2014-02-03 10:03:41 -0800 |
commit | 38dafee05d52948fba4a06066d7b0343c8e3de9d (patch) | |
tree | 2e3f7bd3a58bfdb046742c3e65ff082e31a9859b | |
parent | f355d2c87fa441221ca8a9339c426c1c95e7c2ac (diff) | |
parent | fa0bfb775a53a074e0a9d642298685b5ed1af83f (diff) | |
download | wallabag-1.4.0.tar.gz wallabag-1.4.0.tar.zst wallabag-1.4.0.zip |
Merge pull request #427 from wallabag/dev1.4.0
changelog 1.4
84 files changed, 1397 insertions, 173 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c89411f3..7fdca652 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
@@ -1,11 +1,11 @@ | |||
1 | # How contributing | 1 | # How contributing |
2 | 2 | ||
3 | ## You found a bug | 3 | ## You found a bug |
4 | Please [open a new issue](https://github.com/inthepoche/poche/issues/new). | 4 | Please [open a new issue](https://github.com/wallabag/demo.wallabag.org/issues/new). |
5 | 5 | ||
6 | To fix the bug quickly, we need some infos: | 6 | To fix the bug quickly, we need some infos: |
7 | * your poche version (in ./inc/poche/myconfig.inc.php) | 7 | * your demo.wallabag.org version (in ./index.php) |
8 | * the link you want to poche and which causes problem | 8 | * the link you want to save and which causes problem |
9 | 9 | ||
10 | ## You want to fix a bug or to add a feature | 10 | ## You want to fix a bug or to add a feature |
11 | Please fork poche and work with **the dev branch** only. Do not work on master branch. | 11 | Please fork wallabag and work with **the dev branch** only. **Do not work on master branch**. \ No newline at end of file |
@@ -1,4 +1,4 @@ | |||
1 | poche is based on : | 1 | wallabag is based on : |
2 | * PHP Readability https://bitbucket.org/fivefilters/php-readability | 2 | * PHP Readability https://bitbucket.org/fivefilters/php-readability |
3 | * Full Text RSS http://code.fivefilters.org/full-text-rss/src | 3 | * Full Text RSS http://code.fivefilters.org/full-text-rss/src |
4 | * Encoding https://github.com/neitanod/forceutf8 | 4 | * Encoding https://github.com/neitanod/forceutf8 |
@@ -10,6 +10,6 @@ poche is based on : | |||
10 | * Flash messages https://github.com/plasticbrain/PHP-Flash-Messages | 10 | * Flash messages https://github.com/plasticbrain/PHP-Flash-Messages |
11 | * Pagination https://github.com/daveismyname/pagination | 11 | * Pagination https://github.com/daveismyname/pagination |
12 | 12 | ||
13 | poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License | 13 | wallabag is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License |
14 | 14 | ||
15 | Contributors : https://github.com/inthepoche/poche/graphs/contributors \ No newline at end of file | 15 | Contributors : https://github.com/wallabag/wallabag/graphs/contributors \ No newline at end of file |
diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index df245ff0..00000000 --- a/INSTALL.md +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | # Installing poche | ||
2 | |||
3 | Read the full documentation here: http://doc.inthepoche.com/doku.php?id=users:begin:install | ||
diff --git a/TODO.md b/TODO.md deleted file mode 100644 index fdba2a51..00000000 --- a/TODO.md +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | # TODO | ||
2 | |||
3 | * pouvoir annuler la suppression | ||
4 | * conventions codage ? phing ? vérifier error_log qui trainent | ||
5 | * phpDocumentor | ||
6 | * minifier css | ||
7 | * barre fixe d'admin sur la page d'un billet ? | ||
8 | * revoir export (export vers pocket &cie ? ) | ||
9 | * raccourcis clavier \ No newline at end of file | ||
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 04731821..0457af69 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
@@ -165,9 +165,14 @@ class Database { | |||
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
168 | public function login($username, $password) { | 168 | public function login($username, $password, $isauthenticated=false) { |
169 | $sql = "SELECT * FROM users WHERE username=? AND password=?"; | 169 | if ($isauthenticated) { |
170 | $query = $this->executeQuery($sql, array($username, $password)); | 170 | $sql = "SELECT * FROM users WHERE username=?"; |
171 | $query = $this->executeQuery($sql, array($username)); | ||
172 | } else { | ||
173 | $sql = "SELECT * FROM users WHERE username=? AND password=?"; | ||
174 | $query = $this->executeQuery($sql, array($username, $password)); | ||
175 | } | ||
171 | $login = $query->fetchAll(); | 176 | $login = $query->fetchAll(); |
172 | 177 | ||
173 | $user = array(); | 178 | $user = array(); |
@@ -193,7 +198,7 @@ class Database { | |||
193 | public function updateUserConfig($userId, $key, $value) { | 198 | public function updateUserConfig($userId, $key, $value) { |
194 | $config = $this->getConfigUser($userId); | 199 | $config = $this->getConfigUser($userId); |
195 | 200 | ||
196 | if (!isset ($user_config[$key])) { | 201 | if (! isset($config[$key])) { |
197 | $sql = "INSERT INTO users_config (value, user_id, name) VALUES (?, ?, ?)"; | 202 | $sql = "INSERT INTO users_config (value, user_id, name) VALUES (?, ?, ?)"; |
198 | } | 203 | } |
199 | else { | 204 | else { |
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 76a73be2..4df90067 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
@@ -22,15 +22,6 @@ class Poche | |||
22 | private $currentTheme = ''; | 22 | private $currentTheme = ''; |
23 | private $currentLanguage = ''; | 23 | private $currentLanguage = ''; |
24 | private $notInstalledMessage = array(); | 24 | private $notInstalledMessage = array(); |
25 | |||
26 | # @todo make this dynamic (actually install themes and save them in the database including author information et cetera) | ||
27 | private $installedThemes = array( | ||
28 | 'default' => array('requires' => array()), | ||
29 | 'dark' => array('requires' => array('default')), | ||
30 | 'dmagenta' => array('requires' => array('default')), | ||
31 | 'solarized' => array('requires' => array('default')), | ||
32 | 'solarized-dark' => array('requires' => array('default')) | ||
33 | ); | ||
34 | 25 | ||
35 | public function __construct() | 26 | public function __construct() |
36 | { | 27 | { |
@@ -110,7 +101,7 @@ class Poche | |||
110 | $passTheme = TRUE; | 101 | $passTheme = TRUE; |
111 | # Twig is an absolute requirement for Poche to function. Abort immediately if the Composer installer hasn't been run yet | 102 | # Twig is an absolute requirement for Poche to function. Abort immediately if the Composer installer hasn't been run yet |
112 | if (! self::$canRenderTemplates) { | 103 | if (! self::$canRenderTemplates) { |
113 | $this->notInstalledMessage[] = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at <a href="http://doc.inthepoche.com/doku.php?id=users:begin:install">the documentation.</a>'; | 104 | $this->notInstalledMessage[] = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at <a href="http://doc.wallabag.org/doku.php?id=users:begin:install">the documentation.</a>'; |
114 | $passTheme = FALSE; | 105 | $passTheme = FALSE; |
115 | } | 106 | } |
116 | 107 | ||
@@ -123,21 +114,26 @@ class Poche | |||
123 | } | 114 | } |
124 | 115 | ||
125 | # Check if the selected theme and its requirements are present | 116 | # Check if the selected theme and its requirements are present |
126 | if ($this->getTheme() != '' && ! is_dir(THEME . '/' . $this->getTheme())) { | 117 | $theme = $this->getTheme(); |
127 | $this->notInstalledMessage[] = 'The currently selected theme (' . $this->getTheme() . ') does not seem to be properly installed (Missing directory: ' . THEME . '/' . $this->getTheme() . ')'; | 118 | |
119 | if ($theme != '' && ! is_dir(THEME . '/' . $theme)) { | ||
120 | $this->notInstalledMessage[] = 'The currently selected theme (' . $theme . ') does not seem to be properly installed (Missing directory: ' . THEME . '/' . $theme . ')'; | ||
128 | 121 | ||
129 | self::$canRenderTemplates = false; | 122 | self::$canRenderTemplates = false; |
130 | 123 | ||
131 | $passTheme = FALSE; | 124 | $passTheme = FALSE; |
132 | } | 125 | } |
133 | 126 | ||
134 | foreach ($this->installedThemes[$this->getTheme()]['requires'] as $requiredTheme) { | 127 | $themeInfo = $this->getThemeInfo($theme); |
135 | if (! is_dir(THEME . '/' . $requiredTheme)) { | 128 | if (isset($themeInfo['requirements']) && is_array($themeInfo['requirements'])) { |
136 | $this->notInstalledMessage[] = 'The required "' . $requiredTheme . '" theme is missing for the current theme (' . $this->getTheme() . ')'; | 129 | foreach ($themeInfo['requirements'] as $requiredTheme) { |
130 | if (! is_dir(THEME . '/' . $requiredTheme)) { | ||
131 | $this->notInstalledMessage[] = 'The required "' . $requiredTheme . '" theme is missing for the current theme (' . $theme . ')'; | ||
137 | 132 | ||
138 | self::$canRenderTemplates = false; | 133 | self::$canRenderTemplates = false; |
139 | 134 | ||
140 | $passTheme = FALSE; | 135 | $passTheme = FALSE; |
136 | } | ||
141 | } | 137 | } |
142 | } | 138 | } |
143 | 139 | ||
@@ -193,32 +189,36 @@ class Poche | |||
193 | private function initTpl() | 189 | private function initTpl() |
194 | { | 190 | { |
195 | $loaderChain = new Twig_Loader_Chain(); | 191 | $loaderChain = new Twig_Loader_Chain(); |
192 | $theme = $this->getTheme(); | ||
196 | 193 | ||
197 | # add the current theme as first to the loader chain so Twig will look there first for overridden template files | 194 | # add the current theme as first to the loader chain so Twig will look there first for overridden template files |
198 | try { | 195 | try { |
199 | $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . $this->getTheme())); | 196 | $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . $theme)); |
200 | } catch (Twig_Error_Loader $e) { | 197 | } catch (Twig_Error_Loader $e) { |
201 | # @todo isInstalled() should catch this, inject Twig later | 198 | # @todo isInstalled() should catch this, inject Twig later |
202 | die('The currently selected theme (' . $this->getTheme() . ') does not seem to be properly installed (' . THEME . '/' . $this->getTheme() .' is missing)'); | 199 | die('The currently selected theme (' . $theme . ') does not seem to be properly installed (' . THEME . '/' . $theme .' is missing)'); |
203 | } | 200 | } |
204 | 201 | ||
205 | # add all required themes to the loader chain | 202 | # add all required themes to the loader chain |
206 | foreach ($this->installedThemes[$this->getTheme()]['requires'] as $requiredTheme) { | 203 | $themeInfo = $this->getThemeInfo($theme); |
207 | try { | 204 | if (isset($themeInfo['requirements']) && is_array($themeInfo['requirements'])) { |
208 | $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . DEFAULT_THEME)); | 205 | foreach ($themeInfo['requirements'] as $requiredTheme) { |
209 | } catch (Twig_Error_Loader $e) { | 206 | try { |
210 | # @todo isInstalled() should catch this, inject Twig later | 207 | $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . $requiredTheme)); |
211 | die('The required "' . $requiredTheme . '" theme is missing for the current theme (' . $this->getTheme() . ')'); | 208 | } catch (Twig_Error_Loader $e) { |
209 | # @todo isInstalled() should catch this, inject Twig later | ||
210 | die('The required "' . $requiredTheme . '" theme is missing for the current theme (' . $theme . ')'); | ||
211 | } | ||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | if (DEBUG_POCHE) { | 215 | if (DEBUG_POCHE) { |
216 | $twig_params = array(); | 216 | $twigParams = array(); |
217 | } else { | 217 | } else { |
218 | $twig_params = array('cache' => CACHE); | 218 | $twigParams = array('cache' => CACHE); |
219 | } | 219 | } |
220 | 220 | ||
221 | $this->tpl = new Twig_Environment($loaderChain, $twig_params); | 221 | $this->tpl = new Twig_Environment($loaderChain, $twigParams); |
222 | $this->tpl->addExtension(new Twig_Extensions_Extension_I18n()); | 222 | $this->tpl->addExtension(new Twig_Extensions_Extension_I18n()); |
223 | 223 | ||
224 | # filter to display domain name of an url | 224 | # filter to display domain name of an url |
@@ -234,7 +234,7 @@ class Poche | |||
234 | $this->tpl->addFilter($filter); | 234 | $this->tpl->addFilter($filter); |
235 | } | 235 | } |
236 | 236 | ||
237 | private function install() | 237 | private function install() |
238 | { | 238 | { |
239 | Tools::logm('poche still not installed'); | 239 | Tools::logm('poche still not installed'); |
240 | echo $this->tpl->render('install.twig', array( | 240 | echo $this->tpl->render('install.twig', array( |
@@ -265,34 +265,59 @@ class Poche | |||
265 | return $this->currentTheme; | 265 | return $this->currentTheme; |
266 | } | 266 | } |
267 | 267 | ||
268 | public function getLanguage() { | 268 | /** |
269 | return $this->currentLanguage; | 269 | * Provides theme information by parsing theme.ini file if present in the theme's root directory. |
270 | * In all cases, the following data will be returned: | ||
271 | * - name: theme's name, or key if the theme is unnamed, | ||
272 | * - current: boolean informing if the theme is the current user theme. | ||
273 | * | ||
274 | * @param string $theme Theme key (directory name) | ||
275 | * @return array|boolean Theme information, or false if the theme doesn't exist. | ||
276 | */ | ||
277 | public function getThemeInfo($theme) { | ||
278 | if (!is_dir(THEME . '/' . $theme)) { | ||
279 | return false; | ||
280 | } | ||
281 | |||
282 | $themeIniFile = THEME . '/' . $theme . '/theme.ini'; | ||
283 | $themeInfo = array(); | ||
284 | |||
285 | if (is_file($themeIniFile) && is_readable($themeIniFile)) { | ||
286 | $themeInfo = parse_ini_file($themeIniFile); | ||
287 | } | ||
288 | |||
289 | if ($themeInfo === false) { | ||
290 | $themeInfo = array(); | ||
291 | } | ||
292 | if (!isset($themeInfo['name'])) { | ||
293 | $themeInfo['name'] = $theme; | ||
294 | } | ||
295 | $themeInfo['current'] = ($theme === $this->getTheme()); | ||
296 | |||
297 | return $themeInfo; | ||
270 | } | 298 | } |
271 | 299 | ||
272 | public function getInstalledThemes() { | 300 | public function getInstalledThemes() { |
273 | $handle = opendir(THEME); | 301 | $handle = opendir(THEME); |
274 | $themes = array(); | 302 | $themes = array(); |
275 | 303 | ||
276 | while (($theme = readdir($handle)) !== false) { | 304 | while (($theme = readdir($handle)) !== false) { |
277 | # Themes are stored in a directory, so all directory names are themes | 305 | # Themes are stored in a directory, so all directory names are themes |
278 | # @todo move theme installation data to database | 306 | # @todo move theme installation data to database |
279 | if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.'))) { | 307 | if (!is_dir(THEME . '/' . $theme) || in_array($theme, array('.', '..'))) { |
280 | continue; | 308 | continue; |
281 | } | 309 | } |
282 | 310 | ||
283 | $current = false; | 311 | $themes[$theme] = $this->getThemeInfo($theme); |
284 | |||
285 | if ($theme === $this->getTheme()) { | ||
286 | $current = true; | ||
287 | } | ||
288 | |||
289 | $themes[] = array('name' => $theme, 'current' => $current); | ||
290 | } | 312 | } |
291 | 313 | ||
292 | sort($themes); | ||
293 | return $themes; | 314 | return $themes; |
294 | } | 315 | } |
295 | 316 | ||
317 | public function getLanguage() { | ||
318 | return $this->currentLanguage; | ||
319 | } | ||
320 | |||
296 | public function getInstalledLanguages() { | 321 | public function getInstalledLanguages() { |
297 | $handle = opendir(LOCALE); | 322 | $handle = opendir(LOCALE); |
298 | $languages = array(); | 323 | $languages = array(); |
@@ -325,6 +350,22 @@ class Poche | |||
325 | ); | 350 | ); |
326 | } | 351 | } |
327 | 352 | ||
353 | protected function getPageContent(Url $url) | ||
354 | { | ||
355 | $options = array('http' => array('user_agent' => 'poche')); | ||
356 | if (isset($_SERVER['AUTH_TYPE']) && "basic" === strtolower($_SERVER['AUTH_TYPE'])) { | ||
357 | $options['http']['header'] = sprintf( | ||
358 | "Authorization: Basic %s", | ||
359 | base64_encode( | ||
360 | sprintf('%s:%s', $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) | ||
361 | ) | ||
362 | ); | ||
363 | } | ||
364 | $context = stream_context_create($options); | ||
365 | $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed', false, $context); | ||
366 | return json_decode($json, true); | ||
367 | } | ||
368 | |||
328 | /** | 369 | /** |
329 | * Call action (mark as fav, archive, delete, etc.) | 370 | * Call action (mark as fav, archive, delete, etc.) |
330 | */ | 371 | */ |
@@ -333,11 +374,8 @@ class Poche | |||
333 | switch ($action) | 374 | switch ($action) |
334 | { | 375 | { |
335 | case 'add': | 376 | case 'add': |
336 | $options = array('http' => array('user_agent' => 'poche')); | 377 | $content = $this->getPageContent($url); |
337 | $context = stream_context_create($options); | 378 | $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled'); |
338 | $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed', false, $context); | ||
339 | $content = json_decode($json, true); | ||
340 | $title = $content['rss']['channel']['item']['title']; | ||
341 | $body = $content['rss']['channel']['item']['description']; | 379 | $body = $content['rss']['channel']['item']['description']; |
342 | 380 | ||
343 | if ($this->store->add($url->getUrl(), $title, $body, $this->user->getId())) { | 381 | if ($this->store->add($url->getUrl(), $title, $body, $this->user->getId())) { |
@@ -586,8 +624,8 @@ class Poche | |||
586 | $themes = $this->getInstalledThemes(); | 624 | $themes = $this->getInstalledThemes(); |
587 | $actualTheme = false; | 625 | $actualTheme = false; |
588 | 626 | ||
589 | foreach ($themes as $theme) { | 627 | foreach (array_keys($themes) as $theme) { |
590 | if ($theme['name'] == $_POST['theme']) { | 628 | if ($theme == $_POST['theme']) { |
591 | $actualTheme = true; | 629 | $actualTheme = true; |
592 | break; | 630 | break; |
593 | } | 631 | } |
@@ -654,17 +692,17 @@ class Poche | |||
654 | */ | 692 | */ |
655 | private function credentials() { | 693 | private function credentials() { |
656 | if(isset($_SERVER['PHP_AUTH_USER'])) { | 694 | if(isset($_SERVER['PHP_AUTH_USER'])) { |
657 | return array($_SERVER['PHP_AUTH_USER'],'php_auth'); | 695 | return array($_SERVER['PHP_AUTH_USER'],'php_auth',true); |
658 | } | 696 | } |
659 | if(!empty($_POST['login']) && !empty($_POST['password'])) { | 697 | if(!empty($_POST['login']) && !empty($_POST['password'])) { |
660 | return array($_POST['login'],$_POST['password']); | 698 | return array($_POST['login'],$_POST['password'],false); |
661 | } | 699 | } |
662 | if(isset($_SERVER['REMOTE_USER'])) { | 700 | if(isset($_SERVER['REMOTE_USER'])) { |
663 | return array($_SERVER['REMOTE_USER'],'http_auth'); | 701 | return array($_SERVER['REMOTE_USER'],'http_auth',true); |
664 | } | 702 | } |
665 | 703 | ||
666 | return array(false,false); | 704 | return array(false,false,false); |
667 | } | 705 | } |
668 | 706 | ||
669 | /** | 707 | /** |
670 | * checks if login & password are correct and save the user in session. | 708 | * checks if login & password are correct and save the user in session. |
@@ -675,18 +713,19 @@ class Poche | |||
675 | */ | 713 | */ |
676 | public function login($referer) | 714 | public function login($referer) |
677 | { | 715 | { |
678 | list($login,$password)=$this->credentials(); | 716 | list($login,$password,$isauthenticated)=$this->credentials(); |
679 | if($login === false || $password === false) { | 717 | if($login === false || $password === false) { |
680 | $this->messages->add('e', _('login failed: you have to fill all fields')); | 718 | $this->messages->add('e', _('login failed: you have to fill all fields')); |
681 | Tools::logm('login failed'); | 719 | Tools::logm('login failed'); |
682 | Tools::redirect(); | 720 | Tools::redirect(); |
683 | } | 721 | } |
684 | if (!empty($login) && !empty($password)) { | 722 | if (!empty($login) && !empty($password)) { |
685 | $user = $this->store->login($login, Tools::encodeString($password . $login)); | 723 | $user = $this->store->login($login, Tools::encodeString($password . $login), $isauthenticated); |
686 | if ($user != array()) { | 724 | if ($user != array()) { |
687 | # Save login into Session | 725 | # Save login into Session |
688 | $longlastingsession = isset($_POST['longlastingsession']); | 726 | $longlastingsession = isset($_POST['longlastingsession']); |
689 | Session::login($user['username'], $user['password'], $login, Tools::encodeString($password . $login), $longlastingsession, array('poche_user' => new User($user))); | 727 | $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); |
728 | Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); | ||
690 | $this->messages->add('s', _('welcome to your poche')); | 729 | $this->messages->add('s', _('welcome to your poche')); |
691 | Tools::logm('login successful'); | 730 | Tools::logm('login successful'); |
692 | Tools::redirect($referer); | 731 | Tools::redirect($referer); |
@@ -848,6 +887,52 @@ class Poche | |||
848 | } | 887 | } |
849 | 888 | ||
850 | /** | 889 | /** |
890 | * import from Poche exported file | ||
891 | * @param string $targetFile the file used for importing | ||
892 | * @return boolean | ||
893 | */ | ||
894 | private function importFromPoche($targetFile) | ||
895 | { | ||
896 | $str_data = file_get_contents($targetFile); | ||
897 | $data = json_decode($str_data,true); | ||
898 | Tools::logm('starting import from Poche'); | ||
899 | |||
900 | |||
901 | $sequence = ''; | ||
902 | if (STORAGE == 'postgres') { | ||
903 | $sequence = 'entries_id_seq'; | ||
904 | } | ||
905 | |||
906 | $count = 0; | ||
907 | foreach ($data as $value) { | ||
908 | |||
909 | $url = new Url(base64_encode($value['url'])); | ||
910 | $favorite = ($value['is_fav'] == -1); | ||
911 | $archive = ($value['is_read'] == -1); | ||
912 | |||
913 | # we can add the url | ||
914 | if (!is_null($url) && $url->isCorrect()) { | ||
915 | |||
916 | $this->action('add', $url, 0, TRUE); | ||
917 | |||
918 | $count++; | ||
919 | if ($favorite) { | ||
920 | $last_id = $this->store->getLastId($sequence); | ||
921 | $this->action('toggle_fav', $url, $last_id, TRUE); | ||
922 | } | ||
923 | if ($archive) { | ||
924 | $last_id = $this->store->getLastId($sequence); | ||
925 | $this->action('toggle_archive', $url, $last_id, TRUE); | ||
926 | } | ||
927 | } | ||
928 | |||
929 | } | ||
930 | $this->messages->add('s', _('import from Poche completed. ' . $count . ' new links.')); | ||
931 | Tools::logm('import from Poche completed'); | ||
932 | Tools::redirect(); | ||
933 | } | ||
934 | |||
935 | /** | ||
851 | * import datas into your poche | 936 | * import datas into your poche |
852 | * @param string $from name of the service to import : pocket, instapaper or readability | 937 | * @param string $from name of the service to import : pocket, instapaper or readability |
853 | * @todo add the return value | 938 | * @todo add the return value |
@@ -858,7 +943,8 @@ class Poche | |||
858 | $providers = array( | 943 | $providers = array( |
859 | 'pocket' => 'importFromPocket', | 944 | 'pocket' => 'importFromPocket', |
860 | 'readability' => 'importFromReadability', | 945 | 'readability' => 'importFromReadability', |
861 | 'instapaper' => 'importFromInstapaper' | 946 | 'instapaper' => 'importFromInstapaper', |
947 | 'poche' => 'importFromPoche', | ||
862 | ); | 948 | ); |
863 | 949 | ||
864 | if (! isset($providers[$from])) { | 950 | if (! isset($providers[$from])) { |
@@ -908,7 +994,7 @@ class Poche | |||
908 | if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) { | 994 | if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) { |
909 | $version = file_get_contents($cache_file); | 995 | $version = file_get_contents($cache_file); |
910 | } else { | 996 | } else { |
911 | $version = file_get_contents('http://static.inthepoche.com/versions/' . $which); | 997 | $version = file_get_contents('http://static.wallabag.org/versions/' . $which); |
912 | file_put_contents($cache_file, $version, LOCK_EX); | 998 | file_put_contents($cache_file, $version, LOCK_EX); |
913 | } | 999 | } |
914 | return $version; | 1000 | return $version; |
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 63916582..515a08aa 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
@@ -43,7 +43,9 @@ class Tools | |||
43 | || (isset($_SERVER["SERVER_PORT"]) | 43 | || (isset($_SERVER["SERVER_PORT"]) |
44 | && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. | 44 | && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. |
45 | || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection | 45 | || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection |
46 | && $_SERVER["SERVER_PORT"] == SSL_PORT); | 46 | && $_SERVER["SERVER_PORT"] == SSL_PORT) |
47 | || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) | ||
48 | && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'); | ||
47 | 49 | ||
48 | $serverport = (!isset($_SERVER["SERVER_PORT"]) | 50 | $serverport = (!isset($_SERVER["SERVER_PORT"]) |
49 | || $_SERVER["SERVER_PORT"] == '80' | 51 | || $_SERVER["SERVER_PORT"] == '80' |
diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php index 8b3468c3..aba236fa 100644 --- a/inc/poche/Url.class.php +++ b/inc/poche/Url.class.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
diff --git a/inc/poche/User.class.php b/inc/poche/User.class.php index 6dac7839..cc8bec65 100644 --- a/inc/poche/User.class.php +++ b/inc/poche/User.class.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index c60d4f80..39cb2f2f 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
@@ -55,7 +55,9 @@ define ('PAGINATION', '10'); | |||
55 | define ('POCKET_FILE', '/ril_export.html'); | 55 | define ('POCKET_FILE', '/ril_export.html'); |
56 | define ('READABILITY_FILE', '/readability'); | 56 | define ('READABILITY_FILE', '/readability'); |
57 | define ('INSTAPAPER_FILE', '/instapaper-export.html'); | 57 | define ('INSTAPAPER_FILE', '/instapaper-export.html'); |
58 | define ('POCHE_FILE', '/poche-export'); | ||
58 | 59 | ||
59 | define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE); | 60 | define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE); |
60 | define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE); | 61 | define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE); |
61 | define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE); | 62 | define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE); |
63 | define ('IMPORT_POCHE_FILE', ROOT . POCHE_FILE); \ No newline at end of file | ||
diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 846699d3..e2beade1 100644 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
diff --git a/inc/poche/pochePictures.php b/inc/poche/pochePictures.php index b0cfb9df..e4b0b160 100644 --- a/inc/poche/pochePictures.php +++ b/inc/poche/pochePictures.php | |||
@@ -1,9 +1,9 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
@@ -1,14 +1,14 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * poche, a read it later open source system | 3 | * wallabag, self hostable application allowing you to not miss any content anymore |
4 | * | 4 | * |
5 | * @category poche | 5 | * @category wallabag |
6 | * @author Nicolas Lœuillet <support@inthepoche.com> | 6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
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', '1.3.0'); | 11 | define ('POCHE', '1.4.0'); |
12 | require_once 'inc/poche/global.inc.php'; | 12 | require_once 'inc/poche/global.inc.php'; |
13 | session_start(); | 13 | session_start(); |
14 | 14 | ||
diff --git a/install/mysql.sql b/install/mysql.sql index d16381d8..de5640e4 100644 --- a/install/mysql.sql +++ b/install/mysql.sql | |||
@@ -9,8 +9,8 @@ CREATE TABLE IF NOT EXISTS `entries` ( | |||
9 | `id` int(11) NOT NULL AUTO_INCREMENT, | 9 | `id` int(11) NOT NULL AUTO_INCREMENT, |
10 | `title` varchar(255) NOT NULL, | 10 | `title` varchar(255) NOT NULL, |
11 | `url` varchar(255) NOT NULL, | 11 | `url` varchar(255) NOT NULL, |
12 | `is_read` tinyint(1) NOT NULL, | 12 | `is_read` tinyint(1) NOT NULL DEFAULT 0, |
13 | `is_fav` tinyint(1) NOT NULL, | 13 | `is_fav` tinyint(1) NOT NULL DEFAULT 0, |
14 | `content` blob NOT NULL, | 14 | `content` blob NOT NULL, |
15 | `user_id` int(11) NOT NULL, | 15 | `user_id` int(11) NOT NULL, |
16 | PRIMARY KEY (`id`) | 16 | PRIMARY KEY (`id`) |
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `users` ( | |||
20 | `id` int(11) NOT NULL AUTO_INCREMENT, | 20 | `id` int(11) NOT NULL AUTO_INCREMENT, |
21 | `username` varchar(255) NOT NULL, | 21 | `username` varchar(255) NOT NULL, |
22 | `password` varchar(255) NOT NULL, | 22 | `password` varchar(255) NOT NULL, |
23 | `name` int(255) NOT NULL, | 23 | `name` varchar(255) NOT NULL, |
24 | `email` varchar(255) NOT NULL, | 24 | `email` varchar(255) NOT NULL, |
25 | PRIMARY KEY (`id`) | 25 | PRIMARY KEY (`id`) |
26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | 26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
diff --git a/themes/README.md b/themes/README.md deleted file mode 100644 index b5d925b4..00000000 --- a/themes/README.md +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | # poche-themes | ||
2 | |||
3 | themes created by poche users | ||
4 | |||
5 | ## list of themes | ||
6 | |||
7 | * dark ([preview](https://raw.github.com/inthepoche/poche/master/themes/dark/screenshot.jpg)) | ||
8 | * dmagenta ([preview](https://raw.github.com/inthepoche/poche/master/themes/dmagenta/screenshot.jpg)) | ||
9 | * solarized ([preview](https://raw.github.com/inthepoche/poche/master/themes/solarized/screenshot.jpg)) | ||
10 | * solarized-dark ([preview](https://raw.github.com/inthepoche/poche/master/themes/solarized-dark/screenshot.jpg)) | ||
11 | |||
12 | ## installation | ||
13 | |||
14 | In your poche folder: | ||
15 | |||
16 | ``` | ||
17 | git submodule init | ||
18 | git submodule update | ||
19 | ``` | ||
20 | |||
21 | Then, in your config screen, select your favorite theme. | ||
22 | |||
23 | That's all ! | ||
24 | |||
25 | ## create a theme | ||
26 | |||
27 | Just have a look to this short documentation : http://doc.inthepoche.com/doku.php?id=designers:creating_theme | ||
28 | |||
29 | ## send a theme | ||
30 | |||
31 | Send your theme by email at support@inthepoche.com. | ||
diff --git a/themes/courgette/README.md b/themes/courgette/README.md new file mode 100755 index 00000000..e13d3900 --- /dev/null +++ b/themes/courgette/README.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # Courgette Theme | ||
2 | |||
3 | theme created by Thomas LEBEAU alias Courgette http://thomaslebeau.fr/ \ No newline at end of file | ||
diff --git a/themes/courgette/_head.twig b/themes/courgette/_head.twig new file mode 100755 index 00000000..57b40f41 --- /dev/null +++ b/themes/courgette/_head.twig | |||
@@ -0,0 +1,11 @@ | |||
1 | <link rel="shortcut icon" type="image/x-icon" href="{{ poche_url }}/themes/{{theme}}/img/favicon.ico" /> | ||
2 | <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ poche_url }}/themes/{{theme}}/img/apple-touch-icon-144x144-precomposed.png"> | ||
3 | <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ poche_url }}/themes/{{theme}}/img/apple-touch-icon-72x72-precomposed.png"> | ||
4 | <link rel="apple-touch-icon-precomposed" href="{{ poche_url }}/themes/{{theme}}/img/apple-touch-icon-precomposed.png"> | ||
5 | <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/font.css" media="all"> | ||
6 | <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/style.css" media="all"> | ||
7 | <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/messages.css" media="all"> | ||
8 | <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/print.css" media="print"> | ||
9 | <link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> | ||
10 | <script src="//codeorigin.jquery.com/jquery-2.0.3.min.js"></script> | ||
11 | <script src="{{ poche_url }}/themes/{{theme}}/js/init.js"></script> | ||
diff --git a/themes/courgette/_menu.twig b/themes/courgette/_menu.twig new file mode 100755 index 00000000..85487f73 --- /dev/null +++ b/themes/courgette/_menu.twig | |||
@@ -0,0 +1,9 @@ | |||
1 | <div id="menuContainer"> | ||
2 | <ul id="links"> | ||
3 | <li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li> | ||
4 | <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li> | ||
5 | <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li> | ||
6 | <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li> | ||
7 | <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li> | ||
8 | </ul> | ||
9 | </div> \ No newline at end of file | ||
diff --git a/themes/courgette/_top.twig b/themes/courgette/_top.twig new file mode 100755 index 00000000..792687c0 --- /dev/null +++ b/themes/courgette/_top.twig | |||
@@ -0,0 +1,9 @@ | |||
1 | <header> | ||
2 | <h1> | ||
3 | {% if view == 'home' %}{% block logo %}<img src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/logo.svg" alt="logo poche" />{% endblock %} | ||
4 | {% elseif view == 'fav' %}<a href="./" title="{% trans "back to home" %}" >{{ block('logo') }} <span>Favoris</span></a> | ||
5 | {% elseif view == 'archive' %}<a href="./" title="{% trans "back to home" %}" >{{ block('logo') }} <span>Archive</span></a> | ||
6 | {% else %}<a href="./" title="{% trans "back to home" %}" >{{ block('logo') }}</a> | ||
7 | {% endif %} | ||
8 | </h1> | ||
9 | </header> \ No newline at end of file | ||
diff --git a/themes/courgette/config.twig b/themes/courgette/config.twig new file mode 100755 index 00000000..26da7289 --- /dev/null +++ b/themes/courgette/config.twig | |||
@@ -0,0 +1,82 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | |||
3 | {% block title %}{% trans "config" %}{% endblock %} | ||
4 | {% block menu %} | ||
5 | {% include '_menu.twig' %} | ||
6 | {% endblock %} | ||
7 | {% block content %} | ||
8 | <div id="config"> | ||
9 | <h2>{% trans "Poching a link" %}</h2> | ||
10 | <p>{% trans "You can poche a link by several methods:" %} (<a class="special" href="http://doc.wallabag.org" title="{% trans "read the documentation" %}">?</a>)</p> | ||
11 | <ul> | ||
12 | <li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">{% trans "download the extension" %}</a></li> | ||
13 | <li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">{% trans "download the extension" %}</a></li> | ||
14 | <li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">{% trans "download the application" %}</a></li> | ||
15 | <li> | ||
16 | <form method="get" action="index.php"> | ||
17 | <label class="addurl" for="plainurl">{% trans "by filling this field" %}:</label> | ||
18 | <input required placeholder="Ex:mywebsite.com/article" class="addurl" id="plainurl" name="plainurl" type="url" /> | ||
19 | <input type="submit" value="{% trans "poche it!" %}" /> | ||
20 | </form> | ||
21 | </li> | ||
22 | <li>{% trans "bookmarklet: drag & drop this link to your bookmarks bar" %} <a id="bookmarklet" ondragend="this.click();" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@wallabag.org']){top['bookmarklet-url@wallabag.org'];}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></li> | ||
23 | </ul> | ||
24 | |||
25 | <h2>{% trans "Updating poche" %}</h2> | ||
26 | <ul> | ||
27 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE') }}</strong></li> | ||
28 | <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> | ||
29 | {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %} | ||
30 | </ul> | ||
31 | |||
32 | <h2>{% trans "Change your theme" %}</h2> | ||
33 | <form method="post" action="?updatetheme" name="changethemeform"> | ||
34 | <fieldset class="w500p"> | ||
35 | <div class="row"> | ||
36 | <label class="col w150p" for="theme">{% trans "Theme:" %}</label> | ||
37 | <select class="col" id="theme" name="theme"> | ||
38 | {% for key, theme in themes %} | ||
39 | <option value="{{ key }}" {{ theme.current ? 'selected' : '' }}>{{ theme.name }}</option> | ||
40 | {% endfor %} | ||
41 | </select> | ||
42 | </div> | ||
43 | <div class="row mts txtcenter"> | ||
44 | <button class="bouton" type="submit" tabindex="4">{% trans "Update" %}</button> | ||
45 | </div> | ||
46 | </fieldset> | ||
47 | <input type="hidden" name="returnurl" value="{{ referer }}"> | ||
48 | <input type="hidden" name="token" value="{{ token }}"> | ||
49 | </form> | ||
50 | |||
51 | <h2>{% trans "Change your password" %}</h2> | ||
52 | <form method="post" action="?config" name="loginform"> | ||
53 | <fieldset class="w500p"> | ||
54 | <div class="row"> | ||
55 | <label class="col w150p" for="password">{% trans "New password:" %}</label> | ||
56 | <input class="col" type="password" id="password" name="password" placeholder="{% trans "Password" %}" tabindex="2"> | ||
57 | </div> | ||
58 | <div class="row"> | ||
59 | <label class="col w150p" for="password_repeat">{% trans "Repeat your new password:" %}</label> | ||
60 | <input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="{% trans "Password" %}" tabindex="3"> | ||
61 | </div> | ||
62 | <div class="row mts txtcenter"> | ||
63 | <button class="bouton" type="submit" tabindex="4">{% trans "Update" %}</button> | ||
64 | </div> | ||
65 | </fieldset> | ||
66 | <input type="hidden" name="returnurl" value="{{ referer }}"> | ||
67 | <input type="hidden" name="token" value="{{ token }}"> | ||
68 | </form> | ||
69 | |||
70 | <h2>{% trans "Import" %}</h2> | ||
71 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> | ||
72 | <p>{% trans "More infos in the official doc:" %} <a href="http://doc.wallabag.org">wallabag.org</a></p> | ||
73 | <ul> | ||
74 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li> | ||
75 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li> | ||
76 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li> | ||
77 | </ul> | ||
78 | |||
79 | <h2>{% trans "Export your poche datas" %}</h2> | ||
80 | <p><a href="./?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p> | ||
81 | </div> | ||
82 | {% endblock %} \ No newline at end of file | ||
diff --git a/themes/courgette/css/.DS_Store b/themes/courgette/css/.DS_Store new file mode 100644 index 00000000..c788a093 --- /dev/null +++ b/themes/courgette/css/.DS_Store | |||
Binary files differ | |||
diff --git a/themes/courgette/css/font.css b/themes/courgette/css/font.css new file mode 100755 index 00000000..7c16cce4 --- /dev/null +++ b/themes/courgette/css/font.css | |||
@@ -0,0 +1,10 @@ | |||
1 | @font-face { | ||
2 | font-family: 'fontello'; | ||
3 | src: url('../font/fontello.eot?97381924'); | ||
4 | src: url('../font/fontello.eot?97381924#iefix') format('embedded-opentype'), | ||
5 | url('../font/fontello.woff?97381924') format('woff'), | ||
6 | url('../font/fontello.ttf?97381924') format('truetype'), | ||
7 | url('../font/fontello.svg?97381924#fontello') format('svg'); | ||
8 | font-weight: normal; | ||
9 | font-style: normal; | ||
10 | } \ No newline at end of file | ||
diff --git a/themes/courgette/css/knacss.css b/themes/courgette/css/knacss.css new file mode 100755 index 00000000..e69de29b --- /dev/null +++ b/themes/courgette/css/knacss.css | |||
diff --git a/themes/courgette/css/messages.css b/themes/courgette/css/messages.css new file mode 100755 index 00000000..fe6fbbe8 --- /dev/null +++ b/themes/courgette/css/messages.css | |||
@@ -0,0 +1,75 @@ | |||
1 | .messages { | ||
2 | display: block; | ||
3 | clear: both; | ||
4 | width: 400px; | ||
5 | margin: 10px auto 10px; | ||
6 | padding: 10px 0; | ||
7 | -moz-border-radius: 4px; | ||
8 | border-radius: 4px; | ||
9 | } | ||
10 | |||
11 | .messages a.closeMessage { | ||
12 | display: none; | ||
13 | float: right; | ||
14 | width: 16px; | ||
15 | height: 16px; | ||
16 | margin: -14px -8px 0 0; | ||
17 | background: url(../img/messages/close.png) no-repeat; | ||
18 | } | ||
19 | |||
20 | /*.messages:hover a.closeMessage { visibility:visible; }*/ | ||
21 | |||
22 | .messages p { | ||
23 | margin: 3px 0 3px 10px !important; | ||
24 | padding: 0 10px 0 23px !important; | ||
25 | font-size: 14px; | ||
26 | line-height: 16px; | ||
27 | } | ||
28 | |||
29 | .messages.error { | ||
30 | border: 1px solid #c42608; | ||
31 | color: #c00 !important; | ||
32 | background: #fff0ef; | ||
33 | } | ||
34 | |||
35 | .messages.error p { | ||
36 | color: #c00 !important; | ||
37 | background: url(../img/messages/cross.png) no-repeat 0 50%; | ||
38 | } | ||
39 | |||
40 | .messages.success { | ||
41 | border: 1px solid #6dc70c; | ||
42 | background: #e0fbcc; | ||
43 | } | ||
44 | |||
45 | .messages.success p { | ||
46 | color: #2b6301 !important; | ||
47 | background: url(../img/messages/tick.png) no-repeat 0 50%; | ||
48 | } | ||
49 | |||
50 | .messages.warning { | ||
51 | border: 1px solid #ebcd41; | ||
52 | color: #000; | ||
53 | background: #fffcd3; | ||
54 | } | ||
55 | |||
56 | .messages.warning p { | ||
57 | color: #5f4e01; | ||
58 | background: url(../img/messages/warning.png) no-repeat 0 50%; | ||
59 | } | ||
60 | |||
61 | .messages.information, | ||
62 | .messages.info { | ||
63 | border: 1px solid #82aee7; | ||
64 | background: #dfebfb; | ||
65 | } | ||
66 | |||
67 | .messages.information p, | ||
68 | .messages.info p { | ||
69 | color: #064393; | ||
70 | background: url(../img/messages/help.png) no-repeat 0 50%; | ||
71 | } | ||
72 | |||
73 | .messages.information a { | ||
74 | text-decoration: underline; | ||
75 | } \ No newline at end of file | ||
diff --git a/themes/courgette/css/print.css b/themes/courgette/css/print.css new file mode 100755 index 00000000..9aefa779 --- /dev/null +++ b/themes/courgette/css/print.css | |||
@@ -0,0 +1,48 @@ | |||
1 | /* ### Layout ### */ | ||
2 | |||
3 | body { | ||
4 | font-family: Serif; | ||
5 | background-color: #fff; | ||
6 | } | ||
7 | |||
8 | @page { | ||
9 | margin: 1cm; | ||
10 | } | ||
11 | |||
12 | img { | ||
13 | max-width: 100% !important; | ||
14 | } | ||
15 | |||
16 | /* ### Content ### */ | ||
17 | |||
18 | /* Hide useless blocks */ | ||
19 | body > header, | ||
20 | #links, | ||
21 | #sort, | ||
22 | body > footer, | ||
23 | .top_link, | ||
24 | div.tools, | ||
25 | header div, | ||
26 | .messages, | ||
27 | .entrie + .results { | ||
28 | display: none !important; | ||
29 | } | ||
30 | |||
31 | article { | ||
32 | border: none !important; | ||
33 | } | ||
34 | |||
35 | /* Add URL after links */ | ||
36 | .vieworiginal a:after { | ||
37 | content: " (" attr(href) ")"; | ||
38 | } | ||
39 | |||
40 | /* Add explanation after abbr */ | ||
41 | abbr[title]:after { | ||
42 | content: " (" attr(title) ")"; | ||
43 | } | ||
44 | |||
45 | /* Change border on current pager item */ | ||
46 | .pagination span.current { | ||
47 | border-style: dashed; | ||
48 | } | ||
diff --git a/themes/courgette/css/style-default.css b/themes/courgette/css/style-default.css new file mode 100755 index 00000000..3377a75b --- /dev/null +++ b/themes/courgette/css/style-default.css | |||
@@ -0,0 +1,59 @@ | |||
1 | a.back span { | ||
2 | background-image: url('../img/default/left.png'); | ||
3 | } | ||
4 | |||
5 | a.top span { | ||
6 | background-image: url('../img/default/top.png'); | ||
7 | } | ||
8 | |||
9 | a.fav span, | ||
10 | a.fav-off span:hover { | ||
11 | background-image: url('../img/default/star-on.png'); | ||
12 | } | ||
13 | |||
14 | a.fav span:hover, | ||
15 | a.fav-off span { | ||
16 | background-image: url('../img/default/star-off.png'); | ||
17 | } | ||
18 | |||
19 | a.archive span, | ||
20 | a.archive-off span:hover { | ||
21 | background-image: url('../img/default/checkmark-on.png'); | ||
22 | } | ||
23 | |||
24 | a.archive span:hover, | ||
25 | a.archive-off span { | ||
26 | background-image: url('../img/default/checkmark-off.png'); | ||
27 | } | ||
28 | |||
29 | a.twitter span { | ||
30 | background-image: url('../img/default/twitter.png'); | ||
31 | } | ||
32 | |||
33 | a.shaarli span { | ||
34 | background-image: url('../img/default/shaarli.png'); | ||
35 | } | ||
36 | |||
37 | a.flattr span { | ||
38 | background-image: url('../img/default/flattr.png'); | ||
39 | } | ||
40 | |||
41 | a.email span { | ||
42 | background-image: url('../img/default/envelop.png'); | ||
43 | } | ||
44 | |||
45 | a.delete span { | ||
46 | background-image: url('../img/default/remove.png'); | ||
47 | } | ||
48 | |||
49 | a.link span { | ||
50 | background-image: url('../img/default/link.png'); | ||
51 | } | ||
52 | |||
53 | a.bad-display span { | ||
54 | background-image: url('../img/default/bad-display.png'); | ||
55 | } | ||
56 | |||
57 | a.reading-time span { | ||
58 | background-image: url('../img/default/clock.png'); | ||
59 | } | ||
diff --git a/themes/courgette/css/style.css b/themes/courgette/css/style.css new file mode 100755 index 00000000..2ba16b71 --- /dev/null +++ b/themes/courgette/css/style.css | |||
@@ -0,0 +1,620 @@ | |||
1 | * { | ||
2 | -webkit-box-sizing: border-box; | ||
3 | -moz-box-sizing: border-box; | ||
4 | box-sizing: border-box; | ||
5 | } | ||
6 | |||
7 | body { | ||
8 | margin: 10px; | ||
9 | font-family: 'Roboto',Verdana,Geneva,sans-serif; | ||
10 | font-size: 16px; | ||
11 | color: #000; | ||
12 | } | ||
13 | |||
14 | h1 span { | ||
15 | color #FFF; | ||
16 | background: #000; | ||
17 | display: inline-block; | ||
18 | padding: 0.2em 1em 0.2em 1.2em; | ||
19 | font-size: 0.7em; | ||
20 | position: relative; | ||
21 | top: -1em; | ||
22 | left: -1em; | ||
23 | } | ||
24 | |||
25 | h1 a { | ||
26 | color: #FFF; | ||
27 | text-decoration: none; | ||
28 | } | ||
29 | |||
30 | #menu { | ||
31 | font-family: 'fontello'; | ||
32 | position:fixed; | ||
33 | z-index: 11; | ||
34 | top: 0.7em; | ||
35 | right: 0.5em; | ||
36 | border:0; | ||
37 | font-size: 2em; | ||
38 | background: #000; | ||
39 | color:#FFF; | ||
40 | height: 58px; | ||
41 | width: 58px; | ||
42 | line-height:58px; | ||
43 | border-radius:120px; | ||
44 | } | ||
45 | |||
46 | #menu:hover, #menu:focus { | ||
47 | background: #FFF; | ||
48 | color:#000; | ||
49 | cursor: pointer; | ||
50 | } | ||
51 | |||
52 | #menu span { | ||
53 | position: absolute; | ||
54 | top: -99999px; | ||
55 | } | ||
56 | |||
57 | #menuContainer ul, #article_toolbar ul { | ||
58 | position:fixed; | ||
59 | top: 0; | ||
60 | left:0; | ||
61 | width: 100%; | ||
62 | padding: 0; | ||
63 | margin: 0; | ||
64 | text-align:center; | ||
65 | height:80px; | ||
66 | } | ||
67 | |||
68 | /*Inspired by http://tympanus.net/Tutorials/AnimatedBorderMenus/index.html */ | ||
69 | |||
70 | #menuContainer, #article_toolbar { | ||
71 | position: fixed; | ||
72 | top: 0; | ||
73 | left:0; | ||
74 | width: 100%; | ||
75 | height: 0; | ||
76 | overflow: hidden; | ||
77 | border-width:0; | ||
78 | border-style: solid; | ||
79 | border-color:#000; | ||
80 | background-color: transparent; | ||
81 | -webkit-transition: border-width 0.3s, background-color 0.3s, height 0s 0.3s; | ||
82 | -moz-transition: border-width 0.3s, background-color 0.3s, height 0s 0.3s; | ||
83 | transition: border-width 0.3s, background-color 0.3s, height 0s 0.3s; | ||
84 | } | ||
85 | |||
86 | #article_toolbar ul { | ||
87 | padding: 1.7em; | ||
88 | } | ||
89 | |||
90 | #menuContainer.open, #article_toolbar.open { | ||
91 | border-width:80px; | ||
92 | height: 100%; | ||
93 | background: rgba(0,0,0,0.5); | ||
94 | -webkit-transition: border-width 0.3s, background-color 0.3s; | ||
95 | -moz-transition: border-width 0.3s, background-color 0.3s; | ||
96 | transition: border-width 0.3s, background-color 0.3s; | ||
97 | z-index: 1; | ||
98 | } | ||
99 | |||
100 | #links li, #article_toolbar li { | ||
101 | list-style: none; | ||
102 | display: inline-block; | ||
103 | } | ||
104 | |||
105 | #links li a, #article_toolbar a { | ||
106 | color:#FFF; | ||
107 | display: block; | ||
108 | position:relative; | ||
109 | top: -200px; | ||
110 | -webkit-transition: top 0.3s ease; | ||
111 | -moz-transition: top 0.3s ease; | ||
112 | transition: top 0.3s ease; | ||
113 | padding:1.85em 1em; | ||
114 | } | ||
115 | |||
116 | #links li a { | ||
117 | text-decoration:none; | ||
118 | text-transform:uppercase; | ||
119 | } | ||
120 | |||
121 | #links li a:hover, #links li a:focus { | ||
122 | background: #FFF; | ||
123 | color:#000; | ||
124 | } | ||
125 | |||
126 | #menuContainer.open li a, #article_toolbar.open a { | ||
127 | top: 0; | ||
128 | -webkit-transition: top 0.3s ease; | ||
129 | -moz-transition: top 0.3s ease; | ||
130 | transition: top 0.3s ease; | ||
131 | -webkit-transition-delay:0.25ms; | ||
132 | -moz-transition-delay:0.25ms; | ||
133 | transition-delay:0.25ms; | ||
134 | } | ||
135 | |||
136 | #menuContainer.open li:nth-child(2) a { | ||
137 | -webkit-transition-delay:0.50ms; | ||
138 | -moz-transition-delay:0.50ms; | ||
139 | transition-delay:0.50ms; | ||
140 | } | ||
141 | |||
142 | #menuContainer.open li:nth-child(3) a { | ||
143 | -webkit-transition-delay:1ms; | ||
144 | -moz-transition-delay:1ms; | ||
145 | transition-delay:1ms; | ||
146 | } | ||
147 | |||
148 | #menuContainer.open li:nth-child(4) a { | ||
149 | -webkit-transition-delay:1.25ms; | ||
150 | -moz-transition-delay:1.25ms; | ||
151 | transition-delay:1.25ms; | ||
152 | } | ||
153 | |||
154 | #menuContainer.open li:nth-child(5) a { | ||
155 | -webkit-transition-delay:1.55ms; | ||
156 | -moz-transition-delay:1.55ms; | ||
157 | transition-delay:1.55ms; | ||
158 | } | ||
159 | |||
160 | #menu:before { | ||
161 | content: "\e801"; | ||
162 | display: block; | ||
163 | text-indent: 0; | ||
164 | } | ||
165 | |||
166 | body > header { | ||
167 | position: fixed; | ||
168 | top: 0; | ||
169 | left: 1em; | ||
170 | z-index: 10; | ||
171 | } | ||
172 | |||
173 | #main { | ||
174 | padding:6em; | ||
175 | } | ||
176 | |||
177 | /* ========================================================================== | ||
178 | entrie | ||
179 | ========================================================================== */ | ||
180 | |||
181 | .entrie, #article { | ||
182 | width: 45em; | ||
183 | margin: auto; | ||
184 | position:relative; | ||
185 | padding: 0 0 1em 0; | ||
186 | margin-bottom: 1.5em; | ||
187 | } | ||
188 | |||
189 | #article a { | ||
190 | text-decoration: underline; | ||
191 | color:#000; | ||
192 | } | ||
193 | |||
194 | #article a:hover, #article a:focus { | ||
195 | text-decoration: none; | ||
196 | } | ||
197 | |||
198 | .entrie:after { | ||
199 | content:""; | ||
200 | position: absolute; | ||
201 | width: 100%; | ||
202 | height: 4px; | ||
203 | background: #000; | ||
204 | bottom:0; | ||
205 | left: -1em; | ||
206 | } | ||
207 | |||
208 | .entrie p { | ||
209 | padding:0 0 0 1.5em; | ||
210 | } | ||
211 | |||
212 | .entrie:before { | ||
213 | content:''; | ||
214 | position: absolute; | ||
215 | top: 0; | ||
216 | left: -1em; | ||
217 | width: 4px; | ||
218 | height: 100%; | ||
219 | background: #000; | ||
220 | } | ||
221 | |||
222 | .entrie h2:after { | ||
223 | content:""; | ||
224 | display: block; | ||
225 | width: 0; | ||
226 | height: 0; | ||
227 | border-color: #000; | ||
228 | border-width:7px; | ||
229 | border-color:transparent transparent transparent #000; | ||
230 | border-style: solid; | ||
231 | position: absolute; | ||
232 | top: 0.8em; | ||
233 | right: -0.58em; | ||
234 | } | ||
235 | |||
236 | .entrie h2 { | ||
237 | margin:0; | ||
238 | display: inline-block; | ||
239 | position: relative; | ||
240 | max-width: 78%; | ||
241 | } | ||
242 | |||
243 | .entrie h2 a { | ||
244 | color:#000; | ||
245 | text-decoration:none; | ||
246 | display: block; | ||
247 | background: #000; | ||
248 | padding: 0.4em 1em; | ||
249 | color:#FFF; | ||
250 | margin-left: -0.5em; | ||
251 | -webkit-transition: all 0.3s ease-out; | ||
252 | -moz-transition: all 0.3s ease-out; | ||
253 | transition: all 0.3s ease-out; | ||
254 | } | ||
255 | |||
256 | .entrie h2 a:hover, .entrie h2 a:focus { | ||
257 | padding:0.4em 1em 0.4em 2em; | ||
258 | } | ||
259 | |||
260 | ul { | ||
261 | padding:0; | ||
262 | margin:0; | ||
263 | } | ||
264 | |||
265 | ul li { | ||
266 | list-style: none; | ||
267 | } | ||
268 | |||
269 | .tools { | ||
270 | display: inline-block; | ||
271 | margin-left: 1em; | ||
272 | vertical-align: top; | ||
273 | padding-top: 1em; | ||
274 | } | ||
275 | |||
276 | .tools a span { | ||
277 | position:absolute; | ||
278 | top: -99999px; | ||
279 | } | ||
280 | |||
281 | .tools li { | ||
282 | display: inline-block; | ||
283 | } | ||
284 | |||
285 | .tools a { | ||
286 | display: block; | ||
287 | color:#FFF; | ||
288 | background: #000; | ||
289 | text-decoration:none; | ||
290 | height: 1.5em; | ||
291 | width: 1.5em; | ||
292 | text-align: center; | ||
293 | line-height:1.5em; | ||
294 | border-radius: 90px; | ||
295 | } | ||
296 | |||
297 | .tools a:hover, .tools a:focus { | ||
298 | background: #FFF; | ||
299 | color:#000; | ||
300 | } | ||
301 | |||
302 | .tools a:before { display: block; font-family: 'fontello'; } | ||
303 | |||
304 | |||
305 | .fav-off:before, .fav:before { content: '\e805'; } /* '' */ | ||
306 | .archive-off:before, .archive:before { content: '\e804'; } /* '' */ | ||
307 | .tools .archive, .tools .fav { | ||
308 | background: #FFF; | ||
309 | color:#000; | ||
310 | } | ||
311 | .link:before { content: '\e800'; } /* '' */ | ||
312 | .delete:before { content: '\e803'; } /* '' */ | ||
313 | .reading-time:before { content: '\e802'; } /* '' */ | ||
314 | |||
315 | #article_toolbar a:before { | ||
316 | display: block; | ||
317 | font-family: 'fontello'; | ||
318 | } | ||
319 | |||
320 | #article_toolbar a { | ||
321 | display: block; | ||
322 | color:#000; | ||
323 | background: #FFF; | ||
324 | text-decoration:none; | ||
325 | height: 1.5em; | ||
326 | width: 1.5em; | ||
327 | text-align: center; | ||
328 | line-height:1.5em; | ||
329 | border-radius: 90px; | ||
330 | padding: 0; | ||
331 | } | ||
332 | |||
333 | #article_toolbar a:hover, #article_toolbar a:focus { | ||
334 | background: #000; | ||
335 | color:#FFF; | ||
336 | } | ||
337 | |||
338 | #article_toolbar span { | ||
339 | position: absolute; | ||
340 | top: -99999px; | ||
341 | } | ||
342 | |||
343 | .email:before { content: '\e80a'; } /* '' */ | ||
344 | .icon-check:before { content: '\e804'; } /* '' */ | ||
345 | .back:before { content: '\e806'; } /* '' */ | ||
346 | .bad-display:before { content: '\e808'; } /* '' */ | ||
347 | .twitter:before { content: '\e807'; } /* '' */ | ||
348 | |||
349 | #article_toolbar .flattrli { | ||
350 | display: none; | ||
351 | } | ||
352 | |||
353 | #article_toolbar li { | ||
354 | margin: 0 0 0 1em; | ||
355 | } | ||
356 | |||
357 | |||
358 | footer { | ||
359 | position: fixed; | ||
360 | bottom: 0; | ||
361 | width: 100%; | ||
362 | padding: 0 2%; | ||
363 | left: 0; | ||
364 | text-align:right; | ||
365 | font-size: 0.8em; | ||
366 | font-style: italic; | ||
367 | background: rgba(255,255,255,0.5); | ||
368 | } | ||
369 | |||
370 | footer a { | ||
371 | color:#000; | ||
372 | } | ||
373 | |||
374 | footer a:hover,footer a:focus { | ||
375 | text-decoration: none; | ||
376 | } | ||
377 | |||
378 | footer p:first-child { | ||
379 | float:left; | ||
380 | } | ||
381 | |||
382 | #loginForm fieldset { | ||
383 | border:5px solid #000; | ||
384 | padding: 1.5em; | ||
385 | } | ||
386 | |||
387 | fieldset { | ||
388 | border:0; | ||
389 | padding: 0; | ||
390 | } | ||
391 | |||
392 | #loginForm { | ||
393 | max-width: 25em; | ||
394 | margin: auto; | ||
395 | } | ||
396 | |||
397 | #loginForm .row { | ||
398 | margin-bottom: 0.5em; | ||
399 | } | ||
400 | |||
401 | form h2 { | ||
402 | margin-top: 0; | ||
403 | } | ||
404 | |||
405 | form label { | ||
406 | width: 40%; | ||
407 | display: inline-block; | ||
408 | } | ||
409 | |||
410 | form input[type="text"], form input[type="password"], form input[type='url'], form select { | ||
411 | border:1px solid #000; | ||
412 | padding:0.5em 1em; | ||
413 | } | ||
414 | |||
415 | @media screen and (-webkit-min-device-pixel-ratio:0){ | ||
416 | form select{ | ||
417 | -webkit-appearance: none; | ||
418 | background: url(../img/bg-select.png) no-repeat right center; | ||
419 | padding-right: 2.2em; | ||
420 | border-radius: 0; | ||
421 | } | ||
422 | } | ||
423 | |||
424 | form button, form input[type="submit"] { | ||
425 | background: #000; | ||
426 | color:#FFF; | ||
427 | border:0; | ||
428 | font-size:1em; | ||
429 | padding:0.5em 1em; | ||
430 | margin-top: 1em; | ||
431 | cursor: pointer; | ||
432 | } | ||
433 | |||
434 | form button:hover, form button:focus, form input[type="submit"]:hover, form input[type="submit"]:focus { | ||
435 | background: #FFF; | ||
436 | color: #000; | ||
437 | } | ||
438 | |||
439 | /* ========================================================================== | ||
440 | Config | ||
441 | ========================================================================== */ | ||
442 | |||
443 | #config { | ||
444 | max-width: 60%; | ||
445 | margin: auto; | ||
446 | } | ||
447 | |||
448 | #config a { | ||
449 | background: #000; | ||
450 | text-decoration: none; | ||
451 | color:#FFF; | ||
452 | padding: 0.2em 1em; | ||
453 | } | ||
454 | |||
455 | #config .special { | ||
456 | background: none; | ||
457 | padding:0; | ||
458 | color: #000; | ||
459 | } | ||
460 | |||
461 | #config a:hover, #config a:focus { | ||
462 | background: #FFF; | ||
463 | color:#000; | ||
464 | } | ||
465 | |||
466 | #config li { | ||
467 | margin-bottom: 1em; | ||
468 | } | ||
469 | |||
470 | #plainurl { | ||
471 | font-size: 1em; | ||
472 | } | ||
473 | |||
474 | #config label { | ||
475 | width: 20%; | ||
476 | } | ||
477 | |||
478 | .results { | ||
479 | max-width: 62.5%; | ||
480 | font-style:italic; | ||
481 | margin: 1em auto 2.5em; | ||
482 | } | ||
483 | |||
484 | #sort { | ||
485 | max-width: 62.5%; | ||
486 | margin: 0 auto -2.5em; | ||
487 | text-align: right; | ||
488 | border-bottom:1px dotted #000; | ||
489 | } | ||
490 | |||
491 | #sort li { | ||
492 | display: inline-block; | ||
493 | vertical-align: top; | ||
494 | position: relative; | ||
495 | top: -0.1em; | ||
496 | margin-left: 1em; | ||
497 | } | ||
498 | |||
499 | #sort li img { | ||
500 | display: none; | ||
501 | } | ||
502 | |||
503 | #sort a { | ||
504 | display: inline-block; | ||
505 | font-family: 'fontello'; | ||
506 | color:#000; | ||
507 | text-decoration: none; | ||
508 | } | ||
509 | |||
510 | #sort a:hover, #sort a:focus { | ||
511 | text-decoration: underline; | ||
512 | } | ||
513 | |||
514 | #sort a:before { | ||
515 | display: block; | ||
516 | } | ||
517 | |||
518 | #sort li a:first-child:before { | ||
519 | content: '\e809'; | ||
520 | } | ||
521 | |||
522 | #sort li a:first-child + a:before { | ||
523 | content: '\e80b'; | ||
524 | } | ||
525 | |||
526 | @media screen and (max-width: 860px) { | ||
527 | .entrie, #article { | ||
528 | width: 30em; | ||
529 | } | ||
530 | } | ||
531 | |||
532 | @media screen and (max-width: 650px) { | ||
533 | #menuContainer ul, #article_toolbar ul { | ||
534 | width: 120px; | ||
535 | height: 100%; | ||
536 | } | ||
537 | |||
538 | body > header { | ||
539 | position: static; | ||
540 | } | ||
541 | |||
542 | #main { | ||
543 | padding: 0 0.5em 6em; | ||
544 | } | ||
545 | |||
546 | #menu { | ||
547 | display: none; | ||
548 | } | ||
549 | |||
550 | #main:before { | ||
551 | content:none; | ||
552 | } | ||
553 | |||
554 | #menuContainer, #article_toolbar, #menuContainer ul, #article_toolbar ul { | ||
555 | position: static; | ||
556 | width: 100%; | ||
557 | height: auto; | ||
558 | } | ||
559 | |||
560 | #links li a, #article_toolbar a { | ||
561 | position: static; | ||
562 | color: #000; | ||
563 | } | ||
564 | |||
565 | #links li a { | ||
566 | padding: 1em; | ||
567 | min-width: 120px; | ||
568 | text-align: left; | ||
569 | } | ||
570 | |||
571 | #article_toolbar li { | ||
572 | margin-bottom: 1em; | ||
573 | margin-left: 0.5em; | ||
574 | } | ||
575 | |||
576 | } | ||
577 | |||
578 | @media screen and (max-width: 500px) { | ||
579 | .entrie, #article { | ||
580 | width: 17em; | ||
581 | } | ||
582 | .entrie h2 { | ||
583 | width: 100%; | ||
584 | max-width: none; | ||
585 | } | ||
586 | .entrie h2 a:hover, .entrie h2 a:focus { | ||
587 | padding-left: 1em; | ||
588 | background: #FFF; | ||
589 | color: #000; | ||
590 | } | ||
591 | .entrie h2:after { | ||
592 | content:none; | ||
593 | } | ||
594 | |||
595 | .messages { | ||
596 | width: 100%!important; | ||
597 | } | ||
598 | |||
599 | #sort { | ||
600 | margin: 3em auto 0; | ||
601 | max-width: none; | ||
602 | text-align: center; | ||
603 | } | ||
604 | #config { | ||
605 | margin: 7em auto 0; | ||
606 | max-width: none; | ||
607 | } | ||
608 | #config label { width: 100%; } | ||
609 | .results { | ||
610 | max-width: none; | ||
611 | margin-bottom: 1em; | ||
612 | } | ||
613 | |||
614 | footer p:first-child { | ||
615 | float: none; | ||
616 | } | ||
617 | footer { | ||
618 | position:static; | ||
619 | } | ||
620 | } | ||
diff --git a/themes/courgette/error.twig b/themes/courgette/error.twig new file mode 100755 index 00000000..4d4db1f3 --- /dev/null +++ b/themes/courgette/error.twig | |||
@@ -0,0 +1,6 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | {% block title %}{% trans "plop" %}{% endblock %} | ||
3 | {% block content %} | ||
4 | {{ msg|raw }} | ||
5 | <p>Don't forget <a href="http://doc.wallabag.org">the documentation</a>.</p> | ||
6 | {% endblock %} \ No newline at end of file | ||
diff --git a/themes/courgette/font/fontello.eot b/themes/courgette/font/fontello.eot new file mode 100644 index 00000000..3c5603dd --- /dev/null +++ b/themes/courgette/font/fontello.eot | |||
Binary files differ | |||
diff --git a/themes/courgette/font/fontello.svg b/themes/courgette/font/fontello.svg new file mode 100644 index 00000000..0e0118ed --- /dev/null +++ b/themes/courgette/font/fontello.svg | |||
@@ -0,0 +1,23 @@ | |||
1 | <?xml version="1.0" standalone="no"?> | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
3 | <svg xmlns="http://www.w3.org/2000/svg"> | ||
4 | <metadata>Copyright (C) 2013 by original authors @ fontello.com</metadata> | ||
5 | <defs> | ||
6 | <font id="fontello" horiz-adv-x="1000" > | ||
7 | <font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" /> | ||
8 | <missing-glyph horiz-adv-x="1000" /> | ||
9 | <glyph glyph-name="mail" unicode="" d="m929 11v428q-18-20-39-37q-149-114-238-188q-28-24-46-38t-48-27t-57-13h-2q-26 0-57 13t-48 27t-46 38q-88 74-238 188q-21 17-39 37v-428q0-8 6-13t12-5h822q7 0 12 5t6 13z m0 586v14t-1 7t-1 7t-3 5t-5 4t-8 2h-822q-7 0-12-6t-6-12q0-94 82-159q108-85 224-177q4-2 20-16t25-21t25-18t28-15t24-5h2q11 0 24 5t28 15t25 18t25 21t20 16q116 92 224 177q30 24 56 65t26 73z m71 21v-607q0-37-26-63t-63-27h-822q-36 0-63 27t-26 63v607q0 37 26 63t63 26h822q37 0 63-26t26-63z" horiz-adv-x="1000" /> | ||
10 | <glyph glyph-name="up-open" unicode="" d="m0 174l352 352l148 148l148-148l352-352l-148-148l-352 351l-352-351z" horiz-adv-x="1000" /> | ||
11 | <glyph glyph-name="star" unicode="" d="m440 790l120-336l320 0l-262-196l94-348l-272 208l-272-208l94 348l-262 196l320 0z" horiz-adv-x="880" /> | ||
12 | <glyph glyph-name="check" unicode="" d="m249 0q-34 0-56 28l-180 236q-16 24-12 52t26 46t51 14t47-28l118-154l296 474q16 24 43 30t53-8q24-16 30-43t-8-53l-350-560q-20-32-56-32z" horiz-adv-x="667" /> | ||
13 | <glyph glyph-name="link" unicode="" d="m294 116q14 14 34 14t36-14q32-34 0-70l-42-40q-56-56-132-56q-78 0-134 56t-56 132q0 78 56 134l148 148q70 68 144 77t128-43q16-16 16-36t-16-36q-36-32-70 0q-50 48-132-34l-148-146q-26-26-26-64t26-62q26-26 63-26t63 26z m450 574q56-56 56-132q0-78-56-134l-158-158q-74-72-150-72q-62 0-112 50q-14 14-14 34t14 36q14 14 35 14t35-14q50-48 122 24l158 156q28 28 28 64q0 38-28 62q-24 26-56 31t-60-21l-50-50q-16-14-36-14t-34 14q-34 34 0 70l50 50q54 54 127 51t129-61z" horiz-adv-x="800" /> | ||
14 | <glyph glyph-name="reply" unicode="" d="m900 10q-86 152-208 197t-330 45l0-218l-362 334l362 322l0-192q90 0 168-27t131-70t96-95t69-104t44-95t24-69z" horiz-adv-x="900" /> | ||
15 | <glyph glyph-name="menu" unicode="" d="m857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" /> | ||
16 | <glyph glyph-name="clock" unicode="" d="m460 810q190 0 325-135t135-325t-135-325t-325-135t-325 135t-135 325t135 325t325 135z m0-820q150 0 255 106t105 254q0 150-105 255t-255 105q-148 0-254-105t-106-255q0-148 106-254t254-106z m36 620l0-244l150-150l-50-50l-170 170l0 274l70 0z" horiz-adv-x="920" /> | ||
17 | <glyph glyph-name="block" unicode="" d="m480 830q200 0 340-140t140-340q0-198-140-339t-340-141q-198 0-339 141t-141 339q0 200 141 340t339 140z m258-220z m-622-260q0-132 82-230l514 514q-100 82-232 82q-152 0-258-107t-106-259z m106-258z m258-106q152 0 259 107t107 257q0 130-82 232l-514-514q98-82 230-82z" horiz-adv-x="960" /> | ||
18 | <glyph glyph-name="twitter" unicode="" d="m920 636q-36-54-94-98l0-24q0-130-60-250t-186-203t-290-83q-160 0-290 84q14-2 46-2q132 0 234 80q-62 2-110 38t-66 94q10-4 34-4q26 0 50 6q-66 14-108 66t-42 120l0 2q36-20 84-24q-84 58-84 158q0 48 26 94q154-188 390-196q-6 18-6 42q0 78 55 133t135 55q82 0 136-58q60 12 120 44q-20-66-82-104q56 8 108 30z" horiz-adv-x="920" /> | ||
19 | <glyph glyph-name="down-open" unicode="" d="m0 526l148 148l352-351l352 351l148-148l-352-352l-148-148l-148 148z" horiz-adv-x="1000" /> | ||
20 | <glyph glyph-name="trash" unicode="" d="m50 458q122-70 330-70t330 70l-54-486q-2-14-35-36t-100-43t-141-21t-140 21t-100 43t-36 36z m488 300q94-18 158-55t64-71l0-10q0-58-112-99t-268-41t-268 41t-112 99l0 10q0 34 64 71t158 55l42 48q22 26 70 26l92 0q52 0 70-26z m-54-112l84 0q-92 110-104 126q-14 16-32 16l-102 0q-22 0-32-16l-106-126l84 0l64 66l82 0z" horiz-adv-x="760" /> | ||
21 | </font> | ||
22 | </defs> | ||
23 | </svg> \ No newline at end of file | ||
diff --git a/themes/courgette/font/fontello.ttf b/themes/courgette/font/fontello.ttf new file mode 100644 index 00000000..1967dfaa --- /dev/null +++ b/themes/courgette/font/fontello.ttf | |||
Binary files differ | |||
diff --git a/themes/courgette/font/fontello.woff b/themes/courgette/font/fontello.woff new file mode 100644 index 00000000..c62afa54 --- /dev/null +++ b/themes/courgette/font/fontello.woff | |||
Binary files differ | |||
diff --git a/themes/courgette/home.twig b/themes/courgette/home.twig new file mode 100755 index 00000000..1367ebe8 --- /dev/null +++ b/themes/courgette/home.twig | |||
@@ -0,0 +1,49 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | {% block title %} | ||
3 | {% if view == 'fav' %} | ||
4 | {% trans "favoris" %} | ||
5 | {% elseif view == 'archive' %} | ||
6 | {% trans "archive" %} | ||
7 | {% else %} | ||
8 | {% trans "unread" %} | ||
9 | {% endif %} | ||
10 | {% endblock %} | ||
11 | {% block menu %} | ||
12 | {% include '_menu.twig' %} | ||
13 | {% endblock %} | ||
14 | {% block precontent %} | ||
15 | {% if entries|length > 1 %} | ||
16 | <ul id="sort"> | ||
17 | <li><a href="./?sort=ia&view={{ view }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ 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="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li> | ||
18 | <li><a href="./?sort=ta&view={{ view }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ 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="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li> | ||
19 | </ul> | ||
20 | {% endif %} | ||
21 | {% endblock %} | ||
22 | {% block content %} | ||
23 | {% if entries is empty %} | ||
24 | <div class="messages warning"><p>{% trans "No link available here!" %}</p></div> | ||
25 | {% else %} | ||
26 | {% block pager %} | ||
27 | {% if nb_results > 1 %} | ||
28 | <div class="results"> | ||
29 | <div class="nb-results">{{ nb_results }} {% trans "results" %}</div> | ||
30 | {{ page_links | raw }} | ||
31 | </div> | ||
32 | {% endif %} | ||
33 | {% endblock %} | ||
34 | {% for entry in entries %} | ||
35 | <div id="entry-{{ entry.id|e }}" class="entrie"> | ||
36 | <h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2> | ||
37 | <ul class="tools"> | ||
38 | <li><a title="{% trans "toggle mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> | ||
39 | <li><a title="{% trans "toggle favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | ||
40 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | ||
41 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li> | ||
42 | <li><a target="_blank" title="{% trans "estimated reading time:" %} {{ entry.content| getReadingTime }} min" class="tool reading-time"><span>{{ entry.content| getReadingTime }} min</span></a></li> | ||
43 | </ul> | ||
44 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | ||
45 | </div> | ||
46 | {% endfor %} | ||
47 | {% endif %} | ||
48 | {{ block('pager') }} | ||
49 | {% endblock %} \ No newline at end of file | ||
diff --git a/themes/courgette/img/apple-touch-icon-144x144-precomposed.png b/themes/courgette/img/apple-touch-icon-144x144-precomposed.png new file mode 100755 index 00000000..557b479c --- /dev/null +++ b/themes/courgette/img/apple-touch-icon-144x144-precomposed.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/apple-touch-icon-72x72-precomposed.png b/themes/courgette/img/apple-touch-icon-72x72-precomposed.png new file mode 100755 index 00000000..e167d3a4 --- /dev/null +++ b/themes/courgette/img/apple-touch-icon-72x72-precomposed.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/apple-touch-icon.png b/themes/courgette/img/apple-touch-icon.png new file mode 100755 index 00000000..4d222fba --- /dev/null +++ b/themes/courgette/img/apple-touch-icon.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/bg-select.png b/themes/courgette/img/bg-select.png new file mode 100644 index 00000000..3a77d0eb --- /dev/null +++ b/themes/courgette/img/bg-select.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/backtotop.png b/themes/courgette/img/default/backtotop.png new file mode 100755 index 00000000..051238ef --- /dev/null +++ b/themes/courgette/img/default/backtotop.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/bad-display.png b/themes/courgette/img/default/bad-display.png new file mode 100755 index 00000000..6866799f --- /dev/null +++ b/themes/courgette/img/default/bad-display.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/checkmark-off.png b/themes/courgette/img/default/checkmark-off.png new file mode 100755 index 00000000..3db5a06d --- /dev/null +++ b/themes/courgette/img/default/checkmark-off.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/checkmark-on.png b/themes/courgette/img/default/checkmark-on.png new file mode 100755 index 00000000..cd3abb2c --- /dev/null +++ b/themes/courgette/img/default/checkmark-on.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/clock.png b/themes/courgette/img/default/clock.png new file mode 100755 index 00000000..6164e92b --- /dev/null +++ b/themes/courgette/img/default/clock.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/down.png b/themes/courgette/img/default/down.png new file mode 100755 index 00000000..b9d536a7 --- /dev/null +++ b/themes/courgette/img/default/down.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/envelop.png b/themes/courgette/img/default/envelop.png new file mode 100755 index 00000000..6be1c886 --- /dev/null +++ b/themes/courgette/img/default/envelop.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/flattr.png b/themes/courgette/img/default/flattr.png new file mode 100755 index 00000000..0404aaea --- /dev/null +++ b/themes/courgette/img/default/flattr.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/left.png b/themes/courgette/img/default/left.png new file mode 100755 index 00000000..a0a53631 --- /dev/null +++ b/themes/courgette/img/default/left.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/link.png b/themes/courgette/img/default/link.png new file mode 100755 index 00000000..db62819d --- /dev/null +++ b/themes/courgette/img/default/link.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/remove.png b/themes/courgette/img/default/remove.png new file mode 100755 index 00000000..f8ad56a3 --- /dev/null +++ b/themes/courgette/img/default/remove.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/shaarli.png b/themes/courgette/img/default/shaarli.png new file mode 100755 index 00000000..1eb30f60 --- /dev/null +++ b/themes/courgette/img/default/shaarli.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/star-off.png b/themes/courgette/img/default/star-off.png new file mode 100755 index 00000000..6a0133a7 --- /dev/null +++ b/themes/courgette/img/default/star-off.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/star-on.png b/themes/courgette/img/default/star-on.png new file mode 100755 index 00000000..a9f96eaa --- /dev/null +++ b/themes/courgette/img/default/star-on.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/top.png b/themes/courgette/img/default/top.png new file mode 100755 index 00000000..954a8c0a --- /dev/null +++ b/themes/courgette/img/default/top.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/default/twitter.png b/themes/courgette/img/default/twitter.png new file mode 100755 index 00000000..cfcfe419 --- /dev/null +++ b/themes/courgette/img/default/twitter.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/favicon.ico b/themes/courgette/img/favicon.ico new file mode 100755 index 00000000..0e9ff779 --- /dev/null +++ b/themes/courgette/img/favicon.ico | |||
Binary files differ | |||
diff --git a/themes/courgette/img/logo.png b/themes/courgette/img/logo.png new file mode 100755 index 00000000..5305c77d --- /dev/null +++ b/themes/courgette/img/logo.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/logo.svg b/themes/courgette/img/logo.svg new file mode 100644 index 00000000..865da440 --- /dev/null +++ b/themes/courgette/img/logo.svg | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64" height="64"> | ||
3 | <circle cx="32" cy="32" r="29.5" style="fill:#000" /> | ||
4 | <path d="m 16,18 33,0 0,26 -16.5,6 -16.5,-6 z" fill="#fff" /> | ||
5 | <rect width="9" height="2.5" x="17.5" y="24.5" fill="#000" /> | ||
6 | <rect width="9" height="2.5" x="28" y="24.5" fill="#000" /> | ||
7 | <rect width="9" height="2.5" x="38.5" y="24.5" fill="#000" /> | ||
8 | </svg> | ||
diff --git a/themes/courgette/img/messages/close.png b/themes/courgette/img/messages/close.png new file mode 100755 index 00000000..731aa018 --- /dev/null +++ b/themes/courgette/img/messages/close.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/messages/cross.png b/themes/courgette/img/messages/cross.png new file mode 100755 index 00000000..1514d51a --- /dev/null +++ b/themes/courgette/img/messages/cross.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/messages/help.png b/themes/courgette/img/messages/help.png new file mode 100755 index 00000000..5c870176 --- /dev/null +++ b/themes/courgette/img/messages/help.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/messages/tick.png b/themes/courgette/img/messages/tick.png new file mode 100755 index 00000000..a9925a06 --- /dev/null +++ b/themes/courgette/img/messages/tick.png | |||
Binary files differ | |||
diff --git a/themes/courgette/img/messages/warning.png b/themes/courgette/img/messages/warning.png new file mode 100755 index 00000000..628cf2da --- /dev/null +++ b/themes/courgette/img/messages/warning.png | |||
Binary files differ | |||
diff --git a/themes/courgette/js/init.js b/themes/courgette/js/init.js new file mode 100755 index 00000000..dca83906 --- /dev/null +++ b/themes/courgette/js/init.js | |||
@@ -0,0 +1,6 @@ | |||
1 | $.fn.ready(function () { | ||
2 | $('#menu').on('click', function(){ | ||
3 | $('body').toggleClass('menuOpen'); | ||
4 | $('#menuContainer, #article_toolbar').toggleClass('open'); | ||
5 | }); | ||
6 | }) \ No newline at end of file | ||
diff --git a/themes/courgette/js/restoreScroll.js b/themes/courgette/js/restoreScroll.js new file mode 100755 index 00000000..331c9e19 --- /dev/null +++ b/themes/courgette/js/restoreScroll.js | |||
@@ -0,0 +1,25 @@ | |||
1 | function supportsLocalStorage() { | ||
2 | try { | ||
3 | return 'localStorage' in window && window['localStorage'] !== null; | ||
4 | } catch (e) { | ||
5 | return false; | ||
6 | } | ||
7 | } | ||
8 | |||
9 | function savePercent(id, percent) { | ||
10 | if (!supportsLocalStorage()) { return false; } | ||
11 | localStorage["poche.article." + id + ".percent"] = percent; | ||
12 | return true; | ||
13 | } | ||
14 | |||
15 | function retrievePercent(id) { | ||
16 | if (!supportsLocalStorage()) { return false; } | ||
17 | |||
18 | var bheight = $(document).height(); | ||
19 | var percent = localStorage["poche.article." + id + ".percent"]; | ||
20 | var scroll = bheight * percent; | ||
21 | |||
22 | $('html,body').animate({scrollTop: scroll}, 'fast'); | ||
23 | |||
24 | return true; | ||
25 | } \ No newline at end of file | ||
diff --git a/themes/courgette/layout.twig b/themes/courgette/layout.twig new file mode 100755 index 00000000..57c2cc98 --- /dev/null +++ b/themes/courgette/layout.twig | |||
@@ -0,0 +1,32 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="{{ lang }}"><![endif]--> | ||
3 | <!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="{{ lang }}"><![endif]--> | ||
4 | <!--[if IE 8]><html class="no-js ie8 ie678" lang="{{ lang }}"><![endif]--> | ||
5 | <!--[if gt IE 8]><html class="no-js" lang="{{ lang }}"><![endif]--> | ||
6 | <html lang="{{ lang }}"> | ||
7 | <head> | ||
8 | <meta name="viewport" content="initial-scale=1.0"> | ||
9 | <meta charset="utf-8"> | ||
10 | <!--[if IE]> | ||
11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> | ||
12 | <![endif]--> | ||
13 | <title>{% block title %}{% endblock %} - wallabag</title> | ||
14 | {% include '_head.twig' %} | ||
15 | {% include '_bookmarklet.twig' %} | ||
16 | </head> | ||
17 | <body> | ||
18 | {% include '_top.twig' %} | ||
19 | <div id="main"> | ||
20 | <button id="menu"><span>Menu</span></button> | ||
21 | {% block menu %}{% endblock %} | ||
22 | {% block precontent %}{% endblock %} | ||
23 | {% block messages %} | ||
24 | {% include '_messages.twig' %} | ||
25 | {% endblock %} | ||
26 | <div id="content" class="w600p center"> | ||
27 | {% block content %}{% endblock %} | ||
28 | </div> | ||
29 | </div> | ||
30 | {% include '_footer.twig' %} | ||
31 | </body> | ||
32 | </html> \ No newline at end of file | ||
diff --git a/themes/courgette/login.twig b/themes/courgette/login.twig new file mode 100755 index 00000000..1fec0fc9 --- /dev/null +++ b/themes/courgette/login.twig | |||
@@ -0,0 +1,32 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | |||
3 | {% block title %}{% trans "login to your wallabag" %}{% endblock %} | ||
4 | {% block content %} | ||
5 | <form method="post" action="?login" name="loginform" id="loginForm"> | ||
6 | <fieldset class="w500p center"> | ||
7 | <h2 class="mbs txtcenter">{% trans "login to your wallabag" %}</h2> | ||
8 | {% if constant('MODE_DEMO') == 1 %}<p>{% trans "you are in demo mode, some features may be disabled." %}</p>{% endif %} | ||
9 | <div class="row"> | ||
10 | <label class="col w150p" for="login">{% trans "Login" %}</label> | ||
11 | <input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus {% if constant('MODE_DEMO') == 1 %}value="poche"{% endif %} /> | ||
12 | </div> | ||
13 | |||
14 | <div class="row"> | ||
15 | <label class="col w150p" for="password">{% trans "Password" %}</label> | ||
16 | <input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2" {% if constant('MODE_DEMO') == 1 %}value="poche"{% endif %} /> | ||
17 | </div> | ||
18 | <div class="row"> | ||
19 | <label class="col w150p" for="longlastingsession">{% trans "Stay signed in" %}</label> | ||
20 | <div class="col"> | ||
21 | <input type="checkbox" id="longlastingsession" name="longlastingsession" tabindex="3"> | ||
22 | <small class="inbl">{% trans "(Do not check on public computers)" %}</small> | ||
23 | </div> | ||
24 | </div> | ||
25 | <div class="row mts txtcenter"> | ||
26 | <button class="bouton" type="submit" tabindex="4">{% trans "Login" %}</button> | ||
27 | </div> | ||
28 | </fieldset> | ||
29 | <input type="hidden" name="returnurl" value="{{ referer }}"> | ||
30 | <input type="hidden" name="token" value="{{ token }}"> | ||
31 | </form> | ||
32 | {% endblock %} \ No newline at end of file | ||
diff --git a/themes/courgette/screenshot.jpg b/themes/courgette/screenshot.jpg new file mode 100755 index 00000000..44ee4b63 --- /dev/null +++ b/themes/courgette/screenshot.jpg | |||
Binary files differ | |||
diff --git a/themes/courgette/theme.ini b/themes/courgette/theme.ini new file mode 100644 index 00000000..996d171f --- /dev/null +++ b/themes/courgette/theme.ini | |||
@@ -0,0 +1,3 @@ | |||
1 | name = Courgette | ||
2 | description = Responsive black and white theme especially adapted to smartphones. | ||
3 | requirements[] = default | ||
diff --git a/themes/courgette/view.twig b/themes/courgette/view.twig new file mode 100755 index 00000000..e80829ef --- /dev/null +++ b/themes/courgette/view.twig | |||
@@ -0,0 +1,45 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} | ||
3 | {% block content %} | ||
4 | <div id="article_toolbar"> | ||
5 | <ul> | ||
6 | <li><a href="./" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> | ||
7 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li> | ||
8 | <li><a title="{% trans "toggle mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> | ||
9 | <li><a title="{% trans "toggle favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | ||
10 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | ||
11 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} | ||
12 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} | ||
13 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | ||
14 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li class="flattrli"><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %} | ||
15 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "this article appears wrong?" %}" class="tool bad-display"><span>{% trans "this article appears wrong?" %}</span></a></li> | ||
16 | </ul> | ||
17 | </div> | ||
18 | <div id="article"> | ||
19 | <header class="mbm"> | ||
20 | <h1>{{ entry.title|raw }}</h1> | ||
21 | </header> | ||
22 | <article> | ||
23 | {{ content | raw }} | ||
24 | </article> | ||
25 | </div> | ||
26 | <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/restoreScroll.js"></script> | ||
27 | <script type="text/javascript"> | ||
28 | $(document).ready(function() { | ||
29 | |||
30 | $(window).scroll(function(e){ | ||
31 | var scrollTop = $(window).scrollTop(); | ||
32 | var docHeight = $(document).height(); | ||
33 | var scrollPercent = (scrollTop) / (docHeight); | ||
34 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; | ||
35 | savePercent({{ entry.id|e }}, scrollPercentRounded); | ||
36 | }); | ||
37 | |||
38 | retrievePercent({{ entry.id|e }}); | ||
39 | |||
40 | $(window).resize(function(){ | ||
41 | retrievePercent({{ entry.id|e }}); | ||
42 | }); | ||
43 | }); | ||
44 | </script> | ||
45 | {% endblock %} \ No newline at end of file | ||
diff --git a/themes/dark/theme.ini b/themes/dark/theme.ini new file mode 100644 index 00000000..4b020d36 --- /dev/null +++ b/themes/dark/theme.ini | |||
@@ -0,0 +1,2 @@ | |||
1 | name = Dark | ||
2 | requirements[] = default | ||
diff --git a/themes/default/_bookmarklet.twig b/themes/default/_bookmarklet.twig index 2f3b2d16..2e3071ad 100644 --- a/themes/default/_bookmarklet.twig +++ b/themes/default/_bookmarklet.twig | |||
@@ -1,3 +1,3 @@ | |||
1 | <script type="text/javascript"> | 1 | <script type="text/javascript"> |
2 | top["bookmarklet-url@inthepoche.com"]=""+"<!DOCTYPE html>"+"<html>"+"<head>"+"<title>poche it !</title>"+'<link rel="icon" href="{{poche_url}}tpl/img/favicon.ico" />'+"</head>"+"<body>"+"<script>"+"window.onload=function(){"+"window.setTimeout(function(){"+"history.back();"+"},250);"+"};"+"</scr"+"ipt>"+"</body>"+"</html>" | 2 | top["bookmarklet-url@wallabag.org"]=""+"<!DOCTYPE html>"+"<html>"+"<head>"+"<title>poche it !</title>"+'<link rel="icon" href="{{poche_url}}tpl/img/favicon.ico" />'+"</head>"+"<body>"+"<script>"+"window.onload=function(){"+"window.setTimeout(function(){"+"history.back();"+"},250);"+"};"+"</scr"+"ipt>"+"</body>"+"</html>" |
3 | </script> \ No newline at end of file | 3 | </script> \ No newline at end of file |
diff --git a/themes/default/_footer.twig b/themes/default/_footer.twig index 06148a57..f837ae38 100644 --- a/themes/default/_footer.twig +++ b/themes/default/_footer.twig | |||
@@ -1,4 +1,4 @@ | |||
1 | <footer class="w600p center mt3 mb3 smaller txtright"> | 1 | <footer class="w600p center mt3 mb3 smaller txtright"> |
2 | <p>{% trans "powered by" %} <a href="http://inthepoche.com">poche</a></p> | 2 | <p>{% trans "powered by" %} <a href="http://wallabag.org">wallabag</a></p> |
3 | {% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %} | 3 | {% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %} |
4 | </footer> \ No newline at end of file | 4 | </footer> \ No newline at end of file |
diff --git a/themes/default/config.twig b/themes/default/config.twig index 10df726e..df62520a 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig | |||
@@ -6,10 +6,10 @@ | |||
6 | {% endblock %} | 6 | {% endblock %} |
7 | {% block content %} | 7 | {% block content %} |
8 | <h2>{% trans "Poching links" %}</h2> | 8 | <h2>{% trans "Poching links" %}</h2> |
9 | <p>{% trans "There are several ways to poche a link:" %} (<a href="http://doc.inthepoche.com/" title="{% trans "read the documentation" %}">?</a>)</p> | 9 | <p>{% trans "There are several ways to poche a link:" %} (<a href="http://doc.wallabag.org/" title="{% trans "read the documentation" %}">?</a>)</p> |
10 | <ul> | 10 | <ul> |
11 | <li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/poche/" title="download the firefox extension">{% trans "download the extension" %}</a></li> | 11 | <li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/poche/" title="download the firefox extension">{% trans "download the extension" %}</a></li> |
12 | <li>Chrome: <a href="http://doc.inthepoche.com/doku.php?id=users:chrome_extension" title="download the chrome extension">{% trans "download the extension" %}</a></li> | 12 | <li>Chrome: <a href="http://doc.wallabag.org/doku.php?id=users:chrome_extension" title="download the chrome extension">{% trans "download the extension" %}</a></li> |
13 | <li>Android: <a href="https://f-droid.org/repository/browse/?fdid=fr.gaulupeau.apps.Poche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li> | 13 | <li>Android: <a href="https://f-droid.org/repository/browse/?fdid=fr.gaulupeau.apps.Poche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li> |
14 | <li>Windows Phone: <a href="https://www.windowsphone.com/en-us/store/app/poche/334de2f0-51b5-4826-8549-a3d805a37e83" title="download the window phone application">{% trans "download the application" %}</a></li> | 14 | <li>Windows Phone: <a href="https://www.windowsphone.com/en-us/store/app/poche/334de2f0-51b5-4826-8549-a3d805a37e83" title="download the window phone application">{% trans "download the application" %}</a></li> |
15 | <li> | 15 | <li> |
@@ -19,14 +19,14 @@ | |||
19 | <input type="submit" value="{% trans "poche it!" %}" /> | 19 | <input type="submit" value="{% trans "poche it!" %}" /> |
20 | </form> | 20 | </form> |
21 | </li> | 21 | </li> |
22 | <li>{% trans "Bookmarklet: drag & drop this link to your bookmarks bar" %} <a id="bookmarklet" ondragend="this.click();" 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></li> | 22 | <li>{% trans "Bookmarklet: drag & drop this link to your bookmarks bar" %} <a id="bookmarklet" ondragend="this.click();" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@wallabag.org']){top['bookmarklet-url@wallabag.org'];}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></li> |
23 | </ul> | 23 | </ul> |
24 | 24 | ||
25 | <h2>{% trans "Updating poche" %}</h2> | 25 | <h2>{% trans "Updating poche" %}</h2> |
26 | <ul> | 26 | <ul> |
27 | <li>{% trans "Installed version" %} : <strong>{{ constant('POCHE') }}</strong></li> | 27 | <li>{% trans "Installed version" %} : <strong>{{ constant('POCHE') }}</strong></li> |
28 | <li>{% trans "Latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %}</li> | 28 | <li>{% trans "Latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %}</li> |
29 | {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %} | 29 | {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %} |
30 | </ul> | 30 | </ul> |
31 | 31 | ||
32 | <h2>{% trans "Feeds" %}</h2> | 32 | <h2>{% trans "Feeds" %}</h2> |
@@ -38,6 +38,8 @@ | |||
38 | <li><a href="?feed&type=fav&user_id={{ user_id }}&token={{ token }}" target="_blank">{% trans "Favorites feed" %}</a></li> | 38 | <li><a href="?feed&type=fav&user_id={{ user_id }}&token={{ token }}" target="_blank">{% trans "Favorites feed" %}</a></li> |
39 | <li><a href="?feed&type=archive&user_id={{ user_id }}&token={{ token }}" target="_blank">{% trans "Archive feed" %}</a></li> | 39 | <li><a href="?feed&type=archive&user_id={{ user_id }}&token={{ token }}" target="_blank">{% trans "Archive feed" %}</a></li> |
40 | </ul> | 40 | </ul> |
41 | <p>{% trans "Your token:" %} <strong>{{token}}</strong></p> | ||
42 | <p>{% trans "Your user id:" %} <strong>{{user_id}}</strong></p> | ||
41 | <p>{% trans "You can regenerate your token: <a href='?feed&action=generate'>generate!</a>." %}</p> | 43 | <p>{% trans "You can regenerate your token: <a href='?feed&action=generate'>generate!</a>." %}</p> |
42 | {% endif %} | 44 | {% endif %} |
43 | 45 | ||
@@ -47,8 +49,8 @@ | |||
47 | <div class="row"> | 49 | <div class="row"> |
48 | <label class="col w150p" for="theme">{% trans "Theme:" %}</label> | 50 | <label class="col w150p" for="theme">{% trans "Theme:" %}</label> |
49 | <select class="col" id="theme" name="theme"> | 51 | <select class="col" id="theme" name="theme"> |
50 | {% for theme in themes %} | 52 | {% for key, theme in themes %} |
51 | <option value="{{ theme.name }}" {{ theme.current ? 'selected' : '' }}>{{ theme.name }}</option> | 53 | <option value="{{ key }}" {{ theme.current ? 'selected' : '' }}>{{ theme.name }}</option> |
52 | {% endfor %} | 54 | {% endfor %} |
53 | </select> | 55 | </select> |
54 | </div> | 56 | </div> |
@@ -102,11 +104,12 @@ | |||
102 | 104 | ||
103 | <h2>{% trans "Import" %}</h2> | 105 | <h2>{% trans "Import" %}</h2> |
104 | <p>{% trans "Please execute the import script locally as it can take a very long time." %}</p> | 106 | <p>{% trans "Please execute the import script locally as it can take a very long time." %}</p> |
105 | <p>{% trans "More info in the official docs:" %} <a href="http://doc.inthepoche.com/doku.php?id=users:migrate">inthepoche.com</a></p> | 107 | <p>{% trans "More info in the official docs:" %} <a href="http://doc.wallabag.org/doku.php?id=users:migrate">wallabag.org</a></p> |
106 | <ul> | 108 | <ul> |
107 | <li><a href="./?import&from=pocket">{% trans "Import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li> | 109 | <li><a href="./?import&from=pocket">{% trans "Import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li> |
108 | <li><a href="./?import&from=readability">{% trans "Import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li> | 110 | <li><a href="./?import&from=readability">{% trans "Import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li> |
109 | <li><a href="./?import&from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li> | 111 | <li><a href="./?import&from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li> |
112 | <li><a href="./?import&from=poche">{% trans "Import from poche" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCHE_FILE')) }}</li> | ||
110 | </ul> | 113 | </ul> |
111 | 114 | ||
112 | <h2>{% trans "Export your poche data" %}</h2> | 115 | <h2>{% trans "Export your poche data" %}</h2> |
diff --git a/themes/default/error.twig b/themes/default/error.twig index 4cfc4824..528a0985 100644 --- a/themes/default/error.twig +++ b/themes/default/error.twig | |||
@@ -7,5 +7,8 @@ | |||
7 | <li>{{message}}</li> | 7 | <li>{{message}}</li> |
8 | {% endfor %} | 8 | {% endfor %} |
9 | </ol> | 9 | </ol> |
10 | <p>Don't forget <a href="http://doc.inthepoche.com/">the documentation</a>.</p> | 10 | <p>Don't forget <a href="http://doc.wallabag.org/">the documentation</a>.</p> |
11 | <p> | ||
12 | {% trans "You can <a href='wallabag_compatibility_test.php'>check your configuration here</a>." %} | ||
13 | </p> | ||
11 | {% endblock %} | 14 | {% endblock %} |
diff --git a/themes/default/install.twig b/themes/default/install.twig index c4da0954..c89c7e47 100644 --- a/themes/default/install.twig +++ b/themes/default/install.twig | |||
@@ -3,9 +3,9 @@ | |||
3 | {% block content %} | 3 | {% block content %} |
4 | <form method="post" action="?install" name="loginform"> | 4 | <form method="post" action="?install" name="loginform"> |
5 | <fieldset class="w500p center"> | 5 | <fieldset class="w500p center"> |
6 | <h2 class="mbs txtcenter">{% trans "install your poche" %}</h2> | 6 | <h2 class="mbs txtcenter">{% trans "install your wallabag" %}</h2> |
7 | <p> | 7 | <p> |
8 | {% trans "Poche is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://doc.inthepoche.com/'>read the documentation on poche website</a>." %} | 8 | {% trans "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation on wallabag website</a>." %} |
9 | </p> | 9 | </p> |
10 | <p class="row"> | 10 | <p class="row"> |
11 | <label class="col w150p" for="login">{% trans "Login" %}</label> | 11 | <label class="col w150p" for="login">{% trans "Login" %}</label> |
diff --git a/themes/default/layout.twig b/themes/default/layout.twig index fec7054a..dfebc3ea 100644 --- a/themes/default/layout.twig +++ b/themes/default/layout.twig | |||
@@ -10,7 +10,7 @@ | |||
10 | <!--[if IE]> | 10 | <!--[if IE]> |
11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> | 11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> |
12 | <![endif]--> | 12 | <![endif]--> |
13 | <title>{% block title %}{% endblock %} - poche</title> | 13 | <title>{% block title %}{% endblock %} - wallabag</title> |
14 | {% include '_head.twig' %} | 14 | {% include '_head.twig' %} |
15 | {% include '_bookmarklet.twig' %} | 15 | {% include '_bookmarklet.twig' %} |
16 | </head> | 16 | </head> |
diff --git a/themes/default/login.twig b/themes/default/login.twig index e2a9a9f5..bf685240 100644 --- a/themes/default/login.twig +++ b/themes/default/login.twig | |||
@@ -1,11 +1,11 @@ | |||
1 | {% extends "layout.twig" %} | 1 | {% extends "layout.twig" %} |
2 | 2 | ||
3 | {% block title %}{% trans "login to your poche" %}{% endblock %} | 3 | {% block title %}{% trans "login to your wallabag" %}{% endblock %} |
4 | {% block content %} | 4 | {% block content %} |
5 | {% if http_auth == 0 %} | 5 | {% if http_auth == 0 %} |
6 | <form method="post" action="?login" name="loginform"> | 6 | <form method="post" action="?login" name="loginform"> |
7 | <fieldset class="w500p center"> | 7 | <fieldset class="w500p center"> |
8 | <h2 class="mbs txtcenter">{% trans "Login to poche" %}</h2> | 8 | <h2 class="mbs txtcenter">{% trans "Login to wallabag" %}</h2> |
9 | {% if constant('MODE_DEMO') == 1 %}<p>{% trans "you are in demo mode, some features may be disabled." %}</p>{% endif %} | 9 | {% if constant('MODE_DEMO') == 1 %}<p>{% trans "you are in demo mode, some features may be disabled." %}</p>{% endif %} |
10 | <div class="row"> | 10 | <div class="row"> |
11 | <label class="col w150p" for="login">{% trans "Username" %}</label> | 11 | <label class="col w150p" for="login">{% trans "Username" %}</label> |
diff --git a/themes/default/theme.ini b/themes/default/theme.ini new file mode 100644 index 00000000..9f3cfb6a --- /dev/null +++ b/themes/default/theme.ini | |||
@@ -0,0 +1 @@ | |||
name = Default \ No newline at end of file | |||
diff --git a/themes/default/view.twig b/themes/default/view.twig index e4a2fe74..d09977a8 100644 --- a/themes/default/view.twig +++ b/themes/default/view.twig | |||
@@ -9,11 +9,11 @@ | |||
9 | <li><a title="{% trans "Mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li> | 9 | <li><a title="{% trans "Mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li> |
10 | <li><a title="{% trans "Favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</span></a></li> | 10 | <li><a title="{% trans "Favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</span></a></li> |
11 | <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> | 11 | <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> |
12 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} | 12 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} |
13 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} | 13 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} |
14 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | 14 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} |
15 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %} | 15 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %} |
16 | <li><a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li> | 16 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li> |
17 | </ul> | 17 | </ul> |
18 | </div> | 18 | </div> |
19 | <div id="article"> | 19 | <div id="article"> |
diff --git a/themes/dmagenta/theme.ini b/themes/dmagenta/theme.ini new file mode 100644 index 00000000..24ff3c4a --- /dev/null +++ b/themes/dmagenta/theme.ini | |||
@@ -0,0 +1,2 @@ | |||
1 | name = Dark Magenta | ||
2 | requirements[] = default | ||
diff --git a/themes/solarized-dark/css/style-solarized-dark.css b/themes/solarized-dark/css/style-solarized-dark.css index 7ce8a563..3b0feb2a 100644 --- a/themes/solarized-dark/css/style-solarized-dark.css +++ b/themes/solarized-dark/css/style-solarized-dark.css | |||
@@ -42,7 +42,8 @@ body, | |||
42 | body, | 42 | body, |
43 | a, | 43 | a, |
44 | a:hover, | 44 | a:hover, |
45 | a:visited { | 45 | a:visited, |
46 | td { | ||
46 | color: #839496; | 47 | color: #839496; |
47 | } | 48 | } |
48 | 49 | ||
diff --git a/themes/solarized-dark/theme.ini b/themes/solarized-dark/theme.ini new file mode 100644 index 00000000..7b6b341e --- /dev/null +++ b/themes/solarized-dark/theme.ini | |||
@@ -0,0 +1,2 @@ | |||
1 | name = Dark Solarized | ||
2 | requirements[] = default | ||
diff --git a/themes/solarized/css/style-solarized.css b/themes/solarized/css/style-solarized.css index 9286c750..6058d056 100644 --- a/themes/solarized/css/style-solarized.css +++ b/themes/solarized/css/style-solarized.css | |||
@@ -42,7 +42,8 @@ body, | |||
42 | body, | 42 | body, |
43 | a, | 43 | a, |
44 | a:hover, | 44 | a:hover, |
45 | a:visited { | 45 | a:visited, |
46 | td { | ||
46 | color: #657b83; | 47 | color: #657b83; |
47 | } | 48 | } |
48 | 49 | ||
diff --git a/themes/solarized/theme.ini b/themes/solarized/theme.ini new file mode 100644 index 00000000..703997b9 --- /dev/null +++ b/themes/solarized/theme.ini | |||
@@ -0,0 +1,2 @@ | |||
1 | name = Solarized | ||
2 | requirements[] = default | ||
diff --git a/poche_compatibility_test.php b/wallabag_compatibility_test.php index 42faaa2c..fd285042 100644 --- a/poche_compatibility_test.php +++ b/wallabag_compatibility_test.php | |||
@@ -1,5 +1,5 @@ | |||
1 | <?php | 1 | <?php |
2 | $app_name = 'poche 1.3'; | 2 | $app_name = 'wallabag 1'; |
3 | 3 | ||
4 | $php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>=')); | 4 | $php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>=')); |
5 | $pcre_ok = extension_loaded('pcre'); | 5 | $pcre_ok = extension_loaded('pcre'); |
@@ -313,13 +313,13 @@ div.chunk { | |||
313 | <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok) { ?> | 313 | <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok) { ?> |
314 | <h3>Bottom Line: Yes, you can!</h3> | 314 | <h3>Bottom Line: Yes, you can!</h3> |
315 | <p><em>Your webhost has its act together!</em></p> | 315 | <p><em>Your webhost has its act together!</em></p> |
316 | <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://inthepoche.com/download">inthepoche.com</a>.</p> | 316 | <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p> |
317 | <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p> | 317 | <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p> |
318 | <?php //} else if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $allow_url_fopen_ok && $filter_ok) { ?> | 318 | <?php //} else if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $allow_url_fopen_ok && $filter_ok) { ?> |
319 | <?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok) { ?> | 319 | <?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok) { ?> |
320 | <h3>Bottom Line: Yes, you can!</h3> | 320 | <h3>Bottom Line: Yes, you can!</h3> |
321 | <p><em>For most feeds, it'll run with no problems.</em> There are certain languages that you might have a hard time with though.</p> | 321 | <p><em>For most feeds, it'll run with no problems.</em> There are certain languages that you might have a hard time with though.</p> |
322 | <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://inthepoche.com/download">inthepoche.com</a>.</p> | 322 | <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p> |
323 | <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p> | 323 | <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p> |
324 | <?php } else { ?> | 324 | <?php } else { ?> |
325 | <h3>Bottom Line: We're sorry…</h3> | 325 | <h3>Bottom Line: We're sorry…</h3> |