diff options
author | Nick Daly <Nick.M.Daly@gmail.com> | 2013-04-23 17:49:22 -0500 |
---|---|---|
committer | Nick Daly <Nick.M.Daly@gmail.com> | 2013-04-23 17:49:22 -0500 |
commit | f55c7a48ea534e342e6efbd4c7edaf1b1e07f61b (patch) | |
tree | fec45d97e4e976ef7ba5dde83f538fcf19092bc0 /templates | |
parent | 157226f1b88bc090b677f9896aa62a0c734ebf14 (diff) |
Merged with James's upstream.
Hope I did it right. If I screwed up, withsqlite is borked.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.tmpl | 46 | ||||
-rw-r--r-- | templates/err.tmpl | 2 | ||||
-rw-r--r-- | templates/login_nav.tmpl | 31 | ||||
-rw-r--r-- | templates/two_col.tmpl | 19 |
4 files changed, 69 insertions, 29 deletions
diff --git a/templates/base.tmpl b/templates/base.tmpl index 5a37f53..08443b0 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -118,17 +118,8 @@ <span class="icon-bar"></span> </a> <a href="$basehref/" class="logo-top"><img src="$basehref/static/theme/img/freedombox-logo-32px.png" alt="FreedomBox" /></a><a class="brand" href="$basehref/">FreedomBox Dashboard</a> - <div class="nav-collapse"> - <script type="text/javascript"> - <!-- - main_menu(main_menu_items); - // --> - </script> - #if $username - <p class="navbar-text pull-right"><i class="icon-user icon-white nav-icon"></i>Logged in as <a href="$username">$username</a>. <a href="$basehref/auth/logout" title="Log out">Log out</a>.</p> - #else - <p class="navbar-text pull-right">Not logged in. <i class="icon-user icon-white nav-icon"></i><a href="$basehref/auth/login" title="Log in">Log in</a>.</p> - #end if + #block add_nav_and_login + #end block add_nav_and_login </div><!--/.nav-collapse --> </div> </div> @@ -136,18 +127,26 @@ <div class="container-fluid"> <div class="row-fluid"> + #if $nav or $sidebar_right or $sidebar_left <div class="span3"> + #if $nav <div class="well sidebar-nav"> - #block nav_block - $nav - #end block nav_block - #block sidebar_left_block - $sidebar_left - #end block sidebar_left_block </div><!--/.well --> - </div><!--/span--> + #end if + #if $sidebar_left + <div class="well sidebar-nav"> + left $sidebar_left + </div><!--/.well --> + #end if + #if $sidebar_right + <div class="well sidebar-nav"> + $sidebar_right + </div><!--/.well --> + #end if + </div> + #end if <div class="span9"> - <div class="hero-unit"> + <div class="hero-unit" class="pull-left"> <h2> #block title_block $title @@ -157,15 +156,6 @@ $main #end block main_block </div> - - <div class="row-fluid"> - <div class="span8 alert alert-info"> - #block sidebar_right_block - $sidebar_right - #end block sidebar_right_block - </div><!--/span--> - </div><!--/row--> - </div><!--/span--> </div><!--/row--> diff --git a/templates/err.tmpl b/templates/err.tmpl index 74dc12c..0210618 100644 --- a/templates/err.tmpl +++ b/templates/err.tmpl @@ -1,4 +1,4 @@ -#extends templates.two_col +#extends templates.login_nav #def title_block <span class="label label-important error-large">Error: $title</span> diff --git a/templates/login_nav.tmpl b/templates/login_nav.tmpl new file mode 100644 index 0000000..05780d0 --- /dev/null +++ b/templates/login_nav.tmpl @@ -0,0 +1,31 @@ +#extends templates.base + +#def add_nav_and_login + <div class="nav-collapse"> + <script type="text/javascript"> + <!-- + main_menu(main_menu_items); + // --> + </script> + #if $username + <p class="navbar-text pull-right"><i class="icon-user icon-white nav-icon"></i>Logged in as <a href="$username">$username</a>. <a href="$basehref/auth/logout" title="Log out">Log out</a>.</p> + #else + <p class="navbar-text pull-right">Not logged in. <i class="icon-user icon-white nav-icon"></i><a href="$basehref/auth/login" title="Log in">Log in</a>.</p> + #end if +#end def + +#def sidebar_left_block +$sidebar_left +#end def + +#def main_block +$main +#end def + +#def sidebar_right_block +$sidebar_right +#end def + +#def nav_block +$nav +#end def diff --git a/templates/two_col.tmpl b/templates/two_col.tmpl index 6e292d2..3ba51b0 100644 --- a/templates/two_col.tmpl +++ b/templates/two_col.tmpl @@ -4,3 +4,22 @@ <!-- CSS from previous template, not sure what to keep yet --> <!--<link rel="stylesheet" href="$basehref/static/theme/style-plinth-2col.css" />--> #end def + +#def add_sidebar_left + <div class="span3"> + <div class="well sidebar-nav"> + #block nav_block + $nav + #end block nav_block + #block sidebar_left_block + $sidebar_left + #end block sidebar_left_block + </div><!--/.well --> + <div class="well sidebar-nav"> + #block sidebar_right_block + $sidebar_right + #end block sidebar_right_block + </div><!--/.well --> + </div><!--/span--> +#end def + |