Merge a5e21c704c
into b2fa0a4abe
This commit is contained in:
commit
70fbd9bc16
4 changed files with 68 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
Title: Welcome
|
||||
Description: This description will go in the meta description tag
|
||||
Template: content-sidebar
|
||||
*/
|
||||
|
||||
## Welcome to Pico
|
||||
|
|
10
lib/pico.php
10
lib/pico.php
|
@ -102,7 +102,12 @@ class Pico {
|
|||
'is_front_page' => $url ? false : true,
|
||||
);
|
||||
$this->run_hooks('before_render', array(&$twig_vars, &$twig));
|
||||
$output = $twig->render('index.html', $twig_vars);
|
||||
$template = (isset($meta['template']) && strlen($meta['template']) > 0) ? $meta['template'] : 'index';
|
||||
if (!file_exists(THEMES_DIR . $settings['theme'] . "/{$template}.html")) {
|
||||
// fallback to index.html if template not exists...
|
||||
$template = 'index';
|
||||
}
|
||||
$output = $twig->render("{$template}.html", $twig_vars);
|
||||
$this->run_hooks('after_render', array(&$output));
|
||||
echo $output;
|
||||
}
|
||||
|
@ -156,7 +161,8 @@ class Pico {
|
|||
'description' => 'Description',
|
||||
'author' => 'Author',
|
||||
'date' => 'Date',
|
||||
'robots' => 'Robots'
|
||||
'robots' => 'Robots',
|
||||
'template' => 'Template'
|
||||
);
|
||||
|
||||
// Add support for custom headers by hooking into the headers array
|
||||
|
|
48
themes/default/content-sidebar.html
Normal file
48
themes/default/content-sidebar.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
|
||||
{% if meta.description %}
|
||||
<meta name="description" content="{{ meta.description }}">
|
||||
{% endif %}{% if meta.robots %}
|
||||
<meta name="robots" content="{{ meta.robots }}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ theme_url }}/style.css" type="text/css" />
|
||||
|
||||
<script src="{{ theme_url }}/scripts/modernizr-2.6.1.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header id="header">
|
||||
<div class="inner clearfix">
|
||||
<h1><a href="{{ base_url }}">{{ site_title }}</a></h1>
|
||||
<ul class="nav">
|
||||
{% for page in pages %}
|
||||
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section id="content">
|
||||
<div class="inner">
|
||||
<div class="sidebar">
|
||||
this is the sidebar...
|
||||
</div>
|
||||
{{ content }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer id="footer">
|
||||
<div class="inner">
|
||||
<a href="http://pico.dev7studios.com">Pico</a> was made by <a href="http://gilbert.pellegrom.me">Gilbert Pellegrom</a>
|
||||
from <a href="http://dev7studios.com">Dev7studios</a>.
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -201,8 +201,17 @@ blockquote {
|
|||
/* Structure Styles
|
||||
/*---------------------------------------------*/
|
||||
.inner {
|
||||
width: 850px;
|
||||
margin: 0 auto;
|
||||
width: 850px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.inner .sidebar {
|
||||
width: 250px;
|
||||
margin: 0 20px 20px 0;
|
||||
padding: 20px;
|
||||
min-height: 300px;
|
||||
background: #dddddd;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#header {
|
||||
|
|
Loading…
Add table
Reference in a new issue