mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
add Twig & refactor poche
This commit is contained in:
parent
f6c9baab3e
commit
a4565e88ed
218 changed files with 16372 additions and 1555 deletions
|
@ -3,6 +3,7 @@
|
|||
<h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1>
|
||||
</header>
|
||||
<div id="main">
|
||||
{% block menu %}
|
||||
<ul id="links">
|
||||
<li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li>
|
||||
<li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li>
|
||||
|
@ -10,10 +11,11 @@
|
|||
<li><a href="?view=config" {if="$view == 'config'"}class="current"{/if}>config</a></li>
|
||||
<li><a href="?logout" title="Logout">logout</a></li>
|
||||
</ul>
|
||||
{if condition="isset($entries)"}
|
||||
{% endblock %}
|
||||
{% block precontent %}
|
||||
<ul id="sort">
|
||||
<li><img src="img/up.png" onclick="sort_links('{$view}', 'ia');" title="by date asc" /> by date <img src="img/down.png" onclick="sort_links('{$view}', 'id');" title="by date desc" /></li>
|
||||
<li><img src="img/up.png" onclick="sort_links('{$view}', 'ta');" title="by title asc" /> by title <img src="img/down.png" onclick="sort_links('{$view}', 'td');" title="by title desc" /></li>
|
||||
</ul>
|
||||
{/if}
|
||||
{% endblock %}
|
||||
{include="messages"}
|
28
tpl/install.twig
Normal file
28
tpl/install.twig
Normal file
|
@ -0,0 +1,28 @@
|
|||
{% extends "layout.twig" %}
|
||||
{% block title %}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/?pages/Documentation'>read the documentation on poche website</a>." %}
|
||||
</p>
|
||||
<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 />
|
||||
</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">
|
||||
</div>
|
||||
<div 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">
|
||||
</div>
|
||||
<div class="row mts txtcenter">
|
||||
<button class="bouton" type="submit" tabindex="4">{% trans "Install" %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
</form>
|
||||
{% endblock %}
|
38
tpl/js.html
38
tpl/js.html
|
@ -1,22 +1,22 @@
|
|||
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/poche.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/poche.js"></script>
|
||||
|
||||
{if="$load_all_js == '1'"}
|
||||
<script type="text/javascript" src="js/jquery.masonry.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$( window ).load( function()
|
||||
{
|
||||
var columns = 3,
|
||||
setColumns = function() { columns = $( window ).width() > 640 ? 3 : $( window ).width() > 320 ? 2 : 1; };
|
||||
|
||||
setColumns();
|
||||
$( window ).resize( setColumns );
|
||||
|
||||
$( '#content' ).masonry(
|
||||
{if="$load_all_js == '1'"}
|
||||
<script type="text/javascript" src="js/jquery.masonry.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$( window ).load( function()
|
||||
{
|
||||
itemSelector: '.entrie',
|
||||
columnWidth: function( containerWidth ) { return containerWidth / columns; }
|
||||
var columns = 3,
|
||||
setColumns = function() { columns = $( window ).width() > 640 ? 3 : $( window ).width() > 320 ? 2 : 1; };
|
||||
|
||||
setColumns();
|
||||
$( window ).resize( setColumns );
|
||||
|
||||
$( '#content' ).masonry(
|
||||
{
|
||||
itemSelector: '.entrie',
|
||||
columnWidth: function( containerWidth ) { return containerWidth / columns; }
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
</script>
|
||||
{/if}
|
58
tpl/layout.twig
Normal file
58
tpl/layout.twig
Normal file
|
@ -0,0 +1,58 @@
|
|||
<!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>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10">
|
||||
<title>{% block title %}{% endblock %} - poche</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="./img/favicon.ico" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./img/apple-touch-icon-144x144-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./img/apple-touch-icon-72x72-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="./img/apple-touch-icon-precomposed.png">
|
||||
<link rel="stylesheet" href="./css/knacss.css" media="all">
|
||||
<link rel="stylesheet" href="./css/style.css" media="all">
|
||||
<!-- Light Theme -->
|
||||
<link rel="stylesheet" href="./css/style-light.css" media="all" title="light-style">
|
||||
<!-- Dark Theme -->
|
||||
<link rel="alternate stylesheet" href="./css/style-dark.css" media="all" title="dark-style">
|
||||
<script>
|
||||
top["bookmarklet-url@inthepoche.com"] = ''
|
||||
+'<!DOCTYPE html>'
|
||||
+'<html>'
|
||||
+'<head>'
|
||||
+'<title>poche it !</title>'
|
||||
+'<link rel="icon" href="{$poche_url}img/favicon.ico" />'
|
||||
+'</head>'
|
||||
+'<body>'
|
||||
+'<script>'
|
||||
+'window.onload=function(){'
|
||||
+'window.setTimeout(function(){'
|
||||
+'history.back();'
|
||||
+'},250);'
|
||||
+'};'
|
||||
+'</scr'+'ipt>'
|
||||
+'</body>'
|
||||
+'</html>'
|
||||
;
|
||||
</script>
|
||||
</head>
|
||||
<body class="light-style">
|
||||
<header>
|
||||
<h1><a href="/"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1>
|
||||
</header>
|
||||
<div id="main">
|
||||
{% block menu %}{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
{% block js %}{% endblock %}
|
||||
</div>
|
||||
<footer class="mr2 mt3 smaller">
|
||||
<p>powered by <a href="http://inthepoche.com">poche</a></p>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
31
tpl/login.twig
Normal file
31
tpl/login.twig
Normal file
|
@ -0,0 +1,31 @@
|
|||
{% extends "layout.twig" %}
|
||||
{% block title %}Login{% 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 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 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 demo == 1 %}value="poche"{% endif %} />
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col w150p">{% trans "Stay signed in" %}</label>
|
||||
<div class="col">
|
||||
<input type="checkbox" name="longlastingsession" tabindex="3">
|
||||
<small class="inbl">(Do not check on public computers)</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mts txtcenter">
|
||||
<button class="bouton" type="submit" tabindex="4">{% trans "Sign in" %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="returnurl" value="{{ referer }}">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue