mirror of
https://github.com/moparisthebest/wallabag
synced 2024-12-18 05:32:23 -05:00
[add] layout
This commit is contained in:
parent
00ac1a58be
commit
eed94326c4
@ -8,6 +8,10 @@ $app->register(new Silex\Provider\TwigServiceProvider(), array(
|
|||||||
'twig.path' => __DIR__.'/views',
|
'twig.path' => __DIR__.'/views',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$app->before(function () use ($app) {
|
||||||
|
$app['twig']->addGlobal('layout', $app['twig']->loadTemplate('layout.twig'));
|
||||||
|
});
|
||||||
|
|
||||||
$app->register(new ConsoleServiceProvider(), [
|
$app->register(new ConsoleServiceProvider(), [
|
||||||
'console.name' => 'Poche console',
|
'console.name' => 'Poche console',
|
||||||
'console.version' => '0.1',
|
'console.version' => '0.1',
|
||||||
|
@ -9,5 +9,11 @@ $front->get('/', function () use ($app) {
|
|||||||
return $app['twig']->render('index.twig', array('entry' => $entry));
|
return $app['twig']->render('index.twig', array('entry' => $entry));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$front->get('/unread', function () use ($app) {
|
||||||
|
|
||||||
|
$entries = $app['entry_api']->getEntries();
|
||||||
|
|
||||||
|
return $app['twig']->render('index.twig', array('entry' => $entry));
|
||||||
|
});
|
||||||
|
|
||||||
return $front;
|
return $front;
|
||||||
|
3
app/views/_footer.twig
Normal file
3
app/views/_footer.twig
Normal 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
5
app/views/_top.twig
Normal 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>
|
@ -1,2 +1,6 @@
|
|||||||
|
{% extends layout %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
Poche v2<br/>
|
Poche v2<br/>
|
||||||
{{ entry.id }} - {{ entry.title }}
|
{{ entry.id }} - {{ entry.title }}
|
||||||
|
{% endblock %}
|
26
app/views/layout.twig
Normal file
26
app/views/layout.twig
Normal 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
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
35
web/assets/css/style.css
Normal 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;
|
||||||
|
}
|
BIN
web/assets/fonts/Roboto.woff
Normal file
BIN
web/assets/fonts/Roboto.woff
Normal file
Binary file not shown.
BIN
web/assets/img/logo.png
Normal file
BIN
web/assets/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user