1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-15 13:45:04 -05:00

Merge pull request #331 from nicosomb/v2-silex

[add] layout
This commit is contained in:
Vincent Jousse 2013-11-26 05:09:54 -08:00
commit 103b6a790e
10 changed files with 1198 additions and 1 deletions

View File

@ -8,6 +8,10 @@ $app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/views',
));
$app->before(function () use ($app) {
$app['twig']->addGlobal('layout', $app['twig']->loadTemplate('layout.twig'));
});
$app->register(new ConsoleServiceProvider(), [
'console.name' => 'Poche console',
'console.version' => '0.1',

View File

@ -9,5 +9,4 @@ $front->get('/', function () use ($app) {
return $app['twig']->render('index.twig', array('entry' => $entry));
});
return $front;

3
app/views/_footer.twig Normal file
View File

@ -0,0 +1,3 @@
<footer class="w600p center mt3 mb3 smaller txtright">
<p>powered by <a href="http://inthepoche.com">poche</a></p>
</footer>

5
app/views/_top.twig Normal file
View File

@ -0,0 +1,5 @@
<header class="w600p center mbm">
<h1>
<a href="./" title="back to home" ><img src="assets/img/logo.png" alt="poche logo" /></a>
</h1>
</header>

View File

@ -1,2 +1,6 @@
{% extends layout %}
{% block content %}
Poche v2<br/>
{{ entry.id }} - {{ entry.title }}
{% endblock %}

26
app/views/layout.twig Normal file
View File

@ -0,0 +1,26 @@
<!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 name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=10">
<![endif]-->
<title>poche</title>
<link rel="stylesheet" href="assets/css/knacss.css" media="all">
<link rel="stylesheet" href="assets/css/style.css" media="all">
</head>
<body>
{% include '_top.twig' %}
<div id="main">
<div id="content" class="w600p center">
{% block content %}{% endblock %}
</div>
</div>
{% include '_footer.twig' %}
</body>
</html>

1121
web/assets/css/knacss.css Normal file

File diff suppressed because it is too large Load Diff

35
web/assets/css/style.css Normal file
View File

@ -0,0 +1,35 @@
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto Regular'), local('Roboto-Regular'), url(../fonts/Roboto.woff) format('woff');
}
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;
}
footer {
clear: both;
}
.reading-time {
font-size: 0.8em;
}

Binary file not shown.

BIN
web/assets/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB