Merge pull request #256 from inthepoche/dev

merge 1.0.0
This commit is contained in:
Nicolas Lœuillet 2013-10-03 10:14:54 -07:00
commit 01e671f4d1
138 changed files with 1614 additions and 158 deletions

2
.gitignore vendored
View File

@ -3,6 +3,4 @@ cache/*
vendor
composer.phar
db/poche.sqlite
output
phpdoc*
inc/poche/config.inc.php

6
.gitmodules vendored
View File

@ -1,6 +0,0 @@
[submodule "inc/3rdparty/site_config"]
path = inc/3rdparty/site_config
url = git@github.com:inthepoche/site_config.git
[submodule "themes"]
path = themes
url = git://github.com/inthepoche/poche-themes.git

View File

@ -9,9 +9,9 @@ class FlattrItem {
public $flattrItemURL;
public $numflattrs;
public function checkItem($urltoflattr) {
$this->cacheflattrfile($urltoflattr);
$flattrResponse = file_get_contents(CACHE . "/flattr/".base64_encode($urltoflattr).".cache");
public function checkItem($urltoflattr,$id) {
$this->cacheflattrfile($urltoflattr, $id);
$flattrResponse = file_get_contents(CACHE . "/flattr/".$id.".cache");
if($flattrResponse != FALSE) {
$result = json_decode($flattrResponse);
if (isset($result->message)){
@ -33,15 +33,15 @@ class FlattrItem {
}
}
private function cacheflattrfile($urltoflattr) {
private function cacheflattrfile($urltoflattr, $id) {
if (!is_dir(CACHE . '/flattr')) {
mkdir(CACHE . '/flattr', 0777);
}
// if a cache flattr file for this url already exists and it's been less than one day than it have been updated, see in /cache
if ((!file_exists(CACHE . "/flattr/".base64_encode($urltoflattr).".cache")) || (time() - filemtime(CACHE . "/flattr/".base64_encode($urltoflattr).".cache") > 86400)) {
if ((!file_exists(CACHE . "/flattr/".$id.".cache")) || (time() - filemtime(CACHE . "/flattr/".$id.".cache") > 86400)) {
$askForFlattr = Tools::getFile(FLATTR_API . $urltoflattr);
$flattrCacheFile = fopen(CACHE . "/flattr/".base64_encode($urltoflattr).".cache", 'w+');
$flattrCacheFile = fopen(CACHE . "/flattr/".$id.".cache", 'w+');
fwrite($flattrCacheFile, $askForFlattr);
fclose($flattrCacheFile);
}

6
inc/3rdparty/site_config/README.md vendored Normal file
View File

@ -0,0 +1,6 @@
Full-Text RSS Site Patterns
---------------------------
Site patterns allow you to specify what should be extracted from specific sites.
Please see http://help.fivefilters.org/customer/portal/articles/223153-site-patterns for more information.

View File

@ -0,0 +1,6 @@
title: //title
body: //h2 | //span[@class='masque'] | //article[@class='corps_article_right']
prune: no
tidy: no
test_url: http://www.bfmtv.com/societe/cigarette-electronique-dangers-588622.html

View File

@ -0,0 +1,7 @@
title: //title
body: //div[@class='post-content']
prune: no
tidy: no
test_url: http://www.inthepoche.com/?post/poche-hosting

View File

View File

@ -0,0 +1,6 @@
title: //title
body: //h2 | //p | //ul
prune: no
tidy: no
test_url: http://www.tldp.org/HOWTO/Plug-and-Play-HOWTO-7.html

3
inc/3rdparty/site_config/index.php vendored Normal file
View File

@ -0,0 +1,3 @@
<?php
// this is here to prevent directory listing over the web
?>

View File

@ -0,0 +1,19 @@
title: //h1[@id='firstHeading']
body: //div[@id = 'bodyContent']
strip_id_or_class: editsection
#strip_id_or_class: toc
strip_id_or_class: vertical-navbox
strip: //table[@id='toc']
strip: //div[@id='catlinks']
strip: //div[@id='jump-to-nav']
strip: //div[@class='thumbcaption']//div[@class='magnify']
strip: //table[@class='navbox']
strip: //table[contains(@class, 'infobox')]
strip: //div[@class='dablink']
strip: //div[@id='contentSub']
strip: //table[contains(@class, 'metadata')]
strip: //*[contains(@class, 'noprint')]
strip: //span[@title='pronunciation:']
prune: no
tidy: no
test_url: http://en.wikipedia.org/wiki/Christopher_Lloyd

View File

@ -0,0 +1,3 @@
<?php
// this is here to prevent directory listing over the web
?>

View File

@ -0,0 +1,2 @@
<?php
return 1;

View File

@ -113,9 +113,17 @@ class Database {
}
public function updateUserConfig($userId, $key, $value) {
$sql_update = "UPDATE users_config SET `value`=? WHERE `user_id`=? AND `name`=?";
$params_update = array($value, $userId, $key);
$query = $this->executeQuery($sql_update, $params_update);
$config = $this->getConfigUser($userId);
if (!isset ($user_config[$key])) {
$sql = "INSERT INTO users_config (`value`, `user_id`, `name`) VALUES (?, ?, ?)";
}
else {
$sql = "UPDATE users_config SET `value`=? WHERE `user_id`=? AND `name`=?";
}
$params = array($value, $userId, $key);
$query = $this->executeQuery($sql, $params);
}
private function executeQuery($sql, $params) {

View File

@ -105,10 +105,18 @@ class Poche
public function themeIsInstalled() {
# Twig is an absolute requirement for Poche to function. Abort immediately if the Composer installer hasn't been run yet
if (! self::$canRenderTemplates) {
$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://inthepoche.com/?pages/Documentation">the documentation.</a>';
$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>';
return false;
}
if (! is_writable(CACHE)) {
$this->notInstalledMessage = '<h1>error</h1><p>You don\'t have write access on cache directory.</p>';
self::$canRenderTemplates = false;
return false;
}
# Check if the selected theme and its requirements are present
if (! is_dir(THEME . '/' . $this->getTheme())) {
@ -145,16 +153,11 @@ class Poche
if (empty($configSalt)) {
$msg = '<h1>error</h1><p>You have not yet filled in the SALT value in the config.inc.php file.</p>';
} else if (! is_writable(CACHE)) {
Tools::logm('you don\'t have write access on cache directory');
$msg = '<h1>error</h1><p>You don\'t have write access on cache directory.</p>';
} else if (STORAGE == 'sqlite' && ! file_exists(STORAGE_SQLITE)) {
Tools::logm('sqlite file doesn\'t exist');
$msg = '<h1>error</h1><p>sqlite file doesn\'t exist, you can find it in install folder. Copy it in /db folder.</p>';
} else if (file_exists(ROOT . '/install/update.php') && ! DEBUG_POCHE) {
$msg = '<h1>setup</h1><p><strong>It\'s your first time here?</strong> Please copy /install/poche.sqlite in db folder. Then, delete install folder.<br /><strong>If you have already installed poche</strong>, an update is needed <a href="install/update.php">by clicking here</a>.</p>';
} else if (is_dir(ROOT . '/install') && ! DEBUG_POCHE) {
$msg = '<h1>setup</h1><p><strong>If you want to update your poche</strong>, you just have to delete /install folder. <br /><strong>To install your poche with sqlite</strong>, copy /install/poche.sqlite in /db and delete the folder /install. you have to delete the /install folder before using poche.</p>';
$msg = '<h1>install folder</h1><p>you have to delete the /install folder before using poche.</p>';
} else if (STORAGE == 'sqlite' && ! is_writable(STORAGE_SQLITE)) {
Tools::logm('you don\'t have write access on sqlite file');
$msg = '<h1>error</h1><p>You don\'t have write access on sqlite file.</p>';
@ -255,7 +258,7 @@ class Poche
while (($theme = readdir($handle)) !== false) {
# Themes are stored in a directory, so all directory names are themes
# @todo move theme installation data to database
if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.'))) {
if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.', '.git'))) {
continue;
}
@ -330,7 +333,7 @@ class Poche
$msg = 'error : can\'t delete link #' . $id;
}
Tools::logm($msg);
Tools::redirect('?');
Tools::redirect();
break;
case 'toggle_fav' :
$this->store->favoriteById($id, $this->user->getId());
@ -381,17 +384,17 @@ class Poche
$tidy = tidy_parse_string($content, array('indent'=>true, 'show-body-only' => true), 'UTF8');
$tidy->cleanRepair();
$content = $tidy->value;
# flattr checking
$flattr = new FlattrItem();
$flattr->checkItem($entry['url']);
$tpl_vars = array(
'entry' => $entry,
'content' => $content,
'flattr' => $flattr
);
}
# flattr checking
$flattr = new FlattrItem();
$flattr->checkItem($entry['url'],$entry['id']);
$tpl_vars = array(
'entry' => $entry,
'content' => $content,
'flattr' => $flattr
);
}
else {
Tools::logm('error in view call : entry is null');
@ -404,6 +407,7 @@ class Poche
'page_links' => '',
'nb_results' => '',
);
if (count($entries) > 0) {
$this->pagination->set_total(count($entries));
$page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&');

View File

@ -26,7 +26,7 @@ define ('STORAGE_PASSWORD', 'poche');
#################################################################################
define ('MODE_DEMO', FALSE);
define ('DEBUG_POCHE', true);
define ('DEBUG_POCHE', FALSE);
define ('DOWNLOAD_PICTURES', FALSE);
define ('CONVERT_LINKS_FOOTNOTES', FALSE);
define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
@ -49,8 +49,12 @@ define ('CACHE', ROOT . '/cache');
define ('PAGINATION', '10');
define ('POCHE_VERSION', '1.0-beta5');
define ('POCHE_VERSION', '1.0.0');
define ('IMPORT_POCKET_FILE', ROOT . '/ril_export.html');
define ('IMPORT_READABILITY_FILE', ROOT . '/readability');
define ('IMPORT_INSTAPAPER_FILE', ROOT . '/instapaper-export.html');
define ('POCKET_FILE', '/ril_export.html');
define ('READABILITY_FILE', '/readability');
define ('INSTAPAPER_FILE', '/instapaper-export.html');
define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE);
define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE);
define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE);

View File

@ -1,39 +0,0 @@
<?php
/**
* poche, a read it later open source system
*
* @category poche
* @author Nicolas Lœuillet <support@inthepoche.com>
* @copyright 2013
* @license http://www.wtfpl.net/ see COPYING file
*/
define ('STORAGE','sqlite'); # postgres, mysql, sqlite
define ('STORAGE_SERVER', 'localhost'); # leave blank for sqlite
define ('STORAGE_DB', 'poche'); # only for postgres & mysql
define ('STORAGE_SQLITE', __DIR__ . '/../../db/poche.sqlite');
define ('STORAGE_USER', 'postgres'); # leave blank for sqlite
define ('STORAGE_PASSWORD', 'postgres'); # leave blank for sqlite
define ('MODE_DEMO', FALSE);
define ('DEBUG_POCHE', FALSE);
define ('DOWNLOAD_PICTURES', FALSE);
define ('SHARE_TWITTER', TRUE);
define ('SHARE_MAIL', TRUE);
define ('SHARE_SHAARLI', FALSE);
define ('SHAARLI_URL', 'http://myshaarliurl.com');
define ('FLATTR', TRUE);
define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url=');
define ('NOT_FLATTRABLE', '0');
define ('FLATTRABLE', '1');
define ('FLATTRED', '2');
define ('ABS_PATH', 'assets/');
define ('TPL', __DIR__ . '/../../tpl');
define ('LOCALE', __DIR__ . '/../../locale');
define ('CACHE', __DIR__ . '/../../cache');
define ('PAGINATION', '10');
define ('THEME', 'light');
define ('IMPORT_POCKET_FILE', './ril_export.html');
define ('IMPORT_READABILITY_FILE', './readability');
define ('IMPORT_INSTAPAPER_FILE', './instapaper-export.html');

View File

@ -1,77 +0,0 @@
<?php
require_once dirname(__FILE__).'/../inc/poche/Tools.class.php';
include dirname(__FILE__).'/../inc/poche/define.inc.php';
include dirname(__FILE__).'/../inc/poche/myconfig.inc.php';
require_once __DIR__ . '/../inc/poche/Database.class.php';
$store = new Database();
?>
<!DOCTYPE html>
<!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]-->
<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<html lang="en">
<head>
<meta charset="utf-8">
<title>updating poche</title>
</head>
<body>
<h1>update poche to 1.0-beta4</h1>
<h2>Changelog</h2>
<ul>
<li>enhancement: updating and installing poche are more easier</li>
<li>enhancement: poche now uses Full Text RSS to fetch content</li>
<li>enhancement: css and twig files are more clean, thanks to NumEricR and nicofrand</li>
<li>enhancement: updated german translation, thanks to HLFH</li>
<li>enhancement: add db/, cache/ and assets/ directories in versioning</li>
<li>enhancement: display messages when error with import, thanks to EliasZ</li>
<li>enhancement: poche compatibility test file</li>
<li>enhancement: <a href="https://github.com/inthepoche/poche/issues/112">#112</a>: link with shaarli</li>
<li>enhancement: <a href="https://github.com/inthepoche/poche/issues/162">#162</a>: links to firefox / chrome / android apps in config screen</li>
<li>bug: encode url to share with twitter / email / shaarli</li>
<li>bug: Add IPv4 url support (and others beginning by a digit)</li>
<li>bug: title page in article view was wrong</li>
<li>bug: <a href="https://github.com/inthepoche/poche/issues/148">#148</a>: use of undefined constant POCHE_VERSION</li>
<li>bug: <a href="https://github.com/inthepoche/poche/issues/148">#149</a>: can't poche theguardian.com</li>
<li>bug: <a href="https://github.com/inthepoche/poche/issues/150">#150</a>: default title for untitled articles</li>
<li>bug: <a href="https://github.com/inthepoche/poche/issues/150">#151</a>: HTML entities in titles are encoded twice</li>
<li>bug: <a href="https://github.com/inthepoche/poche/issues/169">#169</a>: entries height with short description</li>
<li>bug: <a href="https://github.com/inthepoche/poche/issues/175">#175</a>: IP addresses do not appear in "view original"</li>
</ul>
<p>To update your poche, please fill the following fields.</p>
<p>
<form name="update" method="post">
<div><label for="login">login:</label> <input type="text" name="login" id="login" /></div>
<div><label for="password">password:</label> <input type="password" name="password" id="password" /></div>
<div><input type="hidden" name="go" value="ok" /><input type="submit" value="update" /></div>
</form>
</p>
<?php
if (isset($_POST['go'])) {
if (!empty($_POST['login']) && !empty($_POST['password'])) {
$user = $store->login($_POST['login'], sha1($_POST['password'] . $_POST['login'] . SALT));
if ($user != array()) {
$myconfig_file = '../inc/poche/myconfig.inc.php';
# just change version number in config file
if (!is_writable('../inc/poche/myconfig.inc.php')) {
die('You don\'t have write access to open ./inc/poche/myconfig.inc.php.');
}
if (file_exists($myconfig_file))
{
$content = str_replace('1.0-beta3', '1.0-beta4', file_get_contents($myconfig_file));
file_put_contents($myconfig_file, $content);
}
?>
<p><span style="color: green;">your poche is up to date!</span></p>
<p><span style="color: red;">don't forget to delete ./install/ folder after the update.</span></p>
<p><a href="../">go back to your poche</a></p>
<?php
}
}
}
?>
</body>
</html>

1
themes

@ -1 +0,0 @@
Subproject commit 689dcedf8d6c7cf5e8424654fef4fd9687288dc1

31
themes/README.md Normal file
View File

@ -0,0 +1,31 @@
# poche-themes
themes created by poche users
## list of themes
* dark ([preview](https://raw.github.com/inthepoche/poche-themes/master/dark/screenshot.jpg))
* dmagenta ([preview](https://raw.github.com/inthepoche/poche-themes/master/dmagenta/screenshot.jpg))
* solarized ([preview](https://raw.github.com/inthepoche/poche-themes/master/solarized/screenshot.jpg))
* solarized-dark ([preview](https://raw.github.com/inthepoche/poche-themes/master/solarized-dark/screenshot.jpg))
## installation
In your poche folder:
```
git submodule init
git submodule update
```
Then, in your config screen, select your favorite theme.
That's all !
## create a theme
Just have a look to this short documentation : http://inthepoche.com/doc/doku.php?id=designers:creating_theme
## send a theme
Send your theme by email at support@inthepoche.com.

3
themes/dark/README.md Normal file
View File

@ -0,0 +1,3 @@
# dark theme
theme created by Nicolas Lœuillet aka nico_somb

View File

@ -0,0 +1,74 @@
body {
color: #d4d4d4;
background-color: #262627;
}
a,
a:hover,
a:visited {
color: #d4d4d4;
}
a.back span {
background-image: url('../img/dark/left.png');
}
a.top span {
background-image: url('../img/dark/top.png');
}
a.fav span,
a.fav-off span:hover {
background-image: url('../img/dark/star-on.png');
}
a.fav span:hover,
a.fav-off span {
background-image: url('../img/dark/star-off.png');
}
a.archive span,
a.archive-off span:hover {
background-image: url('../img/dark/checkmark-on.png');
}
a.archive span:hover,
a.archive-off span {
background-image: url('../img/dark/checkmark-off.png');
}
a.twitter span {
background-image: url('../img/dark/twitter.png');
}
a.shaarli span {
background-image: url('../img/dark/shaarli.png');
}
a.flattr span {
background-image: url('../img/dark/flattr.png');
}
a.email span {
background-image: url('../img/dark/envelop.png');
}
a.delete span {
background-image: url('../img/dark/remove.png');
}
a.link span {
background-image: url('../img/dark/link.png');
}
a.bad-display span {
background-image: url('../img/dark/bad-display.png');
}
.pagination a {
color: #aaa;
}
#article_toolbar {
background: #262627;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

BIN
themes/dark/img/dark/flattr.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
themes/dark/img/dark/link.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

BIN
themes/dark/screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 KiB

View File

@ -0,0 +1,3 @@
<script type="text/javascript">
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>"
</script>

View File

@ -0,0 +1,4 @@
<footer class="w600p center mt3 mb3 smaller txtright">
<p>{% trans "powered by" %} <a href="http://inthepoche.com">poche</a></p>
{% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE_VERSION')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %}
</footer>

11
themes/default/_head.twig Normal file
View File

@ -0,0 +1,11 @@
<link rel="shortcut icon" type="image/x-icon" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/favicon.ico" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/apple-touch-icon-144x144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/apple-touch-icon-72x72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/apple-touch-icon-precomposed.png">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/knacss.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/style.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ theme }}/css/style-{{ theme }}.css" media="all" title="{{ theme }} theme">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/messages.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/print.css" media="print">
<link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<script src="//codeorigin.jquery.com/jquery-2.0.3.min.js"></script>

View File

@ -0,0 +1,7 @@
<ul id="links">
<li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li>
<li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
<li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
<li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
<li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
</ul>

View File

@ -0,0 +1 @@
{{ messages | raw }}

7
themes/default/_top.twig Normal file
View File

@ -0,0 +1,7 @@
<header class="w600p center mbm">
<h1>
{% if view == 'home' %}{% block logo %}<img src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/logo.png" alt="logo poche" />{% endblock %}
{% else %}<a href="./" title="{% trans "back to home" %}" >{{ block('logo') }}</a>
{% endif %}
</h1>
</header>

View File

@ -0,0 +1,80 @@
{% extends "layout.twig" %}
{% block title %}{% trans "config" %}{% endblock %}
{% block menu %}
{% include '_menu.twig' %}
{% endblock %}
{% block content %}
<h2>{% trans "Poching a link" %}</h2>
<p>{% trans "You can poche a link by several methods:" %} (<a href="http://inthepoche.com/doc" title="{% trans "read the documentation" %}">?</a>)</p>
<ul>
<li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">{% trans "download the extension" %}</a></li>
<li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">{% trans "download the extension" %}</a></li>
<li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">{% trans "download the application" %}</a></li>
<li>
<form method="get" action="index.php">
<label class="addurl" for="plainurl">{% trans "by filling this field" %}:</label>
<input required placeholder="Ex:mywebsite.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
<input type="submit" value="{% trans "poche it!" %}" />
</form>
</li>
<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>
</ul>
<h2>{% trans "Updating poche" %}</h2>
<ul>
<li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li>
<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>
{% 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 %}
</ul>
<h2>{% trans "Change your theme" %}</h2>
<form method="post" action="?updatetheme" name="changethemeform">
<fieldset class="w500p">
<div class="row">
<label class="col w150p" for="theme">{% trans "Theme:" %}</label>
<select class="col" id="theme" name="theme">
{% for theme in themes %}
<option value="{{ theme.name }}" {{ theme.current ? 'selected' : '' }}>{{ theme.name }}</option>
{% endfor %}
</select>
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">{% trans "Update" %}</button>
</div>
</fieldset>
<input type="hidden" name="returnurl" value="{{ referer }}">
<input type="hidden" name="token" value="{{ token }}">
</form>
<h2>{% trans "Change your password" %}</h2>
<form method="post" action="?config" name="loginform">
<fieldset class="w500p">
<div class="row">
<label class="col w150p" for="password">{% trans "New password:" %}</label>
<input class="col" type="password" id="password" name="password" placeholder="{% trans "Password" %}" tabindex="2">
</div>
<div class="row">
<label class="col w150p" for="password_repeat">{% trans "Repeat your new password:" %}</label>
<input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="{% trans "Password" %}" tabindex="3">
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">{% trans "Update" %}</button>
</div>
</fieldset>
<input type="hidden" name="returnurl" value="{{ referer }}">
<input type="hidden" name="token" value="{{ token }}">
</form>
<h2>{% trans "Import" %}</h2>
<p>{% trans "Please execute the import script locally, it can take a very long time." %}</p>
<p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/doc">inthepoche.com</a></p>
<ul>
<li><a href="./?import&amp;from=pocket">{% trans "import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li>
<li><a href="./?import&amp;from=readability">{% trans "import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li>
<li><a href="./?import&amp;from=instapaper">{% trans "import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li>
</ul>
<h2>{% trans "Export your poche datas" %}</h2>
<p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p>
{% endblock %}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,75 @@
.messages {
display: block;
clear: both;
width: 400px;
margin: 10px auto 10px;
padding: 10px 0;
-moz-border-radius: 4px;
border-radius: 4px;
}
.messages a.closeMessage {
display: none;
float: right;
width: 16px;
height: 16px;
margin: -14px -8px 0 0;
background: url(../img/messages/close.png) no-repeat;
}
/*.messages:hover a.closeMessage { visibility:visible; }*/
.messages p {
margin: 3px 0 3px 10px !important;
padding: 0 10px 0 23px !important;
font-size: 14px;
line-height: 16px;
}
.messages.error {
border: 1px solid #c42608;
color: #c00 !important;
background: #fff0ef;
}
.messages.error p {
color: #c00 !important;
background: url(../img/messages/cross.png) no-repeat 0 50%;
}
.messages.success {
border: 1px solid #6dc70c;
background: #e0fbcc;
}
.messages.success p {
color: #2b6301 !important;
background: url(../img/messages/tick.png) no-repeat 0 50%;
}
.messages.warning {
border: 1px solid #ebcd41;
color: #000;
background: #fffcd3;
}
.messages.warning p {
color: #5f4e01;
background: url(../img/messages/warning.png) no-repeat 0 50%;
}
.messages.information,
.messages.info {
border: 1px solid #82aee7;
background: #dfebfb;
}
.messages.information p,
.messages.info p {
color: #064393;
background: url(../img/messages/help.png) no-repeat 0 50%;
}
.messages.information a {
text-decoration: underline;
}

View File

@ -0,0 +1,48 @@
/* ### Layout ### */
body {
font-family: Serif;
background-color: #fff;
}
@page {
margin: 1cm;
}
img {
max-width: 100% !important;
}
/* ### Content ### */
/* Hide useless blocks */
body > header,
#links,
#sort,
body > footer,
.top_link,
div.tools,
header div,
.messages,
.entrie + .results {
display: none !important;
}
article {
border: none !important;
}
/* Add URL after links */
.vieworiginal a:after {
content: " (" attr(href) ")";
}
/* Add explanation after abbr */
abbr[title]:after {
content: " (" attr(title) ")";
}
/* Change border on current pager item */
.pagination span.current {
border-style: dashed;
}

View File

@ -0,0 +1,55 @@
a.back span {
background-image: url('../img/default/left.png');
}
a.top span {
background-image: url('../img/default/top.png');
}
a.fav span,
a.fav-off span:hover {
background-image: url('../img/default/star-on.png');
}
a.fav span:hover,
a.fav-off span {
background-image: url('../img/default/star-off.png');
}
a.archive span,
a.archive-off span:hover {
background-image: url('../img/default/checkmark-on.png');
}
a.archive span:hover,
a.archive-off span {
background-image: url('../img/default/checkmark-off.png');
}
a.twitter span {
background-image: url('../img/default/twitter.png');
}
a.shaarli span {
background-image: url('../img/default/shaarli.png');
}
a.flattr span {
background-image: url('../img/default/flattr.png');
}
a.email span {
background-image: url('../img/default/envelop.png');
}
a.delete span {
background-image: url('../img/default/remove.png');
}
a.link span {
background-image: url('../img/default/link.png');
}
a.bad-display span {
background-image: url('../img/default/bad-display.png');
}

View File

@ -0,0 +1,321 @@
body {
margin: 10px;
font-family: 'Roboto',Verdana,Geneva,sans-serif;
font-size: 16px;
color: #000;
}
header {
text-align: center;
}
header h1 {
font-size: 1.3em;
}
a,
a:hover,
a:visited {
color: #000;
}
.bouton {
border: none;
border-radius: 2px;
color: #fff;
background-color: #000;
}
.bouton:hover {
color: #f1f1f1;
background-color: #222;
cursor: pointer;
}
#main {
margin: 0 auto;
}
#main #links {
padding: 0;
text-align: center;
font-size: 0.9em;
list-style-type: none;
}
#main #links li {
display: inline;
}
#main #links li .current {
-webkit-border-radius: 2px;
border-radius: 2px;
color: #fff;
background-color: #000;
}
#main #sort {
padding: 0;
text-align: center;
list-style-type: none;
opacity: 0.5;
}
#main #sort li {
display: inline;
font-size: 0.9em;
}
#main #sort li + li {
margin-left: 10px;
}
#main #sort a {
padding: 2px 2px 0;
vertical-align: middle;
}
#main #sort img {
vertical-align: baseline;
}
#main #sort img:hover {
cursor: pointer;
}
#links a {
padding: 5px 10px;
text-decoration: none;
}
#links a:hover {
-webkit-border-radius: 2px;
border-radius: 2px;
color: #f1f1f1;
background-color: #040707;
}
/*** ***/
/*** LINKS DISPLAY ***/
#main .tool {
text-decoration: none;
cursor: pointer;
}
#main #content {
margin-top: 20px;
}
#main #content h2 {
text-decoration: none;
font-size: 1.3em;
}
#main #content .entrie {
margin-top: 15px;
padding-bottom: 15px;
border-bottom: 1px dashed #222;
overflow: hidden;
}
/* First entry */
#main #content .results + .entrie {
clear: both;
margin-top: 0;
}
#main .entrie .tools {
float: right;
text-align: right;
list-style-type: none;
opacity: 0.5;
}
#main .entrie .tools .tool span {
display: inline-block;
width: 16px;
height: 16px;
/* Hide textual content */
overflow: hidden;
text-align: left;
text-indent: -9999px;
}
/*** ***/
/*** ARTICLE PAGE ***/
#article {
margin: 0 auto;
}
#article header {
border-bottom: 1px solid #222;
}
#article header {
text-align: left;
}
#article header h1 small {
float: right;
font-size: 0.6em;
}
#article header a {
text-decoration: none;
}
.backhome {
display: inline;
}
.results {
padding: 15px 0;
overflow: hidden;
}
.nb-results {
float: left;
font-size: 0.9em;
line-height: 24px;
vertical-align: middle;
}
#article_toolbar {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 50px;
padding-top: 17px;
text-align: center;
color: #fff;
opacity: 0.8;
background: #fff;
}
#article_toolbar li {
display: inline;
padding-right: 30px;
}
#article_toolbar .tool {
padding: 0 2px;
}
#article_toolbar .tool span {
display: inline-block;
width: 16px;
height: 16px;
/* Hide textual content */
overflow: hidden;
text-align: left;
text-indent: -9999px;
}
/*** ***/
/*** PAGINATION ***/
.pagination {
float: right;
text-align: right;
}
.pagination a {
height: 25px;
margin: 2px;
padding: 4px 8px;
border: 1px solid #d5d5d5;
text-decoration: none;
font-size: 11px;
font-weight: bold;
color: #333;
}
.pagination a:hover,
.pagination a:active {
background-color: #efefef;
}
.pagination .current {
height: 25px;
margin: 2px;
padding: 4px 8px;
border: 1px solid #d5d5d5;
text-decoration: none;
font-size: 11px;
font-weight: bold;
color: #000;
background-color: #ccc;
}
.pagination .disabled {
display: none;
}
#bookmarklet {
padding: 5px;
border: 1px dashed #808080;
background: #fff;
cursor: move;
}
.top_link {
display: none;
z-index: 2000;
position: fixed;
right: 15px;
bottom: 15px;
padding: 20px;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
border-radius: 40px;
opacity: 0.9;
background: #ccc;
}
footer {
clear: both;
}
.reading-time {
font-size: 0.8em;
}
#inputform {
display: none;
margin-top: 5px;
margin-right: auto;
margin-left: auto;
padding-bottom: 5px;
max-width: 300px;
border-radius: 3px;
text-align: center;
color: #fff;
opacity: 0.8;
background-color: rgba(0,0,0,0.9);
}
a.back span,
a.top span,
a.fav span,
a.fav span:hover,
a.fav-off span,
a.fav-off span:hover,
a.archive span,
a.archive span:hover,
a.archive-off span,
a.archive-off span:hover,
a.twitter span,
a.shaarli span,
a.flattr span,
a.email span,
a.delete span,
a.link span,
a.bad-display span,
a.reading-time span {
background-repeat: no-repeat;
}

View File

@ -0,0 +1,6 @@
{% extends "layout.twig" %}
{% block title %}{% trans "plop" %}{% endblock %}
{% block content %}
{{ msg|raw }}
<p>Don't forget <a href="http://inthepoche.com/doc">the documentation</a>.</p>
{% endblock %}

View File

@ -0,0 +1 @@
{{ export }}

49
themes/default/home.twig Normal file
View File

@ -0,0 +1,49 @@
{% extends "layout.twig" %}
{% block title %}
{% if view == 'fav' %}
{% trans "favoris" %}
{% elseif view == 'archive' %}
{% trans "archive" %}
{% else %}
{% trans "unread" %}
{% endif %}
{% endblock %}
{% block menu %}
{% include '_menu.twig' %}
{% endblock %}
{% block precontent %}
{% if entries|length > 1 %}
<ul id="sort">
<li><a href="./?sort=ia&amp;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&amp;view={{ view }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li>
<li><a href="./?sort=ta&amp;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&amp;view={{ view }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li>
</ul>
{% endif %}
{% endblock %}
{% block content %}
{% if entries is empty %}
<div class="messages warning"><p>{% trans "No link available here!" %}</p></div>
{% else %}
{% block pager %}
{% if nb_results > 1 %}
<div class="results">
<div class="nb-results">{{ nb_results }} {% trans "results" %}</div>
{{ page_links | raw }}
</div>
{% endif %}
{% endblock %}
{% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="entrie">
<h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
<ul class="tools">
<li><a title="{% trans "toggle mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li>
<li><a title="{% trans "toggle favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li>
<li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li>
<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>
<li><a target="_blank" title="{% trans "estimated reading time:" %} {{ entry.content| getReadingTime }} min" class="reading-time"><span>{{ entry.content| getReadingTime }} min</span></a></li>
</ul>
<p>{{ entry.content|striptags|slice(0, 300) }}...</p>
</div>
{% endfor %}
{% endif %}
{{ block('pager') }}
{% endblock %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

BIN
themes/default/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

View File

@ -0,0 +1,28 @@
{% extends "layout.twig" %}
{% block title %}{% trans "installation" %}{% endblock %}
{% block content %}
<form method="post" action="?install" name="loginform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans "install your poche" %}</h2>
<p>
{% trans "poche is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://inthepoche.com/doc'>read the documentation on poche website</a>." %}
</p>
<p class="row">
<label class="col w150p" for="login">{% trans "Login" %}</label>
<input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus />
</p>
<p class="row">
<label class="col w150p" for="password">{% trans "Password" %}</label>
<input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2">
</p>
<p class="row">
<label class="col w150p" for="password_repeat">{% trans "Repeat your password" %}</label>
<input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="Password" tabindex="3">
</p>
<p class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">{% trans "Install" %}</button>
</p>
</fieldset>
<input type="hidden" name="token" value="{{ token }}">
</form>
{% endblock %}

View File

@ -0,0 +1,25 @@
function supportsLocalStorage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
}
function savePercent(id, percent) {
if (!supportsLocalStorage()) { return false; }
localStorage["poche.article." + id + ".percent"] = percent;
return true;
}
function retrievePercent(id) {
if (!supportsLocalStorage()) { return false; }
var bheight = $(document).height();
var percent = localStorage["poche.article." + id + ".percent"];
var scroll = bheight * percent;
$('html,body').animate({scrollTop: scroll}, 'fast');
return true;
}

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="{{ lang }}"><![endif]-->
<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="{{ lang }}"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 ie678" lang="{{ lang }}"><![endif]-->
<!--[if gt IE 8]><html class="no-js" lang="{{ lang }}"><![endif]-->
<html lang="{{ lang }}">
<head>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=10">
<![endif]-->
<title>{% block title %}{% endblock %} - poche</title>
{% include '_head.twig' %}
{% include '_bookmarklet.twig' %}
</head>
<body>
{% include '_top.twig' %}
<div id="main">
{% block menu %}{% endblock %}
{% block precontent %}{% endblock %}
{% block messages %}
{% include '_messages.twig' %}
{% endblock %}
<div id="content" class="w600p center">
{% block content %}{% endblock %}
</div>
</div>
{% include '_footer.twig' %}
</body>
</html>

32
themes/default/login.twig Normal file
View File

@ -0,0 +1,32 @@
{% extends "layout.twig" %}
{% block title %}{% trans "login to your poche" %}{% endblock %}
{% block content %}
<form method="post" action="?login" name="loginform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans "login to your poche" %}</h2>
{% if constant('MODE_DEMO') == 1 %}<p>{% trans "you are in demo mode, some features may be disabled." %}</p>{% endif %}
<div class="row">
<label class="col w150p" for="login">{% trans "Login" %}</label>
<input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus {% if constant('MODE_DEMO') == 1 %}value="poche"{% endif %} />
</div>
<div class="row">
<label class="col w150p" for="password">{% trans "Password" %}</label>
<input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2" {% if constant('MODE_DEMO') == 1 %}value="poche"{% endif %} />
</div>
<div class="row">
<label class="col w150p" for="longlastingsession">{% trans "Stay signed in" %}</label>
<div class="col">
<input type="checkbox" id="longlastingsession" name="longlastingsession" tabindex="3">
<small class="inbl">{% trans "(Do not check on public computers)" %}</small>
</div>
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">{% trans "Login" %}</button>
</div>
</fieldset>
<input type="hidden" name="returnurl" value="{{ referer }}">
<input type="hidden" name="token" value="{{ token }}">
</form>
{% endblock %}

51
themes/default/view.twig Normal file
View File

@ -0,0 +1,51 @@
{% extends "layout.twig" %}
{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
{% block content %}
<div id="article_toolbar">
<ul>
<li><a href="./" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li>
<li><a href="#top" title="{% trans "back to top" %}" class="tool top"><span>{% trans "back to top" %}</span></a></li>
<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>
<li><a title="{% trans "toggle mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li>
<li><a title="{% trans "toggle favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li>
<li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li>
{% 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 %}
{% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %}
{% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
{% 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 %}
<li><a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&amp;body={{ entry.url|url_encode }}" title="{% trans "this article appears wrong?" %}" class="tool bad-display"><span>{% trans "this article appears wrong?" %}</span></a></li>
</ul>
</div>
<div id="article">
<header class="mbm">
<h1>{{ entry.title|raw }}</h1>
</header>
<article>
{{ content | raw }}
</article>
</div>
<script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/restoreScroll.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function(e){
var scrollTop = $(window).scrollTop();
var docHeight = $(document).height();
var scrollPercent = (scrollTop) / (docHeight);
var scrollPercentRounded = Math.round(scrollPercent*100)/100;
savePercent({{ entry.id|e }}, scrollPercentRounded);
});
retrievePercent({{ entry.id|e }});
$(window).resize(function(){
retrievePercent({{ entry.id|e }});
});
// Hide useless "back to top" link when there is no scrollbar
if ($("body").height() <= $(window).height()) {
$('#article_toolbar .tool.top').parent().hide();
}
});
</script>
{% endblock %}

View File

@ -0,0 +1,3 @@
# dmagenta (dark magenta) theme
theme created by Nicolas Lœuillet aka nico_somb

View File

@ -0,0 +1,78 @@
body {
color: #d4d4d4;
background-color: #372d37;
}
a,
a:hover,
a:visited {
color: #8d748d;
}
a.back span {
background-image: url('../img/dmagenta/left.png');
}
a.top span {
background-image: url('../img/dmagenta/top.png');
}
a.fav span,
a.fav-off span:hover {
background-image: url('../img/dmagenta/star-on.png');
}
a.fav span:hover,
a.fav-off span {
background-image: url('../img/dmagenta/star-off.png');
}
a.archive span,
a.archive-off span:hover {
background-image: url('../img/dmagenta/checkmark-on.png');
}
a.archive span:hover,
a.archive-off span {
background-image: url('../img/dmagenta/checkmark-off.png');
}
a.twitter span {
background-image: url('../img/dmagenta/twitter.png');
}
a.flattr span {
background-image: url('../img/dmagenta/flattr.png');
}
a.shaarli span {
background-image: url('../img/dmagenta/shaarli.png');
}
a.email span {
background-image: url('../img/dmagenta/envelop.png');
}
a.delete span {
background-image: url('../img/dmagenta/remove.png');
}
a.link span {
background-image: url('../img/dmagenta/link.png');
}
a.bad-display span {
background-image: url('../img/dmagenta/bad-display.png');
}
.pagination a {
color: #aaa;
}
#main #links li .current {
background-color: #2d372d;
}
#article_toolbar {
background: #372d37;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

Some files were not shown because too many files have changed in this diff Show More