Skip to content

Commit

Permalink
more bootstrap theme clean up, added sidebars from base theme, added …
Browse files Browse the repository at this point in the history
…bootstrap style markup for header, footer, and 1 column layout
  • Loading branch information
arroyo committed Mar 2, 2014
1 parent e63e2cc commit fc8101b
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 43 deletions.
6 changes: 3 additions & 3 deletions www/app/config/contexts/default.json
Expand Up @@ -12,9 +12,9 @@
},
"theme":{
"name":"erdiko",
"namespace":"/public/themes/erdiko",
"path":"/public/themes/erdiko",
"config":"/public/themes/erdiko/theme.json"
"namespace":"/themes/bootstrap",
"path":"/public/themes/bootstrap",
"config":"/public/themes/bootstrap/theme.json"
},
"layout":{
"layout":{
Expand Down
10 changes: 7 additions & 3 deletions www/public/themes/bootstrap/templates/layouts/1column.php
@@ -1,3 +1,7 @@
<div class="unit size1of1">
<?php echo $data->getMainContent(); ?>
</div>
<div class="container">
<div class="row">
<div class="col-md-9" role="main">
<?php echo $data->getMainContent(); ?>
</div>
</div>
</div>
32 changes: 16 additions & 16 deletions www/public/themes/bootstrap/templates/page/footer.php
@@ -1,21 +1,21 @@
<?php $menu = $data['menu']['footer']; ?>

<footer id="footer">
<div class="footer">
<ul class="unstyled">
<?php $i = 0 ?>
<?php
if($menu){
foreach ($menu as $item): ?>
<li>
<a href="<?php echo $item["href"]; ?>"><?php echo $item["title"]; ?></a>
</li>
<?php $i++; ?>
<div class="container">

<ul class="nav nav-justified">
<?php
endforeach;
}
?>
$menu = $data['menu']['footer'];
if($menu):
foreach ($menu as $item): ?>
<li><a href="<?php echo $item["href"]; ?>"><?php echo $item["title"]; ?></a></li>
<?php
endforeach;
endif; ?>
</ul>
<p class="copyright clearfix">Copyright &copy; <?php echo date('Y', time());?> All rights reserved. <a href="/"><?php echo $data['site']['full_name']; ?></a></p>
<div class="copyright clearfix">
<p>Copyright &copy; <?php echo date('Y', time());?> All rights reserved. <a href="/"><?php echo $data['site']['full_name']; ?></a><br />
Code licensed under <a href="https://github.com/arroyo/Erdiko/blob/master/LICENSE" target="_blank">MIT</a><br />
Powered by <a href="https://github.com/arroyo/Erdiko" target="_blank">Edriko</a></p>
</div>

</div>
</footer>
42 changes: 23 additions & 19 deletions www/public/themes/bootstrap/templates/page/header.php
@@ -1,23 +1,27 @@
<?php $menu = $data['menu']['main']; ?>
<header id="header">
<div class="header">
<hgroup>
<h1 class="logo"><a href="/"><?php echo $data['site']['title']; ?></a></h1>
</hgroup>
<nav>
<ul id="main-nav" class="clearfix unstyled">
<?php $i = 0 ?>
<header class="navbar navbar-static-top" id="top" role="banner">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand"><?php echo $data['site']['title']; ?></a>
</div>

<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<ul class="nav navbar-nav">
<?php
if($menu){
foreach ($menu as $item): ?>
<li>
<a href="<?php echo $item["href"]; ?>"><?php echo $item["title"]; ?></a>
</li>
<?php $i++; ?>
<?php
endforeach;
}
?>
$menu = $data['menu']['main'];
if($menu):
foreach ($menu as $item): ?>
<li>
<a href="<?php echo $item["href"]; ?>"><?php echo $item["title"]; ?></a>
</li>
<?php
endforeach;
endif; ?>
</ul>
</nav>
</div>
Expand Down
8 changes: 7 additions & 1 deletion www/public/themes/bootstrap/theme.json
Expand Up @@ -59,7 +59,13 @@
"views": {
"default": {
"file": "/themes/bootstrap/views/default.php",
"path": "/themes/bootstrap/views/default.php"
"path": "/themes/bootstrap/views/"
}
},
"sidebars": {
"default": {
"file": "/themes/bootstrap/views/sidebars/default.php",
"path": "/themes/bootstrap/views/sidebars/"
}
}
}
2 changes: 1 addition & 1 deletion www/public/themes/bootstrap/views/pages/default.php
@@ -1,6 +1,6 @@
<?php
if(isset($data['title']))
echo "<h1>".$data['title']."</h1>\n";
echo '<h1 class="page-header">'.$data['title']."</h1>\n";

// Determine classes (@todo move to a helper class)
$classPre = "content-body";
Expand Down
1 change: 1 addition & 0 deletions www/public/themes/bootstrap/views/sidebars/default.php
@@ -0,0 +1 @@
<?php echo $data; ?>

0 comments on commit fc8101b

Please sign in to comment.